Common Types of Ciphers

types of ciphers

Found a strange string of letters in a puzzle? The main types of ciphers are substitution and transposition, and checking whether letters were swapped for other characters or just reordered usually shows which attack to try first.

This list sorts each cipher by how a solver would recognize and attack it, so it works as a quick reference for mystery puzzle games rather than a full tutorial. When you are ready to put one into practice, the guide on how to solve cipher puzzles walks through the process.

How ciphers are sorted

The Exploratorium divides ciphers into two main categories: substitution and transposition. The difference decides how you attack a message, because each category leaves a different fingerprint on the ciphertext.

  • Substitution ciphers replace plaintext letters with other letters or symbols while the original order is kept. If the ciphertext has unfamiliar shapes or an odd-looking alphabet, think substitution.
  • Transposition ciphers keep all of the original letters intact but mix up their order. If the ciphertext reads as scrambled yet looks like ordinary letters, think transposition.
  • Polyalphabetic ciphers are a substitution family in which the substitution changes along the message instead of staying fixed. The Vigenère cipher is the best-known example, covered below.

That fingerprint is the most useful thing to check before you try anything else. The sections that follow work through the common types in the order a puzzle solver is likely to meet them.

Comparison at a glance

Cipher type Category Key or alphabet detail Planning use
Caesar-style offset Substitution Key is the number of characters the alphabet is offset; Caesar used 3 Try every offset against a normal A-Z alphabet
Symbol substitution Substitution Symbols stand in for letters instead of other letters Count symbols and match the most common to common letters
Bacon’s cipher Substitution by typeface Two typefaces differing in weight; 5-character groups, each encoding one letter Look for text printed in two slightly different weights
Pig Latin and other reorderings Transposition Original letters kept intact, order mixed Letter counts match normal language, so look for rearrangement
Number-based and Vigenère Substitution (Vigenère is polyalphabetic) Clock arithmetic on a 26-letter alphabet Treat letters as numbers and think in wrap-around steps

Figures come from the Exploratorium’s secret language material and the Teaching London Computing number-based ciphers page.

Caesar cipher and other alphabet offsets

The Caesar cipher is the simplest substitution to recognize. Julius Caesar used a scheme that offset the alphabet by 3 characters, and the Exploratorium notes that such a scheme was easily broken.

A decoder ring shows the mechanism well: two concentric A-Z wheels are turned against each other, and the key is the number of characters to offset. Ciphertext from an offset cipher still follows alphabet order, which is why trying each possible offset against the plain alphabet is a quick attack for a solver working by hand.

A full alphabet written out in order is the raw material for any offset cipher, since the shifted alphabet is simply this row slid sideways.

Choose this cipher as your first guess when the ciphertext looks like plain letters with no symbols. For the step-by-step method, see how to solve a caesar cipher in the how to solve a caesar cipher guide.

Symbol substitution

A symbol-based cipher substitutes symbols for letters instead of other letters. The Exploratorium describes a diagrammatic version in which tic-tac-toe style line shapes replace each letter, so the message looks like a row of small drawings.

You recognize it by the alphabet: if the characters are shapes and the shapes repeat, it is a monoalphabetic substitution, and the same shape always means the same letter. That repetition is the weakness. The Exploratorium states that an armchair cryptologist needs only about 10 minutes or less to work out a message of this kind.

Rows of the letter a in serif and sans-serif styles, with a red block on the right.

This type suits puzzle designers who want something that looks mysterious on the page but yields to patience. It suits solvers who like to work with pencil and paper and a table of tallies.

Attacking substitution with letter frequency

Almost all substitution ciphers are open to frequency analysis, according to the Exploratorium. The method counts how often each symbol or letter appears and compares the tally with the pattern of normal language.

Raised dot patterns cover the cream page, with the book’s edge visible at left.

The Exploratorium’s worked example makes the logic concrete. An empty box appeared six times out of a total of 29 characters, about 20% of the time, which pointed to the letter E as the most frequent letter. Short messages give rough tallies, so treat the most common symbol as a strong lead rather than a certainty and test it against word shapes.

