Author

Topic: Brainwallet Passphrase limits? (Read 683 times)

full member
Activity: 238
Merit: 100
December 04, 2013, 02:20:59 AM
#11
The length should has no restriction, but you'd better input more than 20 characters.
newbie
Activity: 43
Merit: 0
December 04, 2013, 01:45:38 AM
#10


I don't know if anyone has determined yet if the result set of SHA-256 actually includes every number from 0 to 2256.  I suppose it may be possible that there are some private keys that SHA-256 will never create no matter what input is used.

Furthermore, since addresses are the result of finding an ECDSA public key from the private key, then calculating RIPEMD-160(SHA-256(public key)), and it's possible that any of those three functions (ECDSA, RIPEMD, SHA) may have result sets that do not include every number in their respective ranges, it is quite possible that the complete result set of addresses that can be generated from using SHA-256 to create a private key is less than 2160 possibilities.

Thank you very much for your answer DannyHamilton, VERY helpful.
I appreciate that.
legendary
Activity: 3472
Merit: 4801
December 03, 2013, 08:55:27 AM
#9

I have one brainwallet question for crypt/math gurus, please. 

I found that 2^256 private keys, they only map to 2^160 unique wallet addresses. Could SHA-256(whatever) map whole set of possible private keys or only its subset? And what is dimension of that subset?

I'm googled few days but without success.

thanks in advance!

I don't know if anyone has determined yet if the result set of SHA-256 actually includes every number from 0 to 2256.  I suppose it may be possible that there are some private keys that SHA-256 will never create no matter what input is used.

Furthermore, since addresses are the result of finding an ECDSA public key from the private key, then calculating RIPEMD-160(SHA-256(public key)), and it's possible that any of those three functions (ECDSA, RIPEMD, SHA) may have result sets that do not include every number in their respective ranges, it is quite possible that the complete result set of addresses that can be generated from using SHA-256 to create a private key is less than 2160 possibilities.
newbie
Activity: 43
Merit: 0
December 03, 2013, 08:46:26 AM
#8

I have one brainwallet question for crypt/math gurus, please. 

I found that 2^256 private keys, they only map to 2^160 unique wallet addresses. Could SHA-256(whatever) map whole set of possible private keys or only its subset? And what is dimension of that subset?

I'm googled few days but without success.

thanks in advance!
full member
Activity: 196
Merit: 100
November 28, 2013, 08:39:48 AM
#7
I'm not a programmer to understand the open source code... But do all brainwallet sites use the same algorithm to convert the passphrase to a private key and address? In other words, does a particular passphrase always generate the same private key on all sites?

I think the answer to that has to be no. One convention is to use SHA256 (both bitaddress.org and brainwallet.org use this) but there is nothing stopping another site from using some other algorithm (for instance SHA256d, or including some salt).

As mentioned above, you're far better off using a deterministic wallet like electrum and saving the 12-word passphrase. Write it down (for your own sake, or for your beneficiaries in case the worst should happen, lost/forgotten passwords are far more risk than stolen ones) and keep it in a safe place or better, several.

And a general comment. Brainwallets are NOT safe for newbies to use, have a read of this thread https://bitcointalksearch.org/topic/if-you-used-brainwalletorg-must-read-security-breach-251037
newbie
Activity: 28
Merit: 0
November 28, 2013, 08:25:01 AM
#6
I'm not sure what the limits are for the text box at the brainwallet.org website, but for the concept of a brainwallet there is no limit.

With the brainwallet concept, you start with a passphrase and then you create a 256 bit digest of the passphrase.  The most common method is to use SHA256.  SHA256 can create a 256 bit digest of any arbitrarily large data set.

I'm not a programmer to understand the open source code... But do all brainwallet sites use the same algorithm to convert the passphrase to a private key and address? In other words, does a particular passphrase always generate the same private key on all sites?
legendary
Activity: 3472
Merit: 4801
November 24, 2013, 10:50:36 AM
#5
I'm not sure what the limits are for the text box at the brainwallet.org website, but for the concept of a brainwallet there is no limit.

With the brainwallet concept, you start with a passphrase and then you create a 256 bit digest of the passphrase.  The most common method is to use SHA256.  SHA256 can create a 256 bit digest of any arbitrarily large data set.
newbie
Activity: 21
Merit: 0
November 24, 2013, 09:41:54 AM
#4
Yea I would definitely forget. Put a copy of your wallet.dat file on a few usbs, cds, maybe print one out. Store them in separate locations. Maybe give a copy to someone you trust (ALOT), incase anything ever happened to you. Oh yea and encrypt the wallet.dat file too.
newbie
Activity: 6
Merit: 0
November 24, 2013, 08:47:41 AM
#3
Don't.  Bad for privacy, usually done wrong and hacked, even if done right people often forget or lose the password...

If you still must create a brainwallet, for the love of $deity_or_lack_thereof please make sure you generate the passphrase genuinely randomly - e.g. an Electrum-esque 12 Diceware words chosen with real dice, written down multiple somewheres (perhaps split up) - and use some kind of KDF that requires a substantial amount of time to slow down brute-forcers anyway. 

But, please, just don't even do it in the first place.

I appreciate the good advise.  I still want to know what the limits are to the number of characters in a brainwallet passphrase, as well as the limits for the private key encryption passphrase in BIP38.

The passphrase I am thinking of has 230 bits of entropy, and I can recreate it reliably.  I was thinking of using that same brainwallet passphrase for both creating the private key as well as for encrypting it.  But I've been thinking of using a different (equally high entropy) passphrase for the second step of the process.

So back to my original questions, soes anyone know what the limits are to the size of the passphrases?
newbie
Activity: 6
Merit: 0
November 24, 2013, 01:31:09 AM
#2
Don't.  Bad for privacy, usually done wrong and hacked, even if done right people often forget or lose the password...

If you still must create a brainwallet, for the love of $deity_or_lack_thereof please make sure you generate the passphrase genuinely randomly - e.g. an Electrum-esque 12 Diceware words chosen with real dice, written down multiple somewheres (perhaps split up) - and use some kind of KDF that requires a substantial amount of time to slow down brute-forcers anyway. 

But, please, just don't even do it in the first place.
newbie
Activity: 6
Merit: 0
November 23, 2013, 11:25:01 PM
#1
I really wanted to correspond in another really good thread on brainwallets, but alas, I'm a noob.

So, here are my questions:

1) In generating a brainwallet on bitaddress.org, what is the limit for the number of characters in the passphrase?

2) On the site bit2factor.org, in creating an encrypted private key, what is the limit for the number of characters in the passphrase?

Thanks.
Jump to: