Cipher methods Polygraphic
Playfair cipher
Digram cipher over a 5×5 grid. The first widely used block cipher — deployed by the British Army up to WWII.
- Family :
- Polygraphic
- Difficulty :
- Advanced
- Era :
- 1854, Charles Wheatstone (popularized by Lord Playfair)
- Inventor :
- Charles Wheatstone
The Playfair cipher was invented by Charles Wheatstone in 1854 but owes its name to Lord Playfair, who promoted it with the British government. It was used throughout the Boer War, World War I, and World War II (until around 1942). It is the first widely deployed digram cipher — each letter pair is encrypted together rather than one after the other.
Principle
The grid
A 5×5 grid is filled first with a keyword (no duplicates), then with the remaining alphabet in order. I and J are merged to fit in 25 cells.
With keyword KEYWORD:
K E Y W O
R D A B C
F G H I L
M N P Q S
T U V X Z
The rules
The plaintext is split into digrams (letter pairs). Double letters are separated by an inserted X; if the total is odd, pad with X at the end.
For each digram (P₁, P₂):
- Same row: each letter is replaced by the one immediately to its right (with wrap).
- Same column: each letter is replaced by the one immediately below (with wrap).
- Rectangle (different rows and columns): each letter is replaced by the one on its own row, in the other letter’s column.
Decryption applies the rules backwards (left / up / same cross).
Example
Plaintext CIPHERCHRONICLEX with the KEYWORD grid:
CI → BL PH → VP ER → KD CH → AL
RO → CK NI → QG CL → LS EX → WU
Ciphertext: BLVPKDALCKQGLSWU.
Variants
- Two Square — two grids side by side, adapted rules.
- Four Square — four grids, even larger keyspace.
- Delastelle Bifid — fractional cousin of Playfair.
- Playfair-6 — 6×6 variant including digits.
Strengths and weaknesses
Strengths
- Digram cipher: letter-by-letter frequency analysis fails — attackers must move to digram frequencies of the ciphertext.
- Practical by hand with a bit of training.
- 26 letters → 676 possible digrams, much harder to attack than letter-by-letter substitution.
Weaknesses
- Digram frequency is still exploitable: in English
TH,HE,INare very common in plaintext, so their ciphertext digrams are frequent too. - The same two letters in a digram always produce the same ciphertext — exploitable signature.
- Never a double-letter in the ciphertext — a strong attacker hint.
Playfair was finally broken through systematic digram analysis in the 1910s-1920s.
In CipherChronicle
Playfair is an excellent training ground for grid-based geometric rules. Puzzles can invite the player to lay out their own grid and work through digrams one by one — a very visual mechanic.
Grid
- 1
Ciphertext
Partial distribution — neither pure substitution nor pure transposition. Letters cluster in pairs.
- 2
Digram splitting
BL VP KD AL CK QG LS WU — each pair was enciphered together under three geometric rules.
- 3
Hypothesis: 5×5 grid, key « KEYWORD »
The grid reads the keyword (without duplicates), then the remaining alphabet in order.
- 4
Inverse rule application
Same row → left. Same column → up. Rectangle → cross swap.
- 5
Message revealed
The plaintext emerges once the rules are inverted on each digram.