This is the attack to reach for with any cipher that keeps one symbol per letter, including offsets and symbol alphabets. It is a poor first move on a transposition, because reordering leaves letter counts untouched and frequency counting would tell you nothing new.

Loose letter blocks make the transposition idea tangible: the same pieces are present, only their order in the line changes.

Bacon’s two-typeface cipher

Francis Bacon’s cipher hides its message in the printing itself. He used two different typefaces slightly differing in weight (boldness), so each character carries a hidden bold-or-plain choice.

He broke his ciphertext into 5-character groups, each of which represents one letter of the hidden message. The way to spot it is visual rather than linguistic: the text reads normally, but a close look shows some letters a touch heavier than others.

Bacon’s scheme is a historical cipher that was actually devised for concealment, and it shows that a cipher need not change the letters you read. It is rare in puzzles because it only works when the typeface difference survives printing or screens, so check for it when a puzzle emphasises how text is set rather than what it says.

Transposition and Pig Latin

Transposition ciphers keep every original letter and move them around. The Exploratorium classifies Pig Latin as a form of transposition cipher in which the original letters are kept intact.

The recognition test is that the ciphertext looks like the right letters in the wrong order. Because the letters are all present, you can often spot fragments of real words and rebuild the order by trial. Anagram thinking is the right mindset here, not substitution tables. Pick this approach when a message has normal-looking letter counts but unreadable sequences.

Number-based ciphers and the Vigenère cipher

Number-based ciphers turn letters into numbers and use clock arithmetic. According to Teaching London Computing, it works like the hands on a big clock that has 26 hours instead of just 12, so counting past Z wraps back around to the start of the alphabet.

Hand-drawn marks on a notepad illustrate the idea that each cipher symbol is just a written stand-in for one letter.

The Vigenère cipher is the standard example of the polyalphabetic family. Rather than one fixed offset for the whole message, a key decides how far each letter is shifted, so a single plaintext letter can turn into different ciphertext letters. That is why a simple frequency count looks flatter than it does on a Caesar message, and why the Vigenère cipher takes more effort than the other types here.

A blank square grid stands in for the kind of tableau used to look up shifts by hand; this sheet carries no cipher content.

Recommend this type to solvers who are comfortable with a table and a methodical routine. Expect it to be slower by hand than any single-offset cipher, and look to it only when simpler ideas have failed.

Which cipher to test first

Work through the checks in this order, stopping when one fits.

  1. Look at the characters. If they are symbols or drawn shapes, treat it as symbol substitution and start a frequency tally.
  2. Check the typeface. If the text is set in two slightly different weights, test for Bacon’s scheme.
  3. Compare with the alphabet. If the letters look ordinary, try Caesar-style offsets against a plain A-Z row.
  4. Check word fragments. If real fragments appear in the wrong order, treat it as transposition and rearrange.
  5. Escalate last. If a plain tally looks flat and offsets fail, consider a keyed polyalphabetic cipher such as Vigenère.

Simple substitution and offset ciphers are the ones most likely to be intended as hand-solvable puzzle challenges, because both fall to patient counting and trial.

Frequently asked questions

Which of these ciphers can be solved by hand?

Offset ciphers and symbol substitutions are the most practical by hand. The Exploratorium says almost all substitution ciphers are open to frequency analysis, and a symbol example took only about 10 minutes or less.

Why are cipher messages often split into five-letter blocks?

The Exploratorium notes that five letters are customary in the spy business. Grouping hides word lengths, which would otherwise give a solver clues.

Is Pig Latin a real cipher?

Yes, the Exploratorium describes it as a form of transposition cipher in which the original letters are kept intact. It is a simple example of reordering rather than replacing letters.

What does a cipher need to work?

It needs a method and a key used with it, so the plaintext can be both enciphered and deciphered. Without the key, a solver has to infer it from the pattern of the ciphertext.