Skip to main content
CipherChronicle

Cipher methods Polygraphic

Four-square cipher

Digram cipher using four 5×5 grids, two of them keyed. Harder to break than Playfair thanks to double keying.

Family :
Polygraphic
Difficulty :
Advanced
Era :
19th century, Félix Delastelle
Inventor :
Félix Delastelle

The four-square cipher was devised by the Frenchman Félix Delastelle in the late 19th century. It improves on Playfair by using four grids instead of one, and two keys instead of one — doubling the attack complexity.

Principle

Four 5×5 grids are laid in a square:

┌────────────┬────────────┐
│  standard  │  key 1     │
│  (A..Z)    │  KEYWORD...│
├────────────┼────────────┤
│  key 2     │  standard  │
│  SECRET... │  (A..Z)    │
└────────────┴────────────┘

The two diagonals are standard (alphabetic). The other two use different keys.

Encryption

For each plain digram (P₁, P₂):

  1. Find P₁ in the top-left standard grid.
  2. Find P₂ in the bottom-right standard grid.
  3. Form a rectangle between those two letters.
  4. C₁ is the rectangle corner in the top-right grid (row of P₁, column of P₂).
  5. C₂ is the rectangle corner in the bottom-left grid (row of P₂, column of P₁).

Decryption

The process is symmetric: simply swap the roles of keyed and standard grids.

Variants

  • Two-square cipher — simplified version with only two grids (the simplest of the family).
  • Three-square cipher — intermediate, three grids in an L-shape.
  • Playfair — single-grid ancestor.

Strengths and weaknesses

Strengths

  • Two keys: each keyed grid is independent of the other, doubling the effective keyspace.
  • No double-letter constraint: unlike Playfair, EE encrypts normally (two grids to place each letter).
  • Double letters in the ciphertext are possible — one of Playfair’s weaknesses is fixed.

Weaknesses

  • Still a digram cipher — digram frequency analysis remains the main attack path.
  • If one of the two keys is guessed via cribs, half the system collapses.
  • Multiple messages with the same key pair are statistically correlated.

In CipherChronicle

The four-square cipher is an exercise in geometric complexity: the player must trace rectangles across four grids. Puzzles can display all four grids side by side to make the method completely tangible.

Grid

W
D
H
G
E
U
S
R
Y
Z
F
G
M
N
P
Q
R
S
T
U
V
W
X
Y
Z
KeyK1 = KEYWORD · K2 = SECRET
  1. 1

    Ciphertext

    Digram-based ciphertext, doubles rarely identical — not simple Playfair at work.

  2. 2

    Pair splitting

    WD HG EU SR YZ FG MN — each pair comes from the combination of two keyed grids.

  3. 3

    Hypothesis: 4 grids, keys « KEYWORD » and « SECRET »

    Two standard (alphabetic) grids and two with distinct keys.

  4. 4

    Inverse rectangle reading

    Each digram is read by rectangle across the four grids.

  5. 5

    Message revealed

    The plaintext emerges after per-block inversion.