Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: FbnGbz on May 14, 2024, 06:50:26 PM



Title: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: FbnGbz on May 14, 2024, 06:50:26 PM
I've finalized my summary about HD-wallet's master seed generation, and would like to hear some input regarding it's contents! I'll most likely continue refinement of the content in the future, but for now, I'd simply like to have the summary reviewed on both chronological- and factual correctness. 🤠

I've spent multiple weeks on reading, gathering, writing and refining the summary, and have reached out to Greg Walker (Learnmeabitcoin.com) to ask if he'd be willing to give my summary an initial review, which he did!

Nonetheless, I'm curious as to what can be tweaked more, please be precise!

I've shared the link to the document here:

https://acrobat.adobe.com/id/urn:aaid:sc:EU:981be534-af5c-4bdf-85a5-17926f5044fa


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: larry_vw_1955 on May 15, 2024, 03:31:35 AM


Nonetheless, I'm curious as to what can be tweaked more, please be precise!



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.


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: FbnGbz on May 15, 2024, 07:11:13 AM
[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.


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: ABCbits on May 15, 2024, 11:37:32 AM
I skimmed it and it looks good. Here's my short thought,

and subsequently processes the collected data into a sequence of either 128- or 256-bit segments, comprising entropy.

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.

Salting indicates the addition of salt, or random data such as a passphrase, before iterating the hash function, thereby mitigating precomputed attacks and ensuring uniqueness in hash values.

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.


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: FbnGbz on May 15, 2024, 12:32:41 PM
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! 🤠


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: larry_vw_1955 on May 16, 2024, 12:10:08 AM

It's the technical section, ain't it?
yes it is but some things you can google for yourself. for example:

https://medium.com/coinmonks/mnemonic-generation-bip39-simply-explained-e9ac18db9477



Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: FbnGbz on May 16, 2024, 06:57:15 AM
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?


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: NotATether on May 16, 2024, 07:23:33 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.


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: satscraper on May 16, 2024, 07:59:18 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.


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: FbnGbz on May 16, 2024, 08:07:34 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.

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.


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: FbnGbz on May 16, 2024, 08:12:32 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.

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?


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: nc50lc on May 16, 2024, 08:15:15 AM
Nonetheless, I'm curious as to what can be tweaked more, please be precise!
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.

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 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 (http://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#master-key-generation)
(one reason to be specific with the title)


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: satscraper on May 16, 2024, 08:43:32 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.


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)...


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.


How'd you change that?


It is your summary, not mine

https://www.talkimg.com/images/2024/05/09/r0JWg.png


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: ABCbits on May 16, 2024, 08:46:58 AM
Nonetheless, I'm curious as to what can be tweaked more, please be precise!
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.

In addition, Electrum have it's own standard called "Electrum Seed Version System".


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: FbnGbz on May 16, 2024, 08:57:05 AM
Nonetheless, I'm curious as to what can be tweaked more, please be precise!
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.

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 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 (http://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#master-key-generation)
(one reason to be specific with the title)

Hm, alright.


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: FbnGbz on May 16, 2024, 08:58:29 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.


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)...


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.


How'd you change that?


It is your summary, not mine

https://www.talkimg.com/images/2024/05/09/r0JWg.png


Fancy words that describe the process. If you're not willing to help, you might as well stay away altogether.


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: larry_vw_1955 on May 16, 2024, 11:46:56 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?


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.









Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: FbnGbz on May 17, 2024, 07:39:57 AM
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.


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: NotATether on May 17, 2024, 12:42:47 PM
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 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 (http://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#master-key-generation)
(one reason to be specific with the title)

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.

In addition, Electrum have it's own standard called "Electrum Seed Version System".

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.  :D Also why is he changing color from brown to red?


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: larry_vw_1955 on May 18, 2024, 12:20:12 AM

Stay away, petty little trashcan.

keep working hard on that paper and maybe put it on a website oneday once you get it tidied up and spiffy looking.


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: satscraper on May 18, 2024, 06:42:00 AM


I will never not like Dilbert.  :D Also why is he changing color from brown to red?

Because of the mental strain. For him to generate randomness like "nine, nine, nine ...." is truly nothing to sneeze at. :D


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: FbnGbz on May 18, 2024, 07:53:33 AM
You're making me feel bad about being so harsh to you, but you made me say it.


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: NeuroticFish on May 18, 2024, 11:06:42 AM

You can always try xkcd  :D

https://imgs.xkcd.com/comics/random_number.png



I've shared the link to the document here

I'm not so sure about the usefulness of this document, still, I've gave you some merit for the effort.
At least it's part of (your) learning curve.


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: FbnGbz on May 18, 2024, 08:35:15 PM

I'm not so sure about the usefulness of this document, still, I've gave you some merit for the effort.
At least it's part of (your) learning curve.
[/quote]

I don't care about "Merit", what am I supposed to do with that?

If you're unsure about the use of the document, then I'm unsure about the use of "Development & Technical Discussion".

It's the last time that I've posted here, if people like the ones I've encountered here are the first "Bitcoiners" people get to talk to, then it's no wonder nobody likes us.

TL;DR: Keep your worthless merit.


Title: Re: [TECHNICAL] Personal Summary on HD-wallet's Master Seed Generation:
Post by: NeuroticFish on May 19, 2024, 11:04:40 AM
I don't care about "Merit", what am I supposed to do with that?

If you're unsure about the use of the document, then I'm unsure about the use of "Development & Technical Discussion".

It's the last time that I've posted here, if people like the ones I've encountered here are the first "Bitcoiners" people get to talk to, then it's no wonder nobody likes us.

TL;DR: Keep your worthless merit.

It was meant as encouragement, not to offend you.
And about the usefulness... I am unsure because I find the one from  learnmeabitcoin.com more catchy at least and with better chances to be read by the ones interested.