Post
Topic
Board Bitcoin Technical Support
Merits 3 from 1 user
Re: How do I identify the valid checksums for bip39 if I generate 11/12 of the word?
by
odolvlobo
on 25/09/2022, 21:55:58 UTC
⭐ Merited by ETFbitcoin (3)
Maybe if I try to clarify a little bit further as far as to what I'm trying to do exactly it might be able to give us a better picture of whether it's feasible or not. Specifically what I'm trying to do is print out a list of the 2048 bip39 words and randomly select 12 to create my own offline generated seed. Can this be feasibly done? I'm trying to ensure true ravdsomness in seed creation and this seems to be the only way I can come up with outside of being able to independently verify the code from wallet manufacturers etc. Thanks.

The right way to do it is to follow BIP-39:

  • 1. Generate random 128 bits.
  • 2. Compute the SHA-256 hash of the 128 bits.
  • 3. Append the first 4 bits of the hash to the 128 bits, giving you 132 bits.
  • 4. Split the 132 bits int 12 11-bit values.
  • 5. Generate the phrase by using the 11-bit values as indexes in the 2048 entry word list.

However, there is another way similar to what you want to do, but the result may be less secure depending on step 3:

  • 1. Select 11 words from the word list.
  • 2. Concatenate the indexes into a 121 bit string.
  • 3. Add another 7 bits, random or 0 or whatever.
  • 4. Compute the SHA-256 hash of the 128 bits.
  • 5. Append the first 4 bits of the hash to the 7 bits, giving you the index of the 12th word.