Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article examines BIP-39, which makes cryptocurrency wallet recovery easier by representing computer-generated randomness as a sequence of meaningful words that people can record and manage.

This explanation translates, summarizes, and expands on the following specification.

For other proposals, see https://cardene.dev/proposals.

Overview

BIP-39 introduces mnemonic codes, also known as mnemonic sentences. They represent wallet recovery information as a sequence of words that is easier for humans to record and remember.

The mnemonic encodes randomly generated binary entropy. The process has two stages: generating words from random entropy, then deriving a binary seed from those words. This seed can be used with standards such as BIP-32 to derive a hierarchical deterministic (HD) wallet.

Mnemonic codes provide a human-friendly representation of cryptographic randomness that ultimately supports wallet private key generation.

Motivation

Managing cryptocurrency wallets traditionally required handling long and complicated binary or hexadecimal strings. These are difficult to record on paper without errors and difficult to communicate verbally.

BIP-39 standardizes converting random information into familiar words. Recording 12 or 24 words, for example, enables recovery of the same wallet when the same derivation settings and optional passphrase are used.

The standard is not intended for brainwallets, where users invent their own sentences. Its purpose is to encode computer-generated randomness in a form that is easier to record.

Mnemonic codes balance security, usability, and portability.

Generating the Mnemonic

  1. Generate random entropy of 128–256 bits, using the allowed entropy sizes.
  2. Compute its SHA-256 hash and take the first ENT / 32 bits as a checksum.
  3. Append the checksum to the entropy and divide the result into 11-bit groups.
  4. Interpret each group as an index from 0 to 2047 and select the corresponding word from the 2,048-word list.
  5. Use the resulting sequence as the mnemonic sentence.

For 128 bits of entropy, the four-bit checksum produces 132 bits. Dividing this into 11-bit groups gives 12 words.

Entropy (bits) Checksum (bits) Words
128 4 12
160 5 15
192 6 18
224 7 21
256 8 24

Wordlist Characteristics

Wordlist quality supports accurate and convenient mnemonic handling.

  • Unambiguous prefixes: The first four letters are designed to identify each word.
  • Avoidance of similar words: Confusing pairs such as quick and quickly are avoided.
  • Sorted structure: Sorting enables efficient lookup using binary search or a trie (prefix tree).

Wordlists must be encoded using UTF-8 with NFKD normalization.

From Mnemonic to Seed

The mnemonic sentence is converted into a seed used as the basis for private key derivation. An optional passphrase may provide an additional layer of protection, but must also be backed up correctly.

  • Encode the mnemonic and passphrase using UTF-8 NFKD.
  • Use the mnemonic as the password and the string mnemonic followed by the passphrase as the salt.
  • Apply PBKDF2 with HMAC-SHA512, 2,048 iterations, and a 512-bit (64-byte) output.

The resulting seed can be used with BIP-32 to derive an HD wallet.

Seed derivation is independent of mnemonic generation, keeping the implementation simple and modular. Alternative wordlists or sentence-generation methods are possible at the derivation layer, but implementations should validate the mnemonic checksum and warn when it is invalid.

Each passphrase produces a valid seed, allowing plausible deniability. A third party who does not know the correct passphrase cannot simply identify the intended wallet from the mnemonic alone. The protection depends on passphrase strength.

Many BIP-39 wallets support only the English wordlist, so generating mnemonics with localized lists is strongly discouraged for interoperability reasons. If another language is necessary, use an officially defined BIP-39 wordlist rather than creating a custom list.

Citation

This BIP falls under the MIT License.

Conclusion

BIP-39 encodes randomly generated entropy as mnemonic words and derives a binary seed, making wallet recovery more manageable while preserving the underlying cryptographic randomness.

Further reading and author links:

https://chaldene.net/