HomeGuides › Classical ciphers

Classical ciphers, explained and broken

These ciphers protected state secrets for centuries. A laptop breaks all of them in under a second, and seeing how is the most useful part.

Classical ciphers are worth understanding precisely because they fail. Each one embodies an idea that felt sufficient at the time, and each is defeated by a specific observation. Watching that happen builds an intuition for why modern cryptography is built the way it is.

None of these protects anything against anybody. They are for puzzles, teaching and curiosity. For real protection use text encryption.

The ciphers

Why substitution fails: letters keep their habits

Replacing every E with a Q does not hide that the language uses E constantly. The most common letter in the ciphertext is very likely the most common letter in the language. The tool scores candidate decryptions by how English-like the letter distribution is, tries every Caesar shift, and shows the winner — the entire attack, in a fraction of a second.

Why Vigenère fell

Vigenère resists that attack because one ciphertext letter can stand for several plaintext letters. Its weakness is that the key repeats. Find the key length and the message decomposes into several Caesar ciphers, each solvable individually.

The index of coincidence measures how often two letters picked at random are the same — about 0.067 for English, about 0.038 for random text. Slice the ciphertext by a candidate key length; when you hit the right one, each slice starts looking like English by that measure. The tool computes this and shows the likely lengths.

What this teaches about modern ciphers

Every one of these leaks structure. Modern ciphers are designed so the output is statistically indistinguishable from random regardless of the input, which is why no amount of letter-counting helps. That property is the whole game, and it is why "I invented a cipher" is a claim to be treated with enormous suspicion — including by the person making it.

Frequently asked questions

Can I use these to protect something?

No. All of them are broken in well under a second by the tool on the same page. They are for puzzles and for understanding how cryptanalysis works.

Why is Vigenère called unbreakable in old books?

It resisted frequency analysis, which was the only known technique for centuries. Once Kasiski and others showed how to recover the key length in the 1860s, it decomposed into several Caesar ciphers and fell.

Is ROT13 encryption?

No. It is Caesar with a shift of 13 and no key at all. It is used to hide spoilers from casual glances, nothing more.

Open the cipher playground →