Post
Topic
Board Development & Technical Discussion
Merits 4 from 1 user
Re: Introducing a version field to BIP39 Mnemonic Phrases.
by
LesLie_0300dbdd1b
on 12/01/2024, 15:07:07 UTC
⭐ Merited by o_e_l_e_o (4)
Thanks for your feedbacks!

Interesting proposal! A few questions:

How would you propose assigning your 8 bit field version field? Something like this?

00000000 - P2PKH at m/44'/0'/0'
00000001 - P2SH-P2WPKH at m/49'/0'/0'
00000010 - P2WPKH at m/84'/0'/0'
00000011 - P2TR at m/86'/0'/0'

What if I want to use a script type/derivation path combo which isn't assigned a version number? What happens then? And what if I want to use the same seed phrase to generate both a P2PKH wallet and a P2WPKH wallet, for example?

I deliberately refrained from drafting specifications for the versions, as I believe that falls outside the scope of this proposal.
However, if I were to design a version dedicated to specifying derivation paths, I would consider utilizing the 24-bit purpose field.

Personally, I envision two methods to achieve this:
  • Employ the entire 24-bit field to define a custom derivation path. This approach, however, would limit the mnemonic phrase to a single derivation path.
  • Alternatively, use 16 bits to designate standard derivation paths, allocate the subsequent 8 bits for subversions (allowing for future expansion of these standard paths).

For example:
first bit     - m/44'/0'/0'
second bit - m/49'/0'/0'
third bit    - m/84'/0'/0'
fourth bit  - m/86'/0'/0'

where:
0001 0000 0000 0000 - m/86'/0'/0' only
1001 0000 0000 0000 - m/44'/0'/0' & m/86'/0'/0'
1111 0000 0000 0000 - all of the above derivation path


I believe that, ultimately, a compromise is necessary between the flexibility of setting a custom derivation path and the capability to utilize multiple derivation paths simultaneously.


Taking 128 bits of entropy generating a 15 word seed phrase using your new system, I assume you are feeding the full 15 words in to PBKDF2? Or are you stripping out the 128 bits of entropy and converting to a "legacy" 12 word seed phrase before generating your wallet?

Yes, to maintain compatibility with non-versioned BIP39 wallets, the complete set of 15 words must be entered into PBKDF2.
Of course, this could be changed in future versions, albeit at the cost of breaking compatibility.

I disagree with your suggestion above to indicate whether a passphrase has been used in the general purpose field. One of the main uses of a passphrase is to add plausible deniability, which is eliminated if you indicate in your seed phrase that you have used a passphrase.

I agree that it'd be a bad idea.