The ADFGX Cipher is a fractionating transposition cipher created by the German army during World War I. It converts each letter of plaintext into a pair of symbols chosen from A, D, F, G, X using a 5×5 Polybius square with a custom alphabet (merging I and J). After this substitution, the resulting pairs are rearranged using a columnar transposition keyed by a chosen word. This combination of fractionation and transposition makes the cipher significantly more secure than a simple substitution or basic columnar cipher.

Conceptually, the ADFGX Cipher is a hybrid of substitution and transposition. Each plaintext letter maps to a unique two-symbol pair via the Polybius square, producing a sequence of labels. The sequence is then reordered according to the alphabetical order of the key, producing the final ciphertext. It shares lineage with the Polybius Square and Columnar Transposition Cipher, but the added fractionation adds diffusion, making it more resistant to frequency analysis.

ADFGX Cipher: Encoding

Using the default settings for demonstration:

  • Key: ZEBRA
  • Alphabet: PHQGMEAYLNOFDXKRCVSZWBUTIL (J merges with I)
  • Labels: A, D, F, G, X
  • Plaintext: HELLO WORLD (spaces removed → HELLOWORLD)
Step 1: Map each letter using the Polybius square
H → D A
E → G F
L → D G
L → F G
O → D D
W → A D
O → A F
R → A F
L → A G
D → X A

Stream of symbol pairs: DAGFDGFGDDADAFAFAGXA

Step 2: Arrange pairs under columns labeled by the key "ZEBRA"
Z   E   B   R   A
-----------------
D   A   G   F   D
G   F   G   D   D
A   D   A   F   A
F   A   F   A   G
X   A

Step 3: Read columns in alphabetical order of the key (A, B, E, R, Z)
A → D A D F A
B → G G F
E → A F D
R → F A
Z → D D A X

Ciphertext: DAGFDGFGDDADAFAFAGXA

ADFGX Cipher: Decoding

Decoding reverses the process. The recipient uses the same Polybius square and key to map ciphertext pairs back to letters:

Ciphertext: DAGFDGFGDDADAFAFAGXA
Step 1: Determine column lengths based on key and ciphertext
Step 2: Assign letters to columns in alphabetical order of key (A, B, E, R, Z)
Step 3: Read off rows to reconstruct the symbol pair stream:
D A G F D G F G D D A D A F A F A G X A
Step 4: Map each pair back through the Polybius square

Plaintext: HELLOWORLD

ADFGX Cipher: Usage Notes

Correct encoding and decoding require a 25-letter alphabet (merging I and J) and a keyword. Spaces and non-alphabetic characters are typically removed. The fractionation step distributes the plaintext symbols across multiple ciphertext positions, increasing resistance to frequency analysis. While modern cryptography renders the ADFGX Cipher insecure, it is historically significant and instructive for learning about the combination of substitution and transposition, as well as the concepts of fractionation and diffusion in classical ciphers.

ADFGX Cipher

T
🗝