Cipher methods Polygraphic
Three-square cipher
An intermediate variant between the two-square and four-square ciphers: three 5×5 grids, the middle one standard, two outer ones keyed. Digram encryption by rectangle rule.
- Family :
- Polygraphic
- Difficulty :
- Intermediate
- Era :
- Delastelle family, late 19th — early 20th century
Also known as : Three Square · Three-Squares cipher
The three-square cipher belongs to the Delastelle family of polygraphic grid ciphers. It sits in the middle: stronger than the two-square cipher (too weak against a real cryptanalyst), simpler than the four-square cipher. It’s the perfect didactic step to grasp how multiplying grids increases security.
Principle
Use three 5×5 grids arranged in a triangle or a row, each containing the alphabet (I/J merged):
[ Grid 1 (key K1) ] [ Grid 2 (standard) ] [ Grid 3 (key K2) ]
- Grid 1: filled by writing the key
K1first (e.g.KEYWORD), then the remaining alphabet letters. - Grid 2: standard A–Z alphabet (no key).
- Grid 3: filled by writing the key
K2first (e.g.SECRET), then the remaining letters.
Encryption works on the cleartext by digram:
- Read the plain digram
(P₁, P₂). - Locate
P₁in grid 2 (standard) andP₂in grid 3 (keyed K2). - The cipher digram
(C₁, C₂)is read off as a rectangle:C₁is in grid 1 (keyed K1) at row-of-P₁× column-of-P₂;C₂is in grid 2 at row-of-P₂× column-of-P₁.
Decryption reverses the same rectangle rule.
Example
With K1 = KEYWORD, K2 = SECRET, encipher CIPHER CHRON ICLE digram by digram: CI PH ER CH RO NI CL E·. Every pair passes through the three grids by the rectangle rule. The final ciphertext blends the effects of both keys with the standard grid’s position structure.
Strengths and weaknesses
Strengths
- Two independent keys — keyspace is
(26!)²grids, far above the26!of the two-square cipher. - No letter maps to itself within a digram — a structural property of the rectangle rule that guarantees
XXnever enciphers toXX. - No separator needed (unlike Playfair’s
Xbetween equal letters in a digram).
Weaknesses
- Digram frequency analysis —
TH,HE,IN,ER(English),ES,LE,EN,DE(French) remain statistically detectable with enough material (>500 digrams). - Exploitable structure — the rectangle rule pins the standard grid’s letter positions. Once G2 is known, the two outer grids fall via cross-bigram constraints.
- Sensitive to weak keys — short keys (
A,IT) produce nearly-standard grids and the cipher collapses.
Closely related ciphers
- Two-Square (Delastelle) — two-grid version, simpler, weaker.
- Four-Square (Delastelle) — four-grid version, more robust — the family standard.
- Bifid / Trifid (Delastelle) — coordinate fractionation rather than rectangle rule, another structural approach.
How to attack it by hand
- Split the ciphertext into digrams and count frequencies.
- Identify the most frequent digrams and their plain candidates (
TH,HE). - Hypothesize the standard grid G2: its rows/columns constrain the positions of C₁ and C₂.
- Once G2 is pinned, attack G1 and G3 by consistency — every known digram gives two simultaneous constraints on the two keyed grids.
The manual attack is serious work: several hours for a 100-digram message, but tractable with patience.
In CipherChronicle
The three-square cipher is a stepping stone toward Four-Square. It teaches the rectangle rule in a frame where one grid is trivial (the standard middle), simplifying visualization. Once the rule is internalized, jumping to the four-square variant is immediate.
Grid
- 1
Ciphertext
Fifteen letters with a distribution close to French/English — digrams are the real unit.
- 2
Pair-wise split
DL PH GV HC SR MO EN G· — every pair is produced by a triple of grids.
- 3
Hypothesis: 3 grids, 2 of them keyed (KEYWORD, SECRET)
Two keyed grids flank a standard middle grid. The plain pair enters two grids, the cipher pair leaves the others.
- 4
Reverse via the rectangle rule
For each cipher digram, find the rectangle that crosses all three grids and read out the plain positions.
- 5
Message revealed
Cleartext rebuilds digram by digram.