How are brain wallets generated?

1

How do sites like blockchain.info and bitaddress.org generate private keys by simply hashing a string? (the passphrase?)

In this wiki article, https://en.bitcoin.it/wiki/Technical_background_of_version_1_Bitcoin_addresses Step "0" starts with an ECDSA key pair already generated.

Does this mean that any 256-bit value can be a valid ECDSA private key? So wherever I am in the world, I can always just SHA256(passphrase) and get my private key?

pinhead

Posted 2013-09-26T23:30:45.623

Reputation: 2 356

Answers

3

Any 256-bit value can be a valid secp256k1 ECDSA private key. Strictly speaking, there's an upper limit that's slightly lower than 2^256, but you can just wrap them around.

So yes, you can just use SHA256(passphrase) to generate a private key.

David Schwartz

Posted 2013-09-26T23:30:45.623

Reputation: 46 931

Techies often forget to normalize the private seed when making brain wallets, mentioned above. This is typically not a show stopper for secp256k1, but is very big issue when ed25519 is used. Concerning secp256k1, try a using a private key greater than FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364140. Key normalization is required.skaht 2019-02-24T04:23:31.957

2

We made a much improved version of brainwallet that uses scrypt key-stretching to protect your secret key. See it here: https://keybase.io/warp. There's currently an unbroken 20BTC challenge for an 8-letter passphrase.

Max Krohn

Posted 2013-09-26T23:30:45.623

Reputation: 169

After losing bitcoins in bitaddress.org's brain wallet, I am glad to see someone came up with something a little more substantial. The fact that an 8 character pass still hasn't been cracked is impressive.RobKohr 2014-01-13T15:32:32.327