§ 04 · Keys & addresses
Mnemonic and seed
Twelve words that rebuild every key
On this page 6 sections
Your 12 words are not a password. They are your wallet’s random number, written in a form people can copy by hand without mistakes.
Every private key the wallet will ever use is computed from them, in a fixed order. Lose the computer, keep the words, and you can rebuild everything. Let someone else see the words, and they can rebuild everything too. That’s the whole story; the rest of this page is the arithmetic.
Try it
Generate a phrase, or type the test phrase, and watch the seed, the keys and the first addresses appear.
How do 12 words hold a random number?
Through a fixed list of 2,048 English words. 2,048 is 2¹¹, so each word stands for exactly 11 bits.
-
Draw 128 random bits
The entropyEntropy: The random bits a wallet starts from. A Pearl wallet draws 128 random bits, which become 12 words; everything else is computed from them.. Pearl’s wallet asks the operating system for 16 random bytes. -
Add a checksum
Hash the entropy with SHA-256 and take the first 4 bits. Append them: 132 bits. -
Cut into 11-bit groups
12 groups, each a number from 0 to 2,047. -
Look up the words
Each number picks a word from the English list (abandon = 0, ability = 1, able = 2, about = 3, …).
Worked example: the test phrase
The BIP-39 test vector uses all-zero entropy. It is published everywhere, so it is the least safe phrase in the world. Here is how it comes out:
| Step | Value |
|---|---|
| Entropy (16 bytes) | 00000000000000000000000000000000 |
| SHA-256 of the entropy | 374708fff7719dd5979ec875d56cd2286f6d3cf7ec317a3b25632aab28ec37bb |
Checksum: first 4 bits of 3… |
0011 |
| Groups 1–11 | 00000000000 × 11 = 0 → abandon |
| Group 12 | 0000000 (last entropy bits) + 0011 = 3 → about |
| Phrase | abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about |
Make a guess
If you pick the 12th word at random, how often does the phrase still pass the checksum?
Think of your answer first, then check it.
Answer 1 time in 16.
The last word’s 11 bits are 7 bits of entropy and 4 bits of checksum. Only the words whose last 4 bits match SHA-256 of the entropy pass. With all-zero entropy, exactly 128 of the 2,048 words work as a 12th word. So a wallet catches most slips, but not every one: always double-check your copy.
How do the words become a seed?
With a deliberately slow function. BIP-39 runs PBKDF2PBKDF2: A deliberately slow way to turn a password into a key by hashing it thousands of times. BIP-39 runs it 2,048 times with HMAC-SHA512 to turn the 12 words into a 64-byte seed. with HMACHMAC: A hash that takes a secret key as well as a message. HD wallets use HMAC-SHA512 to make each child key and chain code; the master key uses the fixed key "Bitcoin seed".-SHA512 2,048 times over the words:
The words go in as plain text, joined by single spaces. On Pearl the passphrase is always empty, so the salt is just the 8 letters “mnemonic”. For the test phrase:
5eb00bbddcf069084889a8ab9155568165f5c453ccb85e70811aaed6f6da5fc19a5ac40b389cd370d086206dec8aa6c43daea6690f20ad3d8d48b2d2ce9e38e4
- Size
- 64 bytes
- Type
- BIP-39 seed
- Format
- PBKDF2-HMAC-SHA512 output
That 64-byte seedSeed: The 64-byte number computed from your 12 words. Every private key and address in your wallet is derived from it, so backing up the words backs up everything. is what the wallet actually uses. The next step, turning it into a master key with HMAC-SHA512 and the key “Bitcoin seed”, is on the extended keys page.
What do Pearl wallets do differently?
The format is standard BIP-39. The habits around it are Pearl’s own:
- Always 12 words.
oyster --createand the desktop wallet both generate 128 bits of entropy. 24-word phrases are never created. - Imports are more flexible. The desktop wallet’s import screen accepts 12, 15, 18, 21 or 24 English words (checksum checked), or a raw hex seed.
- No passphrase. Every seed computation in Oyster passes an empty passphrase. There is no “25th word” option anywhere.
- English only. The word list is never changed from English.
- A short quiz. After showing the phrase, the desktop wallet asks you for words 3, 7 and 12 before it continues.
Will my words work in another wallet?
In Pearl’s own wallets, yes: Oyster, oystercli and the desktop wallet all derive the same addresses from the same words.
Elsewhere, be careful. A generic “BIP-86 wallet with coin type 808276” will match Pearl for most seeds, but not all. Oyster inherits an old quirk in hardened key derivation that gives different addresses for about 0.8% of seeds. The derivation paths page shows a real phrase where the two disagree.
Going deeper Restoring quantum-safe addresses
If you ever asked Oyster for a quantum-safe address (getnewaddress … pq=true), note an open question. Reading the
v1.5.2 code, the recovery scan after a fresh restore derives plain addresses only, so it may not find coins sent to a
pq address. This hasn’t been tested on a live chain. The desktop wallet never makes pq addresses, so most users are
unaffected.
How should you store the words?
- Write them on paper or metal, in order, spelled exactly. Not in a photo, a cloud note or an email.
- Never type them into a website, a chat, or a form that “verifies your wallet”. No one from Pearl will ever ask for them.
- Keep them as safe as the coins. Anyone who reads them owns the wallet, from anywhere, without your computer.
Code: phrase and seed in JavaScript
With @scure/bip39, the library this site’s tools use:
import { generateMnemonic, mnemonicToSeedSync, validateMnemonic } from '@scure/bip39';
import { wordlist } from '@scure/bip39/wordlists/english.js';
const words = generateMnemonic(wordlist, 128); // 12 words, like a new Pearl wallet
validateMnemonic(words, wordlist); // true
const seed = mnemonicToSeedSync(words, ''); // 64 bytes; Pearl's passphrase is always ''