Four-Square Cipher
Delastelle's digram cipher: four 5×5 squares, two of them keyed
Why This Matters
Félix Delastelle invented several fractionation ciphers (Bifid, Trifid, Four-square). The Four-square is his digraphic cousin to Playfair: encrypt letters two at a time, but use two keyed alphabets instead of one. It avoids Playfair's "same row / same column / same letter" edge cases and the needed insertion of X between doubled letters.
Published in his 1902 book Traité Élémentaire de Cryptographie, the Four-square joined the Bifid and Trifid in Delastelle's portfolio of methods built on the Polybius square. Though never adopted by a major military, it was used by amateur cipher clubs through the 20th century and remains a popular puzzle.
Arrange four 5×5 squares (J merged into I) in a 2×2 grid. The top-left and bottom-right are plain alphabets; the top-right and bottom-left are keyed.
┌─────────────┬─────────────┐ │ PLAIN A→Z │ KEY 1 │ ├─────────────┼─────────────┤ │ KEY 2 │ PLAIN A→Z │ └─────────────┴─────────────┘To encrypt a digram: locate the first letter in the top-left and the second in the bottom-right. Read the cipher digram from the top-right (row of letter 1, column of letter 2) and the bottom-left (row of letter 2, column of letter 1).
Although single-letter frequencies are flattened, digram frequencies are merely substituted. TH, HE, IN, ER, AN — the most common English digrams — appear with roughly the same frequencies in the ciphertext, just under different letter pairs. With several hundred characters, automated solvers can recover the keys.
Modern hill-climbers score candidate key-square pairs by English digram log-frequencies and converge to the correct keys in seconds.
| Concept from Four-Square Cipher | Modern Evolution |
|---|---|
| Digram-level encryption | AES operates on 128-bit blocks — same idea, more bits |
| Multiple keyed tables | Modern S-box design uses multiple tabulated nonlinear maps |
| Avoiding edge cases (same-row/col) | AES MixColumns provides clean, edge-case-free diffusion |
| Exhibit | 41 of 49 |
| Era | Late 19th Century · ~1902 |
| Security | Moderate |
| Inventor | Félix Delastelle (France) |
| Year | ~1902 |
| Key Type | Two keywords (two keyed squares) |
| Broken By | Digram frequency analysis · simulated annealing |
| Modern Lesson | Fixed mappings preserve digram statistics |