Bitcoin Forum
June 16, 2024, 06:54:53 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Tech question: creating a Bitcoin private key with FileMaker or Access?  (Read 1480 times)
BitcoinGirl325 (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
January 07, 2015, 06:17:17 PM
 #1

Please excuse the very beginner level technical question here, but is there a way to create a Bitcoin private key with a simple consumer database app such as FileMaker Pro or Microsoft Access?

My guess is that there IS such a way, since both database apps include a "random number generator" function.

I suppose I just don't know where to find the information on:
1. What SPECIFIC criteria makes up a valid private key, including the checksum at the end of the key?
2. Once I have generated the private key, how do I translate that into the public key to distribute publicly to others?

My goal is to have my company's internal invoicing system (which prints out invoices on old-fashioned paper) automatically generate a brand new Bitcoin address (public key) on each printed invoice, so that clients can have the option of paying their invoices with Bitcoin.

Thanks in advance for any help or guidance that you can provide!

If you enjoyed my post or found it helpful, please feel free to donate BTC to me at: 15UKsghaHeLAtidySEHmPXBWRjBMM1Tw4u
ncsupanda
Legendary
*
Offline Offline

Activity: 1628
Merit: 1012



View Profile
January 07, 2015, 06:25:18 PM
 #2

https://en.bitcoin.it/wiki/Private_key

https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses

These two references used together more than explain your first question.
The second may also explain the second question.

Read through these - they are very good for learning about the technical aspects of Bitcoin.

hhanh00
Sr. Member
****
Offline Offline

Activity: 467
Merit: 266


View Profile
January 07, 2015, 06:31:39 PM
 #3

Please excuse the very beginner level technical question here, but is there a way to create a Bitcoin private key with a simple consumer database app such as FileMaker Pro or Microsoft Access?

My guess is that there IS such a way, since both database apps include a "random number generator" function.

The random number generator of these apps is not good enough for bitcoin applications. It will produce a number that is too easy to guess and you will lose your money.

cr1776
Legendary
*
Offline Offline

Activity: 4060
Merit: 1303


View Profile
January 07, 2015, 06:32:49 PM
Last edit: January 08, 2015, 01:39:41 AM by cr1776
 #4

Hi,
One thing to greatly consider is the actual randomness of the random number generator in them before relying on them (edit: as hhanh00 said at almost the same time).   It might also be useful to explore this to potentially avoid the issue:
http://tools.ietf.org/html/rfc6979




The second question is the difficulty of doing the ECC and hashing within those applications.  They may have that functionality built in or you might need some external libraries, that is something you'd have to research.  

However, the links provided above should give a good start on researching it more, but remember, rolling your own can be dangerous.

:-)


DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
January 07, 2015, 10:32:34 PM
 #5

Crypto is one of those things you don't want to "roll yourself".  It is very easy to make a system which you believe is secure and isn't.   As pointed out a RNG is insufficient what you need is a cryptographically secure random number generator (CSRNG).   The RNG in database applications (and many other places) are not designed or verified to produce numbers which can't be broken.

What I would recommend is you some existing wallet export just the public keys and import those into your database.   Then assign them to customers invoices as needed.   There is no reason for the database to hold private keys.
BitcoinGirl325 (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
January 08, 2015, 03:25:18 AM
 #6

Thanks so much, everyone, for the excellent advice! Smiley I didn't realize that a random number generator isn't the exact same thing as a cryptographically secure random number generator?? So the random number generator within database applications isn't truly random?

If you enjoyed my post or found it helpful, please feel free to donate BTC to me at: 15UKsghaHeLAtidySEHmPXBWRjBMM1Tw4u
hhanh00
Sr. Member
****
Offline Offline

Activity: 467
Merit: 266


View Profile
January 08, 2015, 03:35:00 AM
 #7

They are pseudo random number generators. Some of better than others. For a database function, most people don't care about a high quality PRNG. So they implemented a simple and fast one. In cryptographic usage, we need a better one even if they are slower.
For an even better RNG, you could purchase special hardware that specializes in delivering random numbers (for ex: http://www.entropykey.co.uk/)

Edit: In your case, you could consider using a deterministic wallet like BIP32. They start with a seed that you must generate with a crypto secure RNG. But then all the subsequent keys are produced by a non random method from the starting point and there is no need for any RNG after the seed.


jl2012
Legendary
*
Offline Offline

Activity: 1792
Merit: 1097


View Profile
January 08, 2015, 10:59:15 AM
 #8

"Random number" generated by MS Windows:


Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY)
LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC)
PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
hhanh00
Sr. Member
****
Offline Offline

Activity: 467
Merit: 266


View Profile
January 08, 2015, 11:04:38 AM
 #9

Source?

jl2012
Legendary
*
Offline Offline

Activity: 1792
Merit: 1097


View Profile
January 08, 2015, 02:59:21 PM
 #10

Source?

https://www.random.org/analysis/

Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY)
LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC)
PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
ncsupanda
Legendary
*
Offline Offline

Activity: 1628
Merit: 1012



View Profile
January 08, 2015, 03:53:07 PM
 #11

Thanks so much, everyone, for the excellent advice! Smiley I didn't realize that a random number generator isn't the exact same thing as a cryptographically secure random number generator?? So the random number generator within database applications isn't truly random?

It's my understanding that technically no RNG is TRULY random.
hhanh00
Sr. Member
****
Offline Offline

Activity: 467
Merit: 266


View Profile
January 08, 2015, 03:56:39 PM
 #12


Thanks. To be 100% clear, it's not specific to Windows. You can obviously have good PRNG on Windows and bad ones everywhere.
That picture is a particularly bad combination: PHP, rand() and Windows.

samson
Legendary
*
Offline Offline

Activity: 2097
Merit: 1070


View Profile
January 10, 2015, 11:19:41 AM
 #13

"Random number" generated by MS Windows:



As opposed to this which was generated using a small hardware device I have :


BitcoinGirl325 (OP)
Full Member
***
Offline Offline

Activity: 126
Merit: 100



View Profile
January 14, 2015, 07:16:53 AM
 #14

Whoa. This is very useful information. Thanks so much, everybody!

If you enjoyed my post or found it helpful, please feel free to donate BTC to me at: 15UKsghaHeLAtidySEHmPXBWRjBMM1Tw4u
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!