Personal Insights on Master Seed Generation for HD Wallets

19 replies 352 views
rocket365Senior Member
Posts: 220 · Reputation: 905
#1Dec 11, 2020, 08:28 AM
So, I've wrapped up my overview on how HD wallets generate their master seeds, and I'd love to get some feedback on it! I'm planning to keep refining it down the line, but for now, I just want to make sure it's accurate in terms of both the timeline and the facts. I spent a few weeks digging into this, doing a lot of reading, writing, and editing. I even asked Greg Walker from Learnmeabitcoin.com for his thoughts, and he was kind enough to review it! Still, I'm looking for ways to improve it further, so if you could be specific with your suggestions, that would be awesome! Here's the link to check out the document:
8 Reply Quote Share
5tack_cipherFull Member
Posts: 171 · Reputation: 775
#2Dec 11, 2020, 01:19 PM
who are you trying to write this document for? Section 4 (Mnemonic-to-Seed Conversion) no one is going to really understand how it works just based off of what you have there. They might get an idea of what's going on but that's about it. And I'm not even sure of the need for the previous sections since Bip39 explains it in about the same exact way you did but with a few more details thrown in.
4 Reply Quote Share
rocket365Senior Member
Posts: 220 · Reputation: 905
#3Dec 11, 2020, 06:50 PM
[Personal] should indicate pretty well who it's aimed for, and why can't you guys simply be supportive for once? It's the technical section, ain't it? Every time all you guys do is throw around with some bips, who, and I've looked at them, are many times more confusing (using key words the average Joe knows jack-shit about) than the document above. No wonder everyone I talk to thinks that you guys are a special kind of idiots. Edit: confused it with bip 32, to which the above adhered. Bip 39, on the other hand, ONLY specifies the words and what they have to adhere to, so how's that any more helpful than the above?! I'm done here, you guys seem to enjoy the occasional ordinals-rant along with some cringe (worthless) experiments.
1 Reply Quote Share
hash_bossLegendary
Posts: 1166 · Reputation: 5261
#4Dec 13, 2020, 08:48 AM
I skimmed it and it looks good. Here's my short thought, In practice, most wallet software generate either 128-bit or 256-bit data. But actually you also could use 160, 192 or 224-bit data. While it's true salting usually used to mitigate precompute attack, IMO there's no need to mention it since, 1. Generating all valid mnemonic words in advance is impossible. 2. Using CSPRNG prevent attacker performing precompute on specific range or values.
4 Reply Quote Share
rocket365Senior Member
Posts: 220 · Reputation: 905
#5Dec 13, 2020, 10:21 AM
Thank you!! Hm, I know about the other bit-length's existence, but as you say yourself: they usually aren't used, which is why I chose to leave them out. Hm, clear, but it's not wrong to leave it in, correct? Many thanks! 🤠
6 Reply Quote Share
5tack_cipherFull Member
Posts: 171 · Reputation: 775
#6Dec 13, 2020, 11:50 AM
yes it is but some things you can google for yourself. for example: https://medium.com/coinmonks/mnemonic-generation-bip39-simply-explained-e9ac18db9477
3 Reply Quote Share
rocket365Senior Member
Posts: 220 · Reputation: 905
#7Dec 13, 2020, 01:16 PM
You're not helpful, man. I want to know if the above ~8 min read is correct or not; if you can't bring up the energy to have a read-through of the summary and report back to me, you might as well stay away altogether. You could've responded with something helpful, but no, some links here and some rambling there, stay away. Edit: 🤣, I had a look over it, and it's essentially a simplified version of the above... How will that help?
1 Reply Quote Share
LuckyCoinLegendary
Posts: 832 · Reputation: 4795
#8Dec 14, 2020, 03:10 AM
BIPs are quite hard for normal people to understand, so infographics that basically summarize them are always appreciated. I see you missed the part involving HMAC-SHA3512. It's not strictly involved in creating the master seed itself but it uses the master seed to create the master private key. I can't check right now, but I recall from memory that the entropy input is passed through that MAC, with "Bitcoin seed" as the data (I believe the case of the characters is like that) and the entropy as the secret key. Then the output is split into two halves being the extended key (i.e. the master key itself) and chain code. The OP title does say "master seed" so when people talk about that they are usually referring to the entropy as in your document.
2 Reply Quote Share
silentchainHero Member
Posts: 473 · Reputation: 2317
#9Dec 14, 2020, 04:31 AM
The summary needs the definition of "entropy". There are a few of them i.e. physical entropy, Shannon entropy, entropy relevant to domain of  "Master Seed Generation" etc.. I would prefer to see that OP  understand the difference and provide the explicit meaning of entropy he used when  summarizing his knowledge.
2 Reply Quote Share
rocket365Senior Member
Posts: 220 · Reputation: 905
#10Dec 14, 2020, 04:38 AM
Thank you! Yeah, I also share your sentiment on Bips. What you're describing, however, is the derivation of the master extended private key, which is derived indeed derived by passing the master seed + "Bitcoin Seed" string through the HMAC-SHA512. I'm working on the derivation part, wherein the above is covered as well.
2 Reply Quote Share
rocket365Senior Member
Posts: 220 · Reputation: 905
#11Dec 14, 2020, 09:06 AM
Hm, maybe you can help me with that? As far as I could find, the entropy simply refers to "randomness", with the former being collected by a CSPRNG that collects randomness from a mixture of external sources (i.e., environmental noise, system events, or user input)... How'd you change that?
2 Reply Quote Share
gr3g.0rbitHero Member
Posts: 1025 · Reputation: 2646
#12Dec 14, 2020, 12:41 PM
Only the document's title, everything checks out. BIP39 should be predominantly mentioned, should be something like "BIP39, Generation of Master Seed". Because not all HD wallets use mnemonic, for example, Bitcoin Core. In cases where the wallet doesn't follow BIP39 standard; the master seed (seed, hdseed) is usually generated though pRNG, and not from a mnemonic. I think he's talking about BIP32's master key derivation from the entropy, he might have misunderstood the document. Link: github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#master-key-generation (one reason to be specific with the title)
3 Reply Quote Share
silentchainHero Member
Posts: 473 · Reputation: 2317
#13Dec 14, 2020, 03:51 PM
Those are  just fancy words that don't reveal the essence. In the domain of "Master Seed Generation" entropy is just a big ( commonly 128/256 bits) binary number. Ideally it must be random... but, there is always a but.  Its randomness depends on the way  by which it has been generated.  The best way is to digitize physical processes that are believed to be stochastic. For instance, Passport wallet digitizes Avalanche noise for this purpose. It is your summary, not mine
0 Reply Quote Share
hash_bossLegendary
Posts: 1166 · Reputation: 5261
#14Dec 14, 2020, 06:16 PM
In addition, Electrum have it's own standard called "Electrum Seed Version System".
2 Reply Quote Share
rocket365Senior Member
Posts: 220 · Reputation: 905
#15Dec 14, 2020, 11:48 PM
Hm, alright.
4 Reply Quote Share
rocket365Senior Member
Posts: 220 · Reputation: 905
#16Dec 15, 2020, 02:05 AM
Fancy words that describe the process. If you're not willing to help, you might as well stay away altogether.
1 Reply Quote Share
5tack_cipherFull Member
Posts: 171 · Reputation: 775
#17Dec 15, 2020, 07:30 AM
it would help about as much as trying to make a meaningful summary of bip32 in a single paragraph... https://learnmeabitcoin.com/technical/keys/hd-wallets/ your sections 1 through 3 are detailed. your section 4 is not detailed at all. one of your graphics in the file is wrong (or confusing/misleading?). but since this document is just for your own personal use, i guess it really doesn't matter that much.
3 Reply Quote Share
rocket365Senior Member
Posts: 220 · Reputation: 905
#18Dec 17, 2020, 05:19 PM
Alright then, maybe point out what's wrong? It's beyond me how someone capable enough to dissect the above document, can be too incompetent to write a simple and useful reply in one go; instead, one has to hold his hand and guide him towards generating a somewhat useful reply. Stay away, petty little trashcan.
2 Reply Quote Share
LuckyCoinLegendary
Posts: 832 · Reputation: 4795
#19Dec 17, 2020, 06:14 PM
It took me some time to figure out earlier that this covers only entropy generation, but not things inside BIP32 - which use the output of such entropy generation processes. But this is the layer that's directly above BIP32 and you could say it's on the same layer as BIP39 but below the entropy gathering stuff. I will never not like Dilbert.   Also why is he changing color from brown to red?
6 Reply Quote Share
5tack_cipherFull Member
Posts: 171 · Reputation: 775
#20Dec 18, 2020, 12:03 AM
keep working hard on that paper and maybe put it on a website oneday once you get it tidied up and spiffy looking.
2 Reply Quote Share

Related topics