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₁andP₂are in the same row: swap them (each takes the other’s column). - Otherwise (different rows): form a rectangle.
C₁= grid 1, row ofP₁, column ofP₂.C₂= grid 2, row ofP₂, column ofP₁.
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₁andP₂share a row,C₁ = P₂andC₂ = 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
- 1
Ciphertext
Digram-based cipher, occasionally the same plain digram maps to different ciphers.
- 2
Pair splitting
DH HP YQ HC OR IN LC — the twist: double letters in the plaintext can show up in the cipher.
- 3
Hypothesis: 2 grids with keys « KEYS » and « EXAMPLE »
Each letter of the digram is looked up in a different grid.
- 4
Inverse rectangle application
For each cipher digram, form the rectangle across the two grids and read the corners.
- 5
Message revealed
The plaintext emerges once the inverse rectangles are applied.