Messy pills

HD Wallets - Mnemonic Seed (BIP 39 standard)

From Entropy to Seed

1. Generate Entropy

2. Entropy to Mnemonic

3. Mnemonic to Seed

To create a mnemonic you first of all need to generate entropy, which is our source of randomness.

You can think of entropy is being a very large random number that nobody has ever generated before, or will ever generate in the future. It’s also best to think of this number as a series of bits (e.g. 10011010010001...), which is how computers store numbers.

(The entropy we generate must be a multiple of 32 bits, as that will allow us to split the entropy up in to even chunks and convert to words later on. Furthermore, the entropy should be between 128 and 256 bits, as that’s enough to make it impossible for two people to generate the same entropy)

Entropy: 11111011100010110101111111111001101010001001101110000010010100010110101011011111100000101111000100101101100010111100101101111101 💊

Reply to this note

Please Login to reply.

Discussion

💊 Entropy to Mnemonic

add a checksum to our entropy to help detect errors (making the final sentence more user-friendly). This checksum is created by hashing the entropy through SHA256, which gives us a unique fingerprint for our entropy. We then take 1 bit of that hash for every 32 bits of entropy, and add it to the end of our entropy.

Entropy + CheckSum

Next we split this in to groups of 11 bits, convert these to decimal numbers, and use those numbers to select the corresponding words.

(BIP39 Wordlist The words in a mnemonic sentence come from a fixed list of 2048 words - specified by BIP39 -. The first 4 letters of each word is unique in the list)