Ciphers people used before any of this was solved

Caesar, Atbash, Vigenère and the rest, with the transformation shown letter by letter. Every one of them is broken, and watching them break is the fastest way to understand what modern cryptography is actually doing.

HomeCryptography & Security › Classical Ciphers
None of these protects anything

Every cipher on this page was broken before computers existed, and today falls to a laptop in less time than it takes to read this. They are here to be understood, not used. If you need something unreadable to whoever holds it, use text encryption.

Processed locally in your browserNothing you enter here is uploaded, logged or sent to any server.

Substitution and transposition, which is the whole idea

Every classical cipher does one of two things, and most modern ones do both.

Substitution replaces each letter with another. Caesar, Atbash, Affine and Vigenère are all substitutions. Their weakness is that the structure of the language survives — E is the commonest letter in English, and after a simple substitution something is still the commonest letter, at about the same rate. Counting letters breaks them.

Transposition keeps the letters and changes their order. Rail fence and columnar transposition are transpositions. Counting letters tells you nothing, because the counts are unchanged — which is itself the giveaway that rearranging, rather than replacing, is what happened.

AES does both, repeatedly, in a way designed so that neither the letter counts nor the positions leak anything at all. That is the difference in one sentence: the ideas are the same, the execution is not.

Why Vigenère held out for three hundred years

Because it defeats letter counting. A single Caesar shift maps E to one fixed letter, so E's frequency shows up somewhere obvious. Vigenère uses a different shift for each position, so E becomes different letters in different places and the frequency profile flattens out. It was called le chiffre indéchiffrable and the name stuck for a long time.

It falls to one observation: the key repeats. If the key is five letters long, then every fifth letter was encrypted with the same shift — so splitting the ciphertext into five groups gives five ordinary Caesar ciphers, each solvable by counting. Finding the key length is done by index of coincidence, which the tool above will demonstrate on your own text.

The fix, in principle, is a key as long as the message, used once and never again — a one-time pad, the only cipher that is provably unbreakable and the only one that is almost never practical.

What ROT13 is actually for

Not secrecy. It was a convention on Usenet for hiding a punchline, a spoiler or an answer from being read by accident — a way of saying "you have to want to read this". It has no key, so it hides nothing from anybody who wants to look, and that was always understood.

It is included here because it is the clearest possible example of something that looks like encryption and is not, which is a distinction worth being able to make on sight.

Where these came from

Atbash is the oldest here, from Hebrew scribes around 500 BC — the alphabet reversed, used in the Book of Jeremiah. Caesar is first century BC and is described by Suetonius: Julius Caesar shifted by three.

Vigenère was published in 1553 by Giovan Battista Bellaso and misattributed to Blaise de Vigenère ever since. It was broken publicly by Friedrich Kasiski in 1863, though Charles Babbage had done it a decade earlier and not published.

Columnar transposition was still in military use into the twentieth century, usually applied twice with different keywords to make the rearrangement harder to unpick.

Using these in a classroom

The letter-by-letter trace is the point — it shows the substitution happening rather than only its result. For a group, encrypting a short message with Caesar and then breaking it with the twenty-five-key panel takes about five minutes and makes the idea of a key space concrete in a way that a definition does not.

The cipher puzzle generator produces printable sheets from these ciphers with answer keys, and cryptograms are the same idea as a game.

Related

Hash avalanche shows what a modern primitive does differently, and entropy explains what "twenty-five possible keys" means in the number that matters.

Questions people actually ask

Can I use these to protect something?

No. Every cipher on this page was broken before computers existed and falls to a laptop instantly. They are here to be understood. For anything that needs to stay private, use the text encryption tool, which uses AES-256-GCM.

Why is Vigenère breakable if it defeats letter counting?

Because the key repeats. If it is five letters long, every fifth letter used the same shift — so splitting the ciphertext into five groups gives five ordinary Caesar ciphers, each solvable by counting letters. The tool demonstrates finding that length on your own text using the index of coincidence.

What is the difference between substitution and transposition?

Substitution replaces letters; transposition reorders them. The tell is letter frequency: after a substitution the counts change, after a transposition they are identical to the original. That single observation tells a codebreaker which family they are looking at, and modern ciphers use both together in a way that leaks neither.

Why does the affine cipher refuse some multipliers?

Because a multiplier sharing a factor with 26 maps two different letters onto the same one, and the cipher then cannot be undone — the information is genuinely gone. Only the twelve values coprime with 26 work, which is a large part of why the affine cipher's key space is so small.

Is ROT13 encryption?

No, and it never claimed to be. It was a Usenet convention for hiding a punchline from being read by accident — there is no key, so it hides nothing from anyone who looks. It is on this page as the clearest example of something that resembles encryption and is not.

Does anything I type here get sent anywhere?

No. All of it runs in your browser. These ciphers are worthless for secrecy, but the privacy promise is the same as everywhere else on the site.