Skip to main content

crypto · published

Mnemonic Phrases

Derived from entropy

By Zachary RothUpdated 3 min read

To use a blockchain, you need a wallet.

To use a wallet, you need a mnemonic phrase.

Mnemonic phrases are the backbone of self-custody and enable what is known as the hierarchical deterministic (HD) wallet. The chain of custody runs: the mnemonic phrase encodes randomness, that randomness is stretched into a binary seed, the seed produces a master key, and the master key derives a whole tree of private keys - each with its own public key, and each public key with its own address, the label you see for an account on a blockchain.

If you send funds to another wallet, you need the address.

If you want to recover your funds, you need the mnemonic phrase or the relevant private key.

Modern wallets are built on top of this concept and introduce layers of abstraction to make accessing and managing your wallet more user-friendly.

History

The concept of mnemonic phrases was introduced and standardized through Bitcoin Improvement Proposals (BIPs), specifically BIP-39.

These proposals have had a lasting impact across blockchain ecosystems, with many other networks, including Ethereum and Solana, adopting similar standards.

How Mnemonic Phrases Work

ProcessDescription
GenerationA wallet creates a random sequence of words from a predefined list.
ConversionThe phrase is converted into a binary seed through key stretching.
Key DerivationThe seed generates the master private key.
Address CreationChild keypairs are derived from the master key; addresses come from the public halves.
VersatilityA single phrase can access multiple accounts across various cryptocurrencies.
SecurityProperly stored phrases provide strong protection against unauthorized access.

Key Components

Mnemonic Phrase: encodes the entropy everything grows from; DO NOT SHARE Seed: the binary value stretched out of the phrase; wallets handle it internally Private Keys: derived from the seed's master key; DO NOT SHARE Public Keys: each private key has exactly one; safe to share Addresses: derived from public keys; shorter, more user-friendly, safe to share

Mnemonic Phrases

A mnemonic phrase is a 12-24 word sequence from which a wallet derives its keys.

It is the most common way to access a wallet and has been the standard for many years.

One day, it won't be the majority method, but until then, it's important to understand how it works.

Private Keys

A private key is a unique code granting access to a digital wallet containing cryptocurrencies, NFTs, and other digital assets.

It's comparable to a safe-deposit box key or email password.

Access is typically through mnemonic phrases or keystore files, although there are a handful of abstraction methods that allow for more flexibility, such as backing up your wallet to iCloud or using Gmail as the login method.

Public Keys

Public keys are derived from private keys using elliptic curve cryptography - the math runs one way, so a public key can be shared without revealing the private key behind it. Addresses are in turn derived from public keys and are what you see as the account label for each wallet; the public key itself is rarely used directly other than to generate the address.

Addresses

You use these account details to move assets around on the chain. Vanity addresses exist, where a machine brute-forces candidate keys until the derived address contains specific characters in a specific sequence.

Some addresses also have human-readable proxies, so users can transfer to zachtos.apt (powered by Aptos Name Service) instead of to the raw address that was derived from the private key (and then the public key) above.

Technical Implementation

The BIP-39 Process

Entropy – or randomness – is generated in multiples of 32 bits, from 128 up to 256 bits. A checksum is appended: the first few bits of the entropy's SHA-256 hash (one checksum bit per 32 bits of entropy, so 4 bits for a 12-word phrase).

The combined string is split into 11-bit groups, and each group encodes a number from 0-2047 - an index into the standardized 2048-word list. That is why phrases come in lengths like 12 or 24 words, and why a mistyped phrase is usually caught: a wrong word breaks the checksum.

The sentence is then converted into the binary seed using the PBKDF2 function (2048 rounds of HMAC-SHA512), which slows down brute-force attacks.

BIP-39 also allows an optional passphrase - sometimes called a "25th word" - mixed in at this step. It's a double-edged tool: it creates an entirely different wallet per passphrase, which adds protection if the phrase is found, but funds behind a passphrase cannot be recovered from the phrase alone. If you use one, it needs the same care as the phrase itself. Wallet support also varies - restoring a phrase in a different wallet app can surface empty accounts until the matching passphrase and derivation path are used.

BIP-32 & BIP-44

BIP-32's hierarchical deterministic framework lets the master key derive a practically unlimited tree of child keypairs - each child private key paired with its own public key - while standards like BIP-44 organize the derivation paths so multi-asset wallets know where to look.

Each private key still unlocks exactly one public key; the abundance comes from the tree, not from any single key.

Accessing derivation paths beyond a wallet's default settings is unnecessary for most users.

Wallet interfaces typically handle path specifications automatically or offer optional customization.

Managing multiple assets would be cumbersome if each token required manual derivation path input.

Final Thoughts

Before BIP-32 and 44, managing wallets meant separately backing up every keypair - burdensome and error-prone enough to keep non-technical people out.

Once BIP-32, 39, and 44 were widely implemented, users could access nearly a limitless number of digital assets (tokens and NFTs) from one user-friendly mnemonic device.

Thank you BIP-32, 39, and 44.

Further Reading