ADFGVX Cipher
WWI fractionating cipher — 6×6 Polybius square substitution + columnar transposition.
| A | D | F | G | V | X |
|---|
How to Use the ADFGVX Cipher Tool
- Set your keys — enter a Polybius keyword to shuffle the grid and a columnar keyword for transposition.
- Click Apply — the 6×6 grid updates to show the new letter/digit arrangement.
- Enter your text — type or paste plaintext. Letters and digits are supported.
- Click Encrypt — the tool performs substitution then transposition, showing the ciphertext.
- Step-by-Step mode — shows the intermediate fractionated text before transposition.
About the ADFGVX Cipher
The ADFGVX cipher was introduced by the German Army in June 1918, just before the German Spring Offensive on the Western Front. It replaced the earlier ADFGX cipher (which used only letters) by adding digits 0–9 to the 6×6 grid. The cipher was designed to be used in the field: operators needed only pencil and paper to encrypt and decrypt messages, and the chosen letters A, D, F, G, V, X are highly distinct in Morse code, reducing transmission errors.
The Two-Stage Process
ADFGVX encryption has two stages. First, a fractionation step: the 6×6 Polybius square maps each plaintext character to a two-letter combination from {A, D, F, G, V, X}. The keyword shuffles the order of characters in the grid, so without the keyword the letter-to-symbol mapping is unknown. Second, a transposition step: the resulting string of ADFGVX symbols is written into rows under the columnar keyword, then columns are read out in the alphabetical order of the keyword letters. This double layer of security — substitution followed by transposition — made ADFGVX much stronger than either technique alone.
The Breaking of ADFGVX
Despite its strength, ADFGVX was broken by French cryptanalyst Georges Painvin in June 1918. Painvin exploited a fundamental weakness: when two messages shared the same keys and started at the same column (detectable by their length being a multiple of the keyword length), the column transposition could be reversed by comparing the two messages. He worked for over a week without sleep and lost over 30 pounds before successfully decrypting a message that revealed a critical troop movement — intelligence that helped stop the German advance. After the war, the Germans admitted that Painvin's work had significantly affected the outcome of the offensive.
Relationship to Other Ciphers
ADFGVX belongs to the family of fractionating ciphers — ciphers that first convert characters into smaller units and then reassemble them. The earlier Polybius square turned letters into digit pairs; ADFGVX turned them into letter pairs from a chosen alphabet. This fractionation means each output symbol carries only partial information about the input character, increasing confusion. When combined with transposition (which increases diffusion), the result is a cipher that was practically unbreakable by 1918 standards without a crib or related-message attack. The principle of combining substitution and transposition was later formalized by Claude Shannon as the concept of confusion and diffusion in his foundational 1949 paper on cryptography.