Seed phrase: why nobody can guess the 12 words of a wallet
You set up a Bitcoin wallet and it shows you twelve ordinary English words, say ozone drill grab fiber curtain grace pudding thank cruise elder eight picnic. With them comes an instruction: “Write them down on paper and show them to nobody.” That list of words is called the seed phrase, or recovery phrase. Whoever knows it has your bitcoins; whoever loses it loses them.
Those twelve words are your whole wallet. A broken or lost phone does not matter: from the phrase you restore the wallet, money included, on another device. And the other way round: a thief who photographs the phrase needs neither your phone nor your PIN.
The money in Bitcoin is guarded by the private key, a secret number with about 78 digits, as the part on the Bitcoin address describes. But the phrase is not the key rewritten in words. It is a record of 128 random bits. From the phrase the wallet works out a seed and from the seed all the private keys and addresses. That is so many possibilities that nobody will guess the phrase if a computer draws it and not a person. The only exception is the optional extra password that some wallets can add; we will come to it at the end.
Words are numbers
First, the bit. A bit is the smallest piece of information: a zero or a one, like the result of a single coin toss. Any whole number can be written as a row of bits, because every number can be broken down into a sum of powers of two. For example, 13 = 8 + 4 + 1 is written as 1101: the positions from the right stand for 1, 2, 4 and 8, and a one says that that power is counted. You will find more about it in the article on converting between number systems.
At the start the wallet draws 128 random bits. It is like 128 coin tosses, each toss giving one bit. Why exactly 128? That many are enough to make guessing the phrase as much work as attacking the key itself, for which there is an attack taking about 2128 steps. More bits would not help.
Only then do the words come in: the wallet splits the bits into groups of eleven and rewrites each group as a word. For this it uses a list of exactly 2048 English words, arranged in alphabetical order from abandon to zoo. Each word has its position in the list, from 0 to 2047. And because
each position can be written with exactly eleven bits. The smallest position, 0, is 00000000000, and the largest, 2047, is 11111111111. So one word carries 11 bits.
Twelve words therefore come to 12 · 11 = 132 bits, four more than the wallet drew. Those four extra bits are the checksum, which we come to in a moment:
The picture breaks down the whole phrase from the introduction into bits. Each row is one word, and the number on the right is its position in the list. Ozone, for example, has position 1268, in bits 10011110100.
The phrase in the picture comes from a set of public test examples that programmers use to check that their wallet calculates correctly. It is therefore useless for real money: every reader of this article knows it.
The rules for phrases are set out in the public standard BIP 39 from 2013 (BIP stands for Bitcoin Improvement Proposal, a proposal of rules for Bitcoin), which many wallets follow. Besides twelve words it allows 15, 18, 21 and 24. The longest phrase carries 24 · 11 = 264 bits, of which 256 are random and 8 are check bits:
Every word in the list can be recognised by its first four letters alone, so it is enough to write pudd and it is clear that pudding is meant. There are lists in other languages too, for example Czech, but the standard does not recommend them: the same bits written with other words give a different wallet, and not all programs know such lists.
The seed phrase checksum
A checksum detects typos much as the last digit of a Czech birth number does (see check digits).
In a seed phrase the last bits are not worked out by division but by a hash. A hash is a short string of characters worked out from any data, the same one every time for the same data. It cannot be reversed, and even a tiny change in the input gives a completely different hash. Bitcoin uses the SHA-256 function; you will find more about it in the article on hash functions. The hash is worked out from the 128 random bits, that is, from 16 bytes (a byte is 8 bits), and the first four of its bits are taken as the checksum. That makes the last word differ from the others: eleven words carry 11 · 11 = 121 bits, so in the last word 7 random bits remain, followed by 4 check bits.
It is best seen in the simplest possible example. Suppose all 128 random bits came out as zero. The SHA-256 hash of all zeros begins with the characters 374708ff. Hashes are written with the characters 0–9 and a–f, and each character stands for four bits. The first character, 3, is 0011, and that is the checksum. The first eleven words are all zeros, so abandon eleven times, the word with position 0. The last word carries the last seven zeros and then 0011, altogether 00000000011, that is, position 3. The list begins with the words abandon, ability, able and about, so the whole phrase reads
abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about
This too is a well-known test example, so do not use this phrase either.
Why does a checksum catch a typo? Four bits can have 24 = 16 different values. If you replace one word with another from the list, the random bits change and their hash is completely different. Its first four bits agree with the old checksum only by chance, with probability
The wallet therefore detects fifteen typos out of sixteen. Try it on the phrase abandon … about: if you let a computer replace the sixth word in turn with each of the other 2047, 119 of them pass the check, just under 6%.
It can be put another way: when you know the first eleven words, 7 bits in the last word are free and four are fixed. There are therefore only 27 = 128 valid last words out of 2048. With 24 words, three free bits and eight check bits remain in the last word, so only 23 = 8 words fit, and a random typo gets through with probability 1/256.
Many typos, though, are stopped by the list itself. If you write pudink, there is no such word in the list and the wallet warns you at once. The checksum covers the worse case, where you slip and write a different real word, say grace instead of grab.
How big is 2 to the power of 128
So how many possibilities are there? Each bit can be a zero or a one, so 128 bits give 2128 different phrases. Written out in digits that is 340,282,366,920,938,463,463,374,607,431,768,211,456, 39 digits altogether, roughly 3.4 · 1038.
Take an attacker who tries one phrase after another and manages a billion billion, that is, 1018 a second. For all the possibilities they would need
A year has about 3.16 · 107 seconds, so what remains is to divide:
It comes to over ten thousand billion years. The universe is about 13.8 billion years old, so the attacker would need 781 times as much time as has passed since the Big Bang.
And we have even been generous to the attacker. Trying one phrase is much more work than calculating one hash, as we will see in the last section.
What can such a number be compared with? In an article from 2025 the European Space Agency estimates that there are roughly 1022 to 1024 stars in the universe. The number 2128 exceeds even the upper estimate by more than 3 · 1014 times.
And what about water? A litre of water has about 3.3 · 1025 molecules. How many litres of water have as many molecules as there are phrases?
That is about 10 cubic kilometres, a cube of water with an edge of over two kilometres. Only all the oceans together have more molecules than there are phrases: according to the US National Oceanic and Atmospheric Administration (NOAA), they hold about 1.335 billion cubic kilometres of water, that is, about 4.5 · 1046 molecules.
The axis in the picture is logarithmic: each labelled division is ten billion times bigger than the one below it, so numbers with 18 digits and with 78 digits both fit on it. The letter t stands for the age of the universe in seconds, about 4.4 · 1017. The number 1018 · t is how many phrases our attacker would have tried if they had begun right after the Big Bang. They are still short by a factor of 781. The star marks the stars in the universe and H₂O the water molecules in all the oceans.
A phrase of 24 words has 2256 ≈ 1.16 · 1077 possibilities, which is more than the molecules in all the oceans. At 1018 attempts a second, guessing would take about 3.7 · 1051 years. The wallet will not be any more secure for that, though: the attacker would attack the key itself instead of the phrase, and that holds out for only about 2128 steps, as the part on Bitcoin security discusses.
The weak point is the human
But all those giant numbers hold only if the bits are truly random. The standard stresses this right in its introduction: the phrase is meant to carry randomness produced by a computer, not to be used for sentences that a person makes up.
Why not? Because a human head is not a coin. A line from a favourite song or book does not have 2128 possibilities but only as many as there are lines people have ever written, and an attacker can run through a list like that. Even twelve words picked “at random” from your head are not random: people choose words that come to mind, popular, short ones, often related to each other somehow. An attacker can therefore try exactly such phrases first. As with passwords, it is not the maths that fails but the choice; the article on password security goes into it in more detail.
A made-up phrase runs into one more obstacle: fifteen times out of sixteen it fails the checksum, because a person cannot work out the last word. The standard therefore requires wallets to warn you when the checksum does not match.
A few rules follow from this:
- Always let the wallet draw the phrase; do not make one up.
- Show it to nobody, do not dictate it to anybody and do not enter it anywhere except the wallet you are restoring. No honest person will ask you for it, not support and not a “technician”. Whoever asks for it wants to rob you.
- Do not photograph it and do not store it in the cloud, in email or in a notes app on your phone. Keep it offline, if you like in several copies in different places, and protected from fire.
- Store the paper so that it does not get lost. Without the phrase and without the phone the coins are gone and no bank will return them, as the part on theft of a key recalls.
When you restore a wallet, it checks the words. If you make a mistake, thanks to the checksum it reports an invalid phrase and you can correct the error.
From one phrase thousands of addresses
One last question remains: how do twelve words become a private key? The wallet takes the words as text and adds to them, as salt, the word mnemonic (“an aid to memory”) and possibly an extra password too. It runs all of that through a mixing function that repeats the hash calculation 2048 times in a row. The result is 512 bits, called the seed. That is where the seed phrase gets its name: it is the origin of the seed from which the whole wallet grows.
For the phrase abandon … about without a password the seed begins with the characters 5eb00bbd and ends with ce9e38e4. That is why a wallet can be restored: the same words give the same seed and from it the same keys.
Those 2048 rounds are meant to slow down guessing. For you a fraction of a second when restoring a wallet does not matter, but an attacker who tries phrases one by one has to spend thousands of calculations on each. Websites use the same trick for passwords, see the section on passwords and salt.
From the seed the wallet then derives a whole tree of keys according to the BIP 32 standard. The root of the tree is written m, its children m/0, m/1, m/2 and so on, each with its own children. A single backup thus covers as many addresses as you like, so every payment can get a new one.
If a wallet offers an extra password, it is entered alongside the words when you set up or restore the wallet. Every password gives a valid seed, just a different one each time. Without the password, or with a wrong one, the same words therefore open a different, empty wallet. A thief who finds only the paper with the words cannot get at the money, provided the password cannot easily be guessed. But a forgotten password locks you out too.
See also
Chapters: Bitcoin: what it is and how it works, The Bitcoin halving: why there are only 21 million bitcoins, Bitcoin mining: how proof of work works, Blockchain and the Merkle tree: how it works and why history cannot be rewritten, The Bitcoin address, private key and signature, Seed phrase: why nobody can guess the 12 words of a wallet, Ethereum: smart contracts and proof of stake, Is Bitcoin secure? What its cryptography rests on, The 51% attack: can Bitcoin be spent twice?, Quantum computers and Bitcoin: what if elliptic curves fell, Bitcoin and SHA-256: what if the hash function fell, Post-quantum Bitcoin: how Bitcoin would defend itself against quantum computers