1

I'm a newbie at this, but I have a question.

How did the original Bitcoin (Core) v0.1 program generate random private keys? I was hoping for the exact source code or at least a good description of the method used.

I understand (almost) any 32 byte integer will work as a private key. I assume they used a Windows based OS random generator CryptGenRandom() since it was released for Win XP initially, I think.

Thanks!

2

The Bitcoin software has always used OpenSSL's random number generator in some way to generate private keys. Originally, it just used OpenSSL's EC_KEY_generate_key function to generate a new key and OpenSSL would handle the RNG and object creation. Even now, Bitcoin Core still uses OpenSSL's RNG and mixes it's output with several other sources of randomness in order to generate private keys.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.