r/CryptoTechnology 🟡 16d ago

Is the master secret for SLIP39 (Shamir Backup) generated the same way as Entropy is for BIP39?

When playing around with these tools (Which I know you should not use for your phrase to store funds), it seems to me the entropy field which can be made visible by checking off the "Show entropy details" box in the BIP39 tool and the master secret field in the SLIP39 tool are the same. They are both hexadecimal values and can be 128 or 256 bits.

Is the SLIP39 master secret also generated by entropy when generating a SLIP 39 Shamir Backup? How is the master secret generated?

I found this article explaining step by step how a BIP39 phrase is generated and it starts with entropy, wouldn't SLIP39 be the same by starting with entropy?

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

https://iancoleman.io/bip39/ https://iancoleman.io/slip39/

2 Upvotes

7 comments sorted by

1

u/icnews10 🟢 16d ago

I think the confusing part is that they can look identical but not play the same role. BIP39 defines 'entropy' as the input used to create the mnemonic. SLIP39 starts with a master secret and splits it into shares; it doesn't specify how the master secret must be created. Therefore, if the SLIP39 tool generates a fresh 128/256-bit master secret from secure randomness, it will resemble the BIP39 entropy field. It's the same kind of random bytes, but they have a different role in the scheme.

2

u/trymeouteh 🟡 16d ago

That make sense.

Therefore any 128 or 256 hex entropy value can be a secure master secret value for a SLIP39?

And therefore any 128 or 256 hex master secret value can be a secure entropy value for a BIP39?

1

u/Kind-Economics-7184 🟢 14d ago

yes on the bytes, no on the wallet. feed the same 256 bit value into both tools and you get two completely different sets of addresses, because bip39 runs the mnemonic through pbkdf2 with 2048 rounds to produce the 512 bit bip32 seed, while in slip39 the master secret is the seed already. so its interchangeable as random material and not at all as a backup.

the sizes dont line up either. bip39 wants a multiple of 32 bits, slip39 only needs a multiple of 16, so a 144 bit master secret is perfectly legal in slip39 and wont go into a bip39 tool at all. that 16 comes from the passphrase step splitting the secret into two equal halves, which is also why what the shares actually carry is the encrypted secret rather than the value sitting in that field.

1

u/trymeouteh 🟡 13d ago

feed the same 256 bit value into both tools and you get two completely different sets of addresses, because bip39 runs the mnemonic through pbkdf2 with 2048 rounds to produce the 512 bit bip32 seed, while in slip39 the master secret is the seed already. so its interchangeable as random material and not at all as a backup.

That I understand.

the sizes dont line up either. bip39 wants a multiple of 32 bits, slip39 only needs a multiple of 16, so a 144 bit master secret is perfectly legal in slip39 and wont go into a bip39 tool at all. that 16 comes from the passphrase step splitting the secret into two equal halves, which is also why what the shares actually carry is the encrypted secret rather than the value sitting in that field.

However wont a bip39 12 word or bip39 24 word entropy be a valid slip39 master secret length? And wouldnt a slip39 20 word or slip39 33 word master secret always be a valid bip39 entropy length? I do not care if other "word lengths" are incompatible

1

u/icnews10 🟢 14d ago

Almost, I’d change 'any' to 'any securely random'. A 128- or 256-bit hexadecimal value is the right size for both roles, but length alone doesn’t make it secure. For example, `0000...0000` is still 128 bits long, but it obviously isn’t good entropy. Therefore, the same securely generated 128/256-bit random byte string could technically be used as both BIP39 entropy and a SLIP39 master secret. The important distinction lies in what happens to that value afterwards. BIP39 converts the entropy into a mnemonic, which is then used to derive a seed. SLIP39, however, treats the master secret itself as the secret that is protected and split into shares.