The Caesar cipher falls to a bored teenager with a pen — count the letters, find the most common one, assume it's E, done. For roughly three hundred years, cryptographers thought they'd fixed that flaw for good. Their fix was called le chiffre indéchiffrable — "the indecipherable cipher" — and it earned the name by beating every attack thrown at it from the 1500s until a Prussian infantry officer finally cracked it in 1863.
It's the same shift-the-alphabet idea as Caesar's cipher, run many times in parallel instead of once. That one change is enough to make single-letter frequency analysis useless — and understanding exactly why is the point of this article.
The keyword picks a different shift for every letter
A Caesar cipher shifts every letter by the same fixed amount. A Vigenère cipher shifts each letter by an amount that depends on a keyword, repeated over and over until it's as long as the message. Line the keyword up under the plaintext, letter for letter, and each pair tells you that position's shift — A shifts by 0, B by 1, up to Z by 25.
Encrypt ATTACK with the keyword LEMON (five letters, so it wraps once):
| Plaintext | A | T | T | A | C | K |
|---|---|---|---|---|---|---|
| Key letter | L | E | M | O | N | L |
| Shift | +11 | +4 | +12 | +14 | +13 | +11 |
| Ciphertext | L | X | F | O | P | V |
Notice the two Ts in ATTACK land on different key letters (E and M) and come out as different ciphertext letters (X and F). That's the entire trick. A Caesar cipher would encrypt both Ts identically, which is exactly the regularity frequency analysis latches onto. Run the same keyword over a full sentence and our Vigenère cipher tool turns Attack at dawn! into Lxfopv ef rnhr! — punctuation and spacing untouched, letters scrambled by a shift that keeps changing underneath them.
Twenty-six possible shifts sounds barely better than Caesar's twenty-five. It isn't. A five-letter keyword means a
5-letter repeating pattern of shifts, and the attacker doesn't know the keyword's length, let alone its letters — that unknown period is what turns "guess one number" into "guess one of26^5combinations."
Why counting letters stops working
Frequency analysis works on the Caesar cipher because every E in the plaintext becomes the same ciphertext letter, so the ciphertext's letter distribution is just the English letter distribution, shuffled. Vigenère breaks that assumption on purpose: an E at one position might get shifted by the key letter L, and an E three words later gets shifted by N. The ciphertext's overall letter frequencies flatten out toward uniform — which is exactly what our tool's frequency table shows for Vigenère output, versus the spiky, E-heavy distribution a Caesar-encrypted paragraph produces. Count letters in a long-enough Vigenère ciphertext and you learn almost nothing.
That held up for centuries against giants of cryptanalysis. Then someone stopped looking at single letters.
How it finally fell: Kasiski examination and the index of coincidence
The keyword repeats. That's the one fact frequency analysis on single letters can't see but pattern-matching on chunks of ciphertext can.
In 1863, Prussian officer Friedrich Kasiski published the general method: scan the ciphertext for repeated sequences of three or more letters. A repeat almost always means the same plaintext chunk lined up with the same stretch of key twice — and the distance between the two occurrences has to be a multiple of the keyword's length, because that's the only way the alignment repeats. Find several such repeats, take the greatest common divisor of their distances, and you've got a strong candidate for the keyword length. Once you know the length, the ciphertext splits into that many independent Caesar-shifted streams — every fifth letter, say, was all shifted by the same key letter — and each stream falls to ordinary frequency analysis.
Sixty years later, William Friedman sharpened the same idea into something that doesn't need a lucky repeat to show up at all: the index of coincidence, a single number measuring how likely two random letters from the ciphertext are to match. English text has a distinctive IC (around 0.067) because some letters dominate; a long random-looking stream has a much flatter IC (around 0.038). Split a Vigenère ciphertext into candidate key-length groups the way Kasiski's method does, and the correct length is the one where each group's IC looks like English again. Friedman's method finds the key length even in ciphertext too short or too well-behaved for repeated trigrams to show up on their own — which is why it's still the standard second pass after Kasiski's method today.
Neither technique reads a single letter of plaintext directly. Both are aimed at one target: recovering the keyword's length. Once that number is known, the "unbreakable" cipher is just several Caesar ciphers wearing a trench coat.
Two ciphers, one name
Here's the twist historians like to point out: the cipher that carries Vigenère's name isn't the one he invented. The repeating-keyword cipher above was published in 1553 by Giovan Battista Bellaso; Blaise de Vigenère's own 1586 design was a different, stronger construction where the key doesn't repeat at all — it extends itself using the plaintext (or the ciphertext) as it goes. History flattened the two into one name, and Bellaso's simpler cipher kept it.
| Repeating-key (Bellaso, 1553) | Autokey (Vigenère, 1586) | One-time pad | |
|---|---|---|---|
| Key length | Short, repeats | Starts short, then never repeats | Equal to the message, never repeats |
| Key source after the seed | The keyword again | The plaintext (or recovered plaintext) itself | True random data |
| Broken by | Kasiski examination / index of coincidence | Crib-dragging — guess a word, peel the key forward | Nothing, if the key is truly random and never reused |
The autokey version genuinely defeats Kasiski's method — there's no periodic repetition to measure, since the key is (almost) as long as the message and never cycles. It's not unbreakable, though: because the key stream is the plaintext shifted over, a cryptanalyst who guesses a common word anywhere in the message (a name, "the", "and") can use that guess to peel out the next few key letters, then the next chunk of plaintext, cascading through the whole ciphertext one crib at a time.
Our tool's auto-key checkbox is that historically "real" Vigenère cipher — the keyword only seeds the first few letters, then the key stream continues from the plaintext itself. Encode Attack at dawn! with keyword LEMON in standard mode and you get Lxfopv ef rnhr!; flip on auto-key and the same input becomes Lxfopk tm dcgn! — identical for the first five letters (the keyword hasn't run out yet), then diverging the moment the key stream switches from LEMON to the plaintext continuing underneath it.
Try both modes yourself
The gap between "looks unbreakable" and "is unbreakable" is easiest to feel by watching both ciphers side by side. Run the same sentence through the Vigenère cipher tool with a short keyword in standard mode, then again with auto-key switched on, and check the output letter-frequency table each time — standard mode still leaves faint periodic structure for a patient enough attacker; auto-key's frequency distribution is flatter and never repeats on a fixed cycle. If letter-shifting ciphers are new territory, the Caesar cipher is the single-shift version this whole family builds on, and the Atbash cipher shows the other direction substitution ciphers can go — a fixed mirror instead of a moving shift.
Three hundred years of "indecipherable" came down to one repeating pattern a Caesar cipher never had to hide, and one careful count of ciphertext letters. That's the whole history of classical cryptography in miniature: every clever scheme survives exactly until someone finds the pattern it forgot to hide.
Cover photo by cottonbro studio on Pexels.
