Skip to main content
CipherChronicle

Cipher methods Polygraphic

Two-square cipher

A lighter version of the four-square cipher: two grids, one key each, digrams encrypted by rectangle.

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

The two-square cipher is the simplest member of the Delastelle family: two 5×5 grids each with its own key, placed side by side (horizontal variant) or stacked (vertical).

Principle

Two 5×5 grids, each filled with a keyword then the remaining alphabet (I/J merged):

Grid 1 (KEYS)         Grid 2 (EXAMPLE)
K E Y S A             E X A M P
B C D F G             L B C D F
H I L M N             G H I K N
O P Q R T             O Q R S T
U V W X Z             U V W Y Z

Rules (horizontal variant)

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

  • Find P₁ in grid 1, P₂ in grid 2.
  • If P₁ and P₂ are in the same row: swap them (each takes the other’s column).
  • Otherwise (different rows): form a rectangle. C₁ = grid 1, row of P₁, column of P₂. C₂ = grid 2, row of P₂, column of P₁.

Decryption

The method is symmetric: applying the same rules to the ciphertext reproduces the plaintext.

Variants

  • Four-square cipher — the more robust 4-grid version (2 keyed, 2 standard).
  • Three-square cipher — intermediate, three grids.
  • Playfair — single-grid digram cipher.

Strengths and weaknesses

Strengths

  • Double letters are no problem (no need to inject an X, unlike Playfair).
  • Simpler to use than the four-square cipher, with comparable resistance on short messages.

Weaknesses

  • Only two keys → keyspace bounded by what two words can carry.
  • Digram analysis still effective.
  • Horizontal variant: if P₁ and P₂ share a row, C₁ = P₂ and C₂ = P₁ — pure swap, easy to detect.

In CipherChronicle

Two-square is a gentle entry into the Delastelle family: the geometric mechanic is identical to four-square but with half as many grids to juggle. A good stepping stone to Playfair or Four Square.

Grid

D
H
H
P
Y
Q
H
C
O
R
I
N
L
C
E
Q
R
S
T
U
V
W
X
Y
Z
KeyK1 = KEYS · K2 = EXAMPLE
  1. 1

    Ciphertext

    Digram-based cipher, occasionally the same plain digram maps to different ciphers.

  2. 2

    Pair splitting

    DH HP YQ HC OR IN LC — the twist: double letters in the plaintext can show up in the cipher.

  3. 3

    Hypothesis: 2 grids with keys « KEYS » and « EXAMPLE »

    Each letter of the digram is looked up in a different grid.

  4. 4

    Inverse rectangle application

    For each cipher digram, form the rectangle across the two grids and read the corners.

  5. 5

    Message revealed

    The plaintext emerges once the inverse rectangles are applied.