Exhibit 41 of 137 Late 19th Century · ~1902 Moderate

Four-Square Cipher

Delastelle's digram cipher: four 5×5 squares, two of them keyed

InventorFélix Delastelle (France)
Year~1902
Key TypeTwo keywords (two keyed squares)
Broken ByDigram frequency analysis · simulated annealing
Modern LessonFixed mappings preserve digram statistics

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.

📜Historical Context

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.

⚙️How It Works

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).

💀How It Was Broken
Digram Frequency Analysis
Complexity: Moderate

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.

Simulated Annealing
Complexity: Moderate

Modern hill-climbers score candidate key-square pairs by English digram log-frequencies and converge to the correct keys in seconds.

🔬What It Teaches Modern Cryptography
Concept from Four-Square CipherModern Evolution
Digram-level encryptionAES operates on 128-bit blocks — same idea, more bits
Multiple keyed tablesModern S-box design uses multiple tabulated nonlinear maps
Avoiding edge cases (same-row/col)AES MixColumns provides clean, edge-case-free diffusion
Quick Facts
Exhibit41 of 49
EraLate 19th Century · ~1902
SecurityModerate
InventorFélix Delastelle (France)
Year~1902
Key TypeTwo keywords (two keyed squares)
Broken ByDigram frequency analysis · simulated annealing
Modern LessonFixed mappings preserve digram statistics
← Previous Playfair Cipher