Author

Topic: Tech question: creating a Bitcoin private key with FileMaker or Access? (Read 1481 times)

full member
Activity: 126
Merit: 100
Whoa. This is very useful information. Thanks so much, everybody!
legendary
Activity: 2097
Merit: 1070
"Random number" generated by MS Windows:



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


sr. member
Activity: 467
Merit: 267

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.
legendary
Activity: 1628
Merit: 1012
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.
sr. member
Activity: 467
Merit: 267
legendary
Activity: 1792
Merit: 1111
"Random number" generated by MS Windows:

sr. member
Activity: 467
Merit: 267
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.

full member
Activity: 126
Merit: 100
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?
donator
Activity: 1218
Merit: 1079
Gerald Davis
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.
legendary
Activity: 4256
Merit: 1313
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.

:-)


sr. member
Activity: 467
Merit: 267
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.
legendary
Activity: 1628
Merit: 1012
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.

full member
Activity: 126
Merit: 100
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!
Jump to: