Chaocipher
The Chaocipher is the most famous hand cipher ever to resist the professionals. John F. Byrne invented it in 1918, spent decades insisting it was unbreakable, offered it to the US Navy, and finally published it in his 1954 autobiography Silent Years with a challenge text that defeated solvers for a generation. Its machinery is two alphabets that rewrite themselves after every single letter — a cipher machine made of nothing but paper, whose state depends on everything enciphered so far. This tool runs Byrne's exact published algorithm, and it opens on his own challenge plaintext: the ciphertext it produces is the one he printed, reproduced letter for letter by the engine below.
The Chaocipher is a permuting-alphabet substitution. Two alphabets stand side by side — left (cipher) and right (plaintext): a letter is enciphered by finding it in the right alphabet and reading off the letter at the same position in the left. After every letter, both alphabets are permuted by fixed rules driven by the letter pair just used, so the effective alphabet for each letter depends on the entire preceding message. The key is the pair of starting alphabets.
Byrne's system, 1918. Not a rotor machine — the "machine" is the permutation rule, and it runs on paper.
Encode or decode — Byrne's challenge is the default
Everything runs in your browser — nothing is uploaded.
Two alphabets that never sit still
To encipher a letter, find it in the right alphabet and read off the letter at the same position in the left. Then both alphabets permute before the next letter. The left alphabet rotates so the letter just written comes to the top (the "zenith"), and its second letter is lifted out and dropped into the fourteenth place (the "nadir"). The right alphabet rotates so the plaintext letter just used comes to the top, that top letter moves to the very end, and its third letter is lifted into the fourteenth place. Decoding runs the identical permutations — driven by the same letter pair — with the lookups swapped, which is why the two sides stay in step.
The keys are the two initial alphabets, and they must be true permutations: 26 letters, each exactly once, or the cipher cannot be run backwards and the tool refuses by name. Letters only survive; spaces and punctuation are dropped. Change one letter of either starting alphabet and everything downstream changes: the key is not a mapping but a starting state.
The machine that wasn't there
John F. Byrne invented the system in 1918 and built it into a small box of rotating alphabet disks, spending years trying to sell it to the US government, certain that a system whose alphabets never sit still could not be broken. The Navy declined. Byrne published the method and a challenge text in his 1954 autobiography Silent Years and took the full secret of his claims to his grave in the belief that it had never been solved. He was wrong only in the way that matters least: once Moshe Rubin published a complete analysis in 2010–11, with the family releasing Byrne's papers, the system yielded to known-plaintext attacks and computer search. Measured by its era's standards the claim was nearly honest — against pencil-and-paper cryptanalysis the Chaocipher was a genuine fortress.
The classic starting alphabets
| Left (cipher) | HXUCZVAMDSLKPEFJRIGTWOBNYQ |
|---|---|
| Right (plaintext) | PTLNBQDEOYSFAVZKGJRIHWXUMC |
| First step | W stands at position 22 of the right alphabet; the left alphabet's 22nd letter is O — the challenge ciphertext begins O |
| Permutation | Left: rotate cipher letter to top, move 2nd letter to 14th · Right: rotate plaintext letter to top, move it to the end, move 3rd letter to 14th |
Encode EEEEEEEEEEEE in the tool and watch twelve different cipher letters come out — MAVZCUXHQYNB. The same plaintext letter never meets the same alphabet twice.
Byrne's own challenge, reproduced
Example 1 — the 1954 challenge text
This is not a toy example — it is Byrne's published challenge. With the classic alphabets prefilled above, W is found at position 22 of the right alphabet, and the left alphabet's 22nd letter is O: the ciphertext begins O. Both alphabets then permute, so the second letter, E, is enciphered by two alphabets that no longer resemble the first pair — and the whole text emerges as OAHQHCNYNXTSZJRRHJBYHQKSOUJY, exactly the ciphertext Byrne printed in 1954 (documented in Jeff Calof's and Moshe Rubin's analyses of the system). Decode it above and the challenge plaintext returns. The tool's default state is this example.
Unbroken by hand, broken by computer
Classical attacks starve here: there is no period to find by Kasiski, no fixed mapping for frequency analysis, and two messages under the same starting alphabets share nothing exploitable beyond their first letters. What broke the system, in Rubin's 2010–11 analysis, is known plaintext: a few dozen known letters constrain the alphabets' evolving state enough for computer search to unravel it, and ciphertext-only attacks on long messages followed. The honest summary is the one on this page's fact card: a fortress against the hand methods of its era, a solved system against modern computation.
- Security status: historically remarkable; not secure today, and never for real secrets.
- What gives it away: known plaintext — the state is driven by the message itself, so a crib steers the search.
Self-modifying company
| Relative | How it differs | Solve it with |
|---|---|---|
| Autokey | The key stream evolves too, but arithmetically: the plaintext itself becomes the Vigenère key after a primer | The Autokey page |
| Enigma | Rotors step mechanically so the substitution alphabet changes per letter — the same instinct, electrified, with a reflector making it reciprocal | The Enigma page |
| Solitaire | A deck of cards evolves to generate a keystream — a modern hand system built on a moving state | The Solitaire page |
An autokey at the level of alphabets
Most classical ciphers separate the key from the message: the key is a word, the message flows under it. The Chaocipher fuses them. Because each permutation is driven by the plaintext letter just enciphered (and its cipher partner), the effective alphabet for letter n is a function of the entire preceding message — change the first letter of a text and every ciphertext letter after it changes too, the property engineers now call error propagation when it hurts and diffusion when it helps. Its core idea — the key evolving with the message — is the idea every modern stream cipher also lives on, which is why this 1918 paper system belongs in the catalogue's deepest drawer and in every serious history of the subject.
Decode with the classic alphabets
Practice 1 — decode PHESOLASBCSW
Leave both alphabets at the classic pair, switch the tool to Decode, and paste the ciphertext. Remember the permutations run identically — only the lookups swap.
Reveal the answer
ATTACK AT DAWN.
Frequently asked questions
Is the Chaocipher really unbreakable?
No — not since Rubin's 2010–11 analysis. Known-plaintext attacks recover the alphabets' state from a modest crib, and long ciphertexts yield to computer search. What remains true is the historical claim: it resisted the best hand methods of its era for decades, which no other paper system of 1918 can say.
Can I use my own starting alphabets?
Yes — any two true permutations of A–Z. The tool validates them strictly: a missing or doubled letter makes decoding impossible, so it refuses by name and tells you what is wrong, rather than running a one-way cipher.
Why does the same letter encrypt differently every time?
Because the alphabets permute after each letter, driven by the letters themselves. The E at position 2 and the E at position 20 face completely different alphabet pairs — the whole design, and why frequency analysis gets nothing to hold. Twelve E's in a row come out as twelve different letters.
Why did the Navy decline it?
The historical record shows offers and refusals without a single stated reason; complexity of operation and the era's preference for machine systems are the usual readings. This page states the documented part — Byrne offered it, the Navy declined — and leaves the motive as the open question it is.