ADFGVX Cipher
Encode and decode messages using the World War I German ADFGVX fractionated transposition cipher with an interactive 6x6 Polybius grid containing letters and numbers.
What is the ADFGVX Cipher?
The ADFGVX Cipher is a historic military cipher utilized by the German Army during the final months of World War I. Introduced on **June 1, 1918**, it was a direct extension of the earlier **ADFGX cipher** created to secure Germany's high-level radio communication networks on the Western Front.
The ADFGVX cipher is a **fractionated transposition cipher** that combines a custom $6 \times 6$ Polybius square substitution step with a subsequent columnar transposition step. Because it operates on both substitution and transposition, it completely breaks up letter patterns, rendering simple frequency-based attacks completely ineffective.
The 6x6 Polybius Square with Numbers
The major improvement of ADFGVX over ADFGX was the expansion of the Polybius square grid from $5 \times 5$ (25 letters) to **$6 \times 6$ (36 letters and numbers)**. This had two massive benefits for telecommunication operators:
- Native Digits Support: In the older ADFGX cipher, digits (0-9) had to be spelled out in full letters (e.g. writing "neun" for 9), which inflated the telegraph length. ADFGVX natively supports numbers 0 to 9.
- Full Alphabet: By using 36 grid spaces, the cipher eliminated the need to merge the letters 'I' and 'J' together, keeping spelling precise and unambiguous.
The row and column headers are the six letters **A**, **D**, **F**, **G**, **V**, and **X**, selected because of their distinct representation in Morse code (dots and dashes), which minimized transmission errors over noisy telegraph channels.
Step-by-Step ADFGVX Mathematical Logic
The ADFGVX cipher runs in two main phases:
1. Fractionated Substitution
A $6 \times 6$ grid is populated using a custom Polybius keyphrase (e.g. "DEUTSCHLAND"). Unique characters are placed first, and the remaining letters (A-Z) and numbers (0-9) are filled in.
Every plaintext letter is replaced by its two-letter row and column headers:
$$\text{Plaintext char } C_i \to \text{Row } R \text{ + Column } C$$2. Columnar Transposition
The resulting fractionated string is written row by row into a table whose width is defined by a secret Transposition Key (e.g. "CARGO"). The columns of the table are then sorted **alphabetically** by their header letter. The final ciphertext is read down each sorted column sequentially.
Step-by-Step ADFGVX Encryption Example
Let's encrypt the message "MISSION 1" using the Polybius key "DEUTSCHLAND" and transposition key "CARGO":
-
Generate the 6x6 Polybius Grid:
Using the key "DEUTSCHLAND" (unique letters: D, E, U, T, S, C, H, L, A, N), we fill the grid with the remaining alphabet and digits 0-9:
A D F G V X A D E U T S C D H L A N B F F G I K M O P G Q R V W X Y V Z 0 1 2 3 4 X 5 6 7 8 9 J
-
Substitute Plaintext Characters:
We map each character of "MISSION1" to its coordinates:
- M → FV
- I → FF
- S → AV
- S → AV
- I → FF
- O → FX
- N → DV
- 1 → VG
-
Write to Transposition Grid:
We write this intermediate text into a grid with 5 columns (width of "CARGO"):
C A R G O --------- F V F F A V A V F F F X D V V G - - - -
-
Sort Columns Alphabetically:
Sorting columns alphabetically by key headers: A, C, G, O, R:
A C G O R --------- V F F A F A V V F V X F - V D - G - - -
-
Read Columns Downward:
Reading each column in sorted order (A, C, G, O, R):
- A: V A X
- C: F V F G
- G: F V
- O: A F V
- R: F V D
The Codebreaker Georges Painvin
The ADFGVX cipher was considered uncrackable by German command. However, on **June 2, 1918**, just one day after its battlefield debut, French military cryptanalyst **Georges Painvin** began analyzing intercepted German radio traffic.
Through heroic effort and physical exhaustion, Painvin cracked the ADFGVX cipher using mathematical analysis of duplicate message starts and matching transposition lengths. His decryption of a German message on **June 3, 1918**—ordering an immediate ammunition supply—warned the French army of a surprise offensive, allowing them to prepare and decisively repel the attack, a turning point that changed the course of World War I.
Frequently Asked Questions
How do I decrypt an ADFGVX message?
To decrypt, set the operation mode to Decrypt, enter the matching Polybius Grid Keyphrase and Transposition Key, paste the ciphertext, and click decrypt. The tool automatically maps lengths of the alphabetical columns, reconstructs the transposition matrix, and decodes the 6x6 coordinate pairs.
What happens to special symbols or spaces in ADFGVX?
Since ADFGVX is built on a 36-character alphanumeric Polybius grid, spaces and special symbols (like punctuation marks) are stripped or ignored to ensure they do not skew the transposition structure.
Is the ADFGVX cipher considered secure today?
No. While it was extremely secure in 1918, modern computers can easily crack an ADFGVX ciphertext in seconds by brute-forcing transposition key lengths and applying dictionary attacks or index of coincidence calculations to reconstruct the 6x6 grid.
Related tools
Your recent visits