§ 04

§ 04 · Keys & addresses

Mnemonic and seed

Twelve words that rebuild every key

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.

Seed words

12 words → seed → keys → prl1 addresses, the way Oyster does it

Never type a real seed phrase into any website, this one included. Anyone with your 12 words owns your coins. This tool is for learning: use the test words or a phrase it generates, and never send funds to these addresses.

Network
Hardened derivation

Valid: 12 known words and the checksum matches.

  1. 1

    Words → bits 11 bits each

    Each word is a position in a list of 2,048 (2¹¹). 12 × 11 = 132 bits: 128 random bits, then 4 bits of checksum.

    1. 1abandon 00000000000
    2. 2abandon 00000000000
    3. 3abandon 00000000000
    4. 4abandon 00000000000
    5. 5abandon 00000000000
    6. 6abandon 00000000000
    7. 7abandon 00000000000
    8. 8abandon 00000000000
    9. 9abandon 00000000000
    10. 10abandon 00000000000
    11. 11abandon 00000000000
    12. 12about 00000000011

    Entropy (128 bits): 0000000000000000…00000000 · checksum = first 4 bits of SHA-256(entropy) = 0011, matching the last 4 bits of word 12.

  2. 2

    Seed 64 bytes

    PBKDF2-HMAC-SHA512(words, “mnemonic”, 2,048 rounds)

    5eb00bbd dcf06908 4889a8ab 91555681 65f5c453 ccb85e70 811aaed6 f6da5fc1 9a5ac40b 389cd370 d086206d ec8aa6c4 3daea669 0f20ad3d 8d48b2d2 ce9e38e4

    2,048 rounds make each guess slow on purpose. Pearl wallets use no extra passphrase.

  3. 3

    Master key m

    HMAC-SHA512(“Bitcoin seed”, seed) → private key ‖ chain code

    private key
    1837c1be8e2995ec11cda2b066151be2cfb48adf9e47b151d46adab3a21cdf67
    chain code
    7923408dadd3c7b56eed15567707ae5e5dca089de972e07f3b860450e2a3b70e
    fingerprint
    73c5da0a

    The HMAC key is still the text “Bitcoin seed”, unchanged from Bitcoin.

  4. 4

    Down the path m/86'/808276'/0'/0/i

    1. mmaster73c5da0a
    2. 86'purpose: BIP-86 Taproot4e83b613
    3. 808276'coin: “PRL” as decimal ASCIIf124e0d0
    4. 0'account 073bf7af8
    5. 0receive (1 = change)edfa853f

    An apostrophe means hardened: the child is made from the parent’s private key, so the parent’s public key can’t derive it, and a leaked child key can’t expose the parent.

  5. 5

    Account key zpub

    The public half of m/86'/808276'/0', as Oyster shows it (zprv for the private half). It can make every address without being able to spend.

    zpub6s66goCpFBSqGDZyyD6a1Xf8C5TseQYcPFQNpjMzFeTCZpZD6ShaEzAKqv8tDiv81N1RmPyRTu1D65iQv59c7wHZyCbQmnaARE7P6UFNJeG

  6. 6

    First receive addresses BIP-86 Taproot

    1. /0/0prl1pr6yuq8u2r95wjzzgpdy8cpnncpl7l8zgy6x5q0367pnc53s2famqg7pt74
    2. /0/1prl1pyx3nlscz8rvsxqhcjtyqt2g5szuk9ss7m5saszu3afwwhvn9zp2sz62rhm
    3. /0/2prl1pfrfqcvcmghjc3mpsazm9p9ktttyuewzlfmn40dzkwh0muejgkr3sfx9jwd
    4. /0/3prl1prmdvgxfgzmqzq5dj58enw6y7c55wpsfdpr0af7t79x65z6gmms8q4qa93j
    5. /0/4prl1pc9xyu484gw5wsnq7hg00733jlcr4ethphyxmavynyl8me0q7ec7q6qu3wx

Oyster and standard BIP-32 give the same addresses for this phrase, as for almost every phrase. Try “A phrase where Oyster differs”.

Runs in your browser · nothing is sent or saved src/lib/hd.ts · keys.ts · bech32m.ts

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.

128 random bits+4 checksum bits=132=12×11128 \text{ random bits} + 4 \text{ checksum bits} = 132 = 12 \times 11
  1. Draw 128 random bits

    The entropy. Pearl’s wallet asks the operating system for 16 random bytes.
  2. Add a checksum

    Hash the entropy with SHA-256 and take the first 4 bits. Append them: 132 bits.
  3. Cut into 11-bit groups

    12 groups, each a number from 0 to 2,047.
  4. 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 PBKDF2 with HMAC-SHA512 2,048 times over the words:

seed=PBKDF2(HMAC-SHA512, password=the 12 words, salt=𝚖𝚗𝚎𝚖𝚘𝚗𝚒𝚌∥passphrase, 2048, 64 bytes)\text{seed} = \text{PBKDF2}\big(\text{HMAC-SHA512},\ \text{password} = \text{the 12 words},\ \text{salt} = \texttt{mnemonic} \parallel \text{passphrase},\ 2048,\ 64 \text{ bytes}\big)

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 seed 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 --create and 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:

JavaScript
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 ''

The codex

Suggested

Up and down arrows move through the results, Enter opens one, Escape closes. Anywhere on the site, slash or Command K opens this search, and the square brackets [ and ] go to the previous and next page.