Skip to main content
CipherChronicle

Cipher methods Grid

ADFGX cipher

Polybius on five alphabet labels A, D, F, G, X, followed by columnar transposition. Two successive layers, famously broken by Painvin in 1918.

Family :
Grid
Difficulty :
Advanced
Era :
1918, German army (WWI)
Inventor :
Fritz Nebel

The ADFGX cipher entered service with the German army in March 1918, just before the spring offensive on the Western Front. It combines a labeled Polybius and a columnar transposition — one of the first real modern cryptographic superpositions. It was broken by French Lieutenant Georges Painvin in April–June 1918, in a feat considered decisive for the Allied victory.

Principle

Step 1 — Labeled Polybius

A 5×5 grid holds the alphabet (I/J merged), shuffled by a secret key. Rows and columns are labeled with five letters chosen for their highly distinct Morse codes: A, D, F, G, X.

    A D F G X
  A A B C D E
  D F G H I K
  F L M N O P
  G Q R S T U
  X V W X Y Z

Each plaintext letter is replaced by the pair (row-label, col-label). For instance: C → AF, I → DG, E → AX.

Step 2 — Columnar transposition

The text obtained (twice as long, only A/D/F/G/X) is then written into a rectangular grid under a keyword, and read column by column in the alphabetic order of the keyword letters.

This double step significantly complicates analysis: after Polybius you only have five symbols instead of 26; after transposition, no local statistic survives.

Example (step 1 only)

Plaintext CIPHE with the grid above:

C → A F    I → D G    P → F X    H → D F    E → A X

Step 1 result: AFDGFXDFAX.

The transposition step depends on an additional keyword (say KEY) and makes the final ciphertext non-trivial to track by hand — hence the method’s historical effectiveness.

Why five letters?

A, D, F, G, X were picked by Fritz Nebel because their Morse codes are:

A = ·−     D = −··     F = ··−·     G = −−·     X = −··−

The five symbols are very different from one another: low risk of confusion at reception, even under poor conditions. This is the first cipher jointly designed for its transmission channel.

Variants

  • ADFGVX — 1918 extension to six labels, covering digits 0-9.
  • Bazeries — another Polybius + transposition superposition.
  • Nihilist — similar idea among Russian revolutionaries (Polybius + addition).

Weaknesses

Painvin broke ADFGX through two facts:

  • Some intercepted messages shared identical opening structure (formatted military headers).
  • Transposition leaves geometric constraints exploitable when multiple same-length ciphertexts are available.

Once the transposition is reversed, the Polybius step yields to frequency analysis of the ADFGX pairs.

In CipherChronicle

ADFGX is a strong historical cipher: it introduces the idea of layered methods and offers genuine resistance to naive analysis. Grids built on it can ask the player to unwind both layers in order.

Grid

A
F
D
G
F
X
D
F
A
X
Q
R
S
T
U
V
W
X
Y
Z
A
B
C
D
E
KeyKeyword KEY + keyed 5×5 grid
  1. 1

    Ciphertext

    A stream made only of five letters — A, D, F, G, X. Immediate signature.

  2. 2

    Why those five letters

    They were chosen for their Morse codes being highly distinct — readable through radio noise.

  3. 3

    Labeled Polybius

    Each ADFGX pair selects a cell of a 5×5 grid holding a scrambled alphabet.

  4. 4

    Reading the pairs

    AF = row A col F = C, DG = I, FX = P, DF = H, AX = E.

  5. 5

    Message revealed

    The letters appear after each pair is read in the grid.