Lesson8 min

BIP39

BIP39 maps entropy to words and stretches those words into a 512-bit seed. The seed is not the phrase. A passphrase changes the seed.

BIP39 is the mnemonic standard. It defines the word lists and the two conversions wallets have to agree on: entropy into words, and words into a seed. BIP32 then consumes the seed. BIP39 itself does not decide whether an address starts with bc1q or 0x. That happens later, in the path and the script.

Words from entropy

The checksum lesson covers the first conversion. Entropy, a hash, 11-bit groups, words. The English list is the one documented on this site. The phrase you write down is this stage. It is not yet a key.

A seed from the words

The second conversion stretches the phrase so that guessing it is at least as hard as guessing the entropy, and so that a passphrase can be mixed in. The phrase, encoded as Unicode and normalized with NFKD, is the password. The salt is the literal string mnemonic, followed by the passphrase, also NFKD-normalized. An empty passphrase means the salt is exactly those nine letters. The function is PBKDF2 with HMAC-SHA512, 2,048 iterations, and a 512-bit output.

That 512-bit output is the seed BIP32 expects. It is not the phrase, and it is not a private key you can reuse by itself on another coin without derivation. Two wallets that both implement BIP39 and are given the same words and the same passphrase must produce the same seed. If they then use different paths, the addresses still differ.

The passphrase

The passphrase is optional. People call it the 25th word when the phrase has 24 words, and sometimes the 13th word when it has 12. Both nicknames are informal. The passphrase is not chosen from the 2,048-word list. It can contain spaces, capitals, and punctuation. Secret and secret are different seeds. A blank and a space are different seeds.

A wrong passphrase does not fail the checksum. The checksum was already settled when the words were created. The passphrase only changes the seed. The wallet opens a different tree, usually empty, and looks as if the funds have vanished. They are still on the words plus the original passphrase. This is the entire reason to write the passphrase down, separately if you are using it to split knowledge, and to practice a restore before you rely on it.

The passphrase outline collects the operational advice. The mechanism is the salt described above.

Nothing in this conversion requires a network. The validator and the derivation demo run it in your browser, on purpose, and they are still the wrong place for a real phrase. A local computation can be observed by a compromised browser.