Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: superlative on October 26, 2017, 11:40:29 PM



Title: How does BIP39 work? Is all the information in the seed?
Post by: superlative on October 26, 2017, 11:40:29 PM
So a Jaxx wallet (for example) can have multiple wallets for different currencies (eg. BTC, ETH, BCC).  However the backup phrase is 12 words (for Ledger hardware wallet, it's 24 words).  Is all the information on all those wallets contained in those 12 words, or are those 12 words merely a password to retrieve that information from some server?

Thanks for your patience!

(I did google this before I came here, but all I could find is that BIP39 is 24 words from a 2048 word dictionary - but that doesn't explain to me where the information on the wallet is actually stored - inside the seed, or on a server, because it doesn't make sense to me that all the information of public and private keys associated with just a single address can somehow be stored in a 24 or 12 word phrase)


Title: Re: How does BIP39 work? Is all the information in the seed?
Post by: superlative on October 26, 2017, 11:46:32 PM
I was able to find this:
https://www.reddit.com/r/Bitcoin/comments/6iphd6/recovery_seed_12_words_vs_24_words/

And I think it sort of explains it, and I get that if you enter the words into a algorithm it will spit out the right key - but in the case of Ledger, Ledger can store 10+ different cryptocurrencies - how can the addresses of all those currencies be determined by just 24 words?  The math escapes me.

Thanks!


Title: Re: How does BIP39 work? Is all the information in the seed?
Post by: superlative on October 27, 2017, 02:31:40 AM
anyone can help explain?  thanks.


Title: Re: How does BIP39 work? Is all the information in the seed?
Post by: BlueSword on October 27, 2017, 03:40:25 AM
how can the addresses of all those currencies be determined by just 24 words?  The math escapes me.
A single word randomly chosen from a list of 2048 words provides 11 bits of entropy (2^11 = 2048), so 24 words provides 264 bits of entropy.  These 264 bits can be used as the seed for a cryptographically secure pseudo-random number generator (CSPRNG).  The CSPRNG can then be used to produce an arbitrary amount of public/private key pairs.  A good CSPRNG has the property that it is computationally infeasible, given only a subset of the outputs of the CSPRNG, to determine the state of the CSPRNG or other outputs of the CSPRNG.  This is how it is possible to "stretch" the original 24 words to produce an arbitrary number of addresses.


Title: Re: How does BIP39 work? Is all the information in the seed?
Post by: odolvlobo on October 27, 2017, 04:18:55 AM
The seed is all the information that the wallet needs. All addresses are generated from the seed.

BIP-32 (https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) describes how addresses are generated from a seed.

You can generate a private key by hashing the seed itself. You can generate another private key by hashing the first private key. You can generate as many private keys as you want by hashing the previous private key. If you start with the same seed, you will always get the same private keys, so the seed is all you ever need. BIP-32 uses that concept.


Title: Re: How does BIP39 work? Is all the information in the seed?
Post by: gmctec on November 30, 2017, 10:01:40 PM
odolvlobo,  you have only mentioned about how a deterministic seed can be used to recover the account, but you (no anyone else) has addressed the question:  Where is the actual data stored?  Recovering the password to an account is great only if there is actual coin (data) in the account.  But If I loose the device, and there is no data, how is the data recovered?  Where is the actual data? 


Title: Re: How does BIP39 work? Is all the information in the seed?
Post by: odolvlobo on December 01, 2017, 06:46:05 PM
odolvlobo,  you have only mentioned about how a deterministic seed can be used to recover the account, but you (no anyone else) has addressed the question:  Where is the actual data stored?  Recovering the password to an account is great only if there is actual coin (data) in the account.  But If I loose the device, and there is no data, how is the data recovered?  Where is the actual data?  

The seed is the data.

Perhaps you aren't aware that a wallet doesn't actually hold coins, it holds the private keys that allow you to spend coins. You could say that the coins are stored in the block chain, though that's not entirely accurate.

Also, I recommend against use of the word "account" unless you mean a bank account or an exchange account. The meaning is ambiguous except in very specific contexts.


Title: Re: How does BIP39 work? Is all the information in the seed?
Post by: Cloudpost on August 11, 2018, 09:52:51 PM
The seed is all the information that the wallet needs. All addresses are generated from the seed.

BIP-32 (https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) describes how addresses are generated from a seed.

You can generate a private key by hashing the seed itself. You can generate another private key by hashing the first private key. You can generate as many private keys as you want by hashing the previous private key. If you start with the same seed, you will always get the same private keys, so the seed is all you ever need. BIP-32 uses that concept.

I found a link to this thread in google and explanation about BIP39 work principle was very easy to understand. Thanks! I hope that all crypto people will learn such basic stuff at some point, bumping the thread for that reason.