The Chaocipher was invented by John Francis Byrne in 1918. He spent decades trying to interest cryptographers in it, claiming it was unbreakable, but never revealed how it worked. The mechanism stayed secret until 2010, when his estate donated his papers and his son’s exposition to the National Cryptologic Museum. This simulator runs that published algorithm faithfully.
How it works
The cipher keeps two 26-letter alphabets, pictured as wheels. The left wheel is the cipher alphabet and the right wheel is the plain alphabet. To encipher a letter:
- Find the plaintext letter on the right wheel. The letter at that same index on the left wheel is the ciphertext (decryption swaps the roles of the two wheels).
- Permute both wheels so the substitution changes for the next letter.
The permutation is the clever part. Using the index where the match was found:
- Left wheel: rotate it so the matched letter is at the top, then remove the letter now sitting just below the top and reinsert it further down the wheel (at the so-called nadir position).
- Right wheel: rotate so the letter after the matched letter leads, then remove a letter from a fixed position and reinsert it further down.
Because both wheels move after every character, the same plaintext letter rarely maps to the same ciphertext letter twice — a property called dynamic substitution.
Example
Starting wheels HXUCZVAMDSLKPEFJRIGTWOBNYQ (left) and PTLNBQDEOYSFAVZKGJRIHWXUMC (right), the famous test message:
WELLDONEISBETTERTHANWELLSAID
encrypts to:
OAHQHCNYNXTSZJRRHJBYHQKSOUJY
Switching this tool to decrypt with the same two starting wheels recovers the original message.
Notes
- Only letters A–Z are processed; spaces, digits and punctuation are dropped, so format your message in letter blocks if you need spacing.
- The full secret key is the pair of starting wheel arrangements — there are an astronomical number of possible pairings.
- Any letters you leave out of a wheel are appended in normal alphabetical order, so a partial entry still produces a valid 26-letter wheel.