Make a cipher, then break one — the 1,200-year duel of codemakers and codebreakers, in your hand. Tap the ▸ sections to go deeper. No app, no signup.
Shift every letter along the alphabet and you have a Caesar cipher. Give it a keyword and it becomes Vigenère. Type below and watch it scramble. 打字睇住佢變密碼。
Pick a number — the shift. Slide every letter that far down the alphabet: with shift 3, A→D, B→E, and Z→C (it wraps around). The disk above is a cipher wheel: turn the inner ring by the shift and each outer letter points at what it becomes.
There are only 25 useful shifts, so a Caesar cipher is trivial to break — you can just try all of them. Its real lesson is the shape of every cipher that followed: a public method plus a secret key.
In 1883 Auguste Kerckhoffs argued a cipher must stay secure even if the enemy knows exactly how it works — everything rests on the key. "Security through obscurity" (hiding the method) fails the moment the method leaks, and it always leaks.
Every modern cipher, including AES, follows this: the algorithm is public and studied worldwide; only the key is secret.
A Caesar cipher uses one shift, so its letter frequencies survive and it falls to frequency analysis. Vigenère uses a keyword to change the shift on every letter — the same plaintext letter encrypts differently depending on position. That flattens the frequencies and blinded codebreakers from the 1500s until Charles Babbage and Friedrich Kasiski cracked it in the 1800s by finding the key's length.
Every letter keeps its fingerprint. English leans hard on E, then T. Line the tallest bars up with English and type your guesses — the plaintext appears letter by letter. This message is a real substitution cipher. 逐個字母估,明文慢慢浮現。
The example letters (R, G, B, N) describe the first ciphertext. Pick any of the five above — the method is identical, only the mapping changes.
In Baghdad's House of Wisdom, Al-Kindi wrote the first known description of frequency analysis around 850 CE. His insight: a substitution cipher hides which symbol stands for a letter, but not how often it appears. Count the symbols, compare to a language's known letter frequencies, and the mapping unravels. One idea broke every simple cipher for the next 800 years.
In 1586 Mary plotted against Elizabeth I in letters enciphered with a substitution "nomenclator." Walsingham's codebreaker Thomas Phelippes broke them with frequency analysis — and forged a postscript to expose her fellow plotters. The decrypts were read at her trial. She was executed in 1587. Same technique you're using now.
Letter frequencies are only reliable on average. In a short message the counts wobble, so the tallest bar isn't guaranteed to be E and near-ties (like B vs N here) are genuine coin-flips. The more ciphertext you intercept, the closer the counts settle to their true frequencies and the fewer guesses you need. It's the same reason a poll of 10,000 people beats a poll of 10.
The plaintext of the ciphertext you picked is:
…
Work out the letter mapping yourself, or hit Guess by frequency and fix the near-ties.