XOR splitting turns one seed into N phrases. Each one is a complete, valid BIP-39 phrase of the same length as the seed. Put all N together and you get the seed back. Hold any N minus 1 of them and you know nothing about it. Our page on splitting a seed across places sets XOR beside Shamir shares and the words-plus-passphrase split. This page covers what happens to the bits, why the scheme is as strong as it is, how to do it with a pencil, and how it goes wrong.
We use the public example seed throughout:
pizza educate fat kiss domain venue kingdom raise split step copper tree (this phrase is public: never use it for real funds)
Hiding is not encrypting. The ciphers are public and a seed phrase carries its own checksum, so a list someone recognises as a seed can be tried against every cipher in minutes. Add a BIP-39 passphrase to the wallet and keep it somewhere else.
XOR splitting is the exception on this site's cipher shelf: done properly, a single part gives a thief nothing to try. The passphrase advice still stands, because the parts are only as safe as the places you keep them.
What XOR does
XOR (exclusive or) compares two bits. Equal bits give 0, different bits give 1. Two facts make it useful here:
- Anything XOR-ed with itself is 0, and anything XOR-ed with 0 is unchanged. So if C = S ⊕ A ⊕ B, then A ⊕ B ⊕ C = S.
- Order doesn't matter. You can combine the parts in any sequence.
For more than two numbers, take each bit column and count the 1s. An odd count gives 1, an even count gives 0.
XOR the entropy, not the words
A BIP-39 phrase is entropy plus a checksum. The spec: take the entropy, append "the first ENT / 32 bits of its SHA256 hash", and cut the result into 11-bit groups, "each encoding a number from 0-2047", one word per group.
| Phrase | Entropy | Checksum | Last word holds |
|---|---|---|---|
| 12 words | 128 bits | 4 bits | 7 entropy bits + 4 checksum bits |
| 24 words | 256 bits | 8 bits | 3 entropy bits + 8 checksum bits |
So in a 12-word phrase the first 11 words are pure entropy (121 bits) and the twelfth is mixed. That decides how the split works:
- Make N minus 1 random parts: 128 random bits each for a 12-word seed.
- XOR the seed's 128 entropy bits with all of them. The result is the entropy of the last part.
- For every part, compute its own checksum from its own entropy and write it as a 12-word phrase.
Step 3 is why each part's last word looks unrelated to the others. If you XOR the twelfth words of the parts as whole 11-bit numbers, the first 7 bits come out right, because they are entropy. The last 4 bits are XOR-ed checksums, and the XOR of three hashes is not the hash of the XOR. We split the example seed three ways and XOR-ed the three final words. We got 1,842 (11100110010). The seed's real last word, tree, is 1,855 (11100111111). The first seven bits, 1110011, match. The checksum bits don't, and they will match in only one split out of 16.
Recovery runs the same way in reverse. XOR words 1 to 11, XOR the top 7 bits of word 12, then recompute the checksum from the 128 bits you now hold.
Why N minus 1 parts reveal nothing
This is the one-time pad. Shannon defined perfect secrecy in 1949: after the enemy intercepts the cryptogram, the probabilities the enemy assigns to each possible message are "identically the same as the a priori probabilities" before he saw it. He proved it needs at least as many possible keys as possible messages, and noted that the Vernam system, a pad combined bit by bit, achieves it.
Apply that to a thief holding two of your three parts. For any seed they care to guess, exactly one value of the missing part makes the XOR come out to that guess. The missing part was drawn uniformly from 2128 values, so every guess is equally consistent with what they hold. They have learned nothing, and more computing power doesn't change that. It holds for any N minus 1 parts, the last part included: the seed XOR a uniform random value is itself uniform.
The proof depends on the random parts being random:
- Make them with coins or dice, or on an offline device you trust. 2,048 is 211, so eleven coin flips make one word index, and seven more make the top of word 12.
- Never use a phrase you thought up, a phrase from a book, or a wallet you already use.
- Never reuse a random part for a second seed. Two final parts made from the same random parts XOR to the XOR of the two seeds, which is the mistake that broke the reused Soviet pads (our one-time pad page has the history).
Every part is a decoy
Because each part carries its own correct checksum, any BIP-39 wallet accepts it and opens an ordinary empty wallet. Nothing in a part says it is one of three. Someone who finds one part sees a seed, restores it, and finds a wallet with no history. Whether to leave a small balance in one of those wallets to make it convincing is a question for the decoy wallets page.
Doing it on paper
You can do all the XOR by hand. Write each word's index (0 to 2047) as 11 bits and XOR the columns. Here is word 1 of a three-part split of the example seed. The seed word is pizza, index 1,325. The random parts were flipped for this page: 1,730 and 402.
| Row | Index | Bits |
|---|---|---|
| Part A (random) | 1,730 | 11011000010 |
| Part B (random) | 402 | 00110010010 |
| Seed word 1 | 1,325 | 10100101101 |
| Part C = A ⊕ B ⊕ seed | 637 | 01001111101 |
To check, XOR the three parts: 11011000010 ⊕ 00110010010 ⊕ 01001111101 = 10100101101, which is 1,325, pizza. Look up each result in the BIP-39 English list, counting from 0 (line 1 of the file is index 0).
Do that for words 1 to 11. For word 12, XOR only the top 7 bits. That leaves the checksum, which is a SHA-256 hash, and SHA-256 is not a pencil job. Give the 11 words and 7 bits to an offline device that can compute the final word. Only one of the 16 possible endings is valid, so the device's answer is unique. Never do any of this on a web page or an online tool, including ours.
How it fails
One part lost
N-of-N means what it says. Lose one part and you hold N minus 1 random-looking phrases, which by the argument above tell you nothing. A fire, a moved box or a relative's clear-out is enough. Every part needs its own backup in a second place, and you should count those copies when you decide how many places you are trusting.
One part miscopied
Each part's checksum is your only error check. A 4-bit checksum means a random wrong word still passes about one time in 16. The combined result has no check of its own, because you recompute its checksum at the end. A wrong word in any part, or a slip in your column arithmetic, gives you a different valid seed that opens an empty wallet, with no warning. So:
- Check each part's checksum on an offline device before you put it away.
- Write down the real wallet's master fingerprint (eight hex characters, shown on the signer) on a separate card. It can't spend anything, and it tells you whether a recombined seed is the right one.
- After you split, recombine on a second offline device and confirm it gives the same wallet (test a backup).
The scheme forgotten
Your heirs find three seed phrases. Each opens an empty wallet. Nothing tells them to XOR them. Record, apart from the parts, that the seed is XOR-split, how many parts there are, how long each is, and where they are. Say XOR. Adding the word indexes mod 2,048 is also a one-time pad, and it gives a different answer.
When to choose XOR
A threshold scheme (Shamir, SLIP-39 and Codex32) survives losing shares. XOR doesn't. Pick XOR when:
- You want to keep an existing BIP-39 seed. The parts and the result are all standard BIP-39 phrases.
- You want every part to pass as an ordinary seed.
- You want to be able to check the arithmetic with a pencil.
- Theft worries you more than loss, and you will back up every part.
Pick a threshold scheme when losing a share is the likelier disaster, or when you can't keep a copy of every part.
What to do
- Make N minus 1 random parts with coins, dice or an offline device. Never reuse them.
- XOR the entropy, then give each part its own checksum.
- Verify every part's checksum and recombine once on a second offline device before funding.
- Store each part, and a copy of each, where one event can't reach two of them.
- Leave a note of the scheme, separate from the parts.
We will never ask for a seed word or a passphrase. Never type one into this site or any tool it links to.
Sources
- BIP-39: Mnemonic code for generating deterministic keys (entropy lengths, checksum as the first ENT/32 bits of SHA-256, 11-bit word groups)
- BIP-39 English word list (
pizzaindex 1,325,treeindex 1,855; the other indexes in the example) - C. E. Shannon, "Communication Theory of Secrecy Systems", Bell System Technical Journal 28(4), 1949, pp. 656–715, doi:10.1002/j.1538-7305.1949.tb00928.x (definition of perfect secrecy, key at least as large as the message space, the Vernam system)