The ADFGVX Cipher is an extension of the ADFGX Cipher, designed during World War I by the German army to secure telegraphic communications. It combines a 6×6 Polybius square mapping letters and digits to pairs of symbols A, D, F, G, V, X, followed by a columnar transposition using a keyword. Compared to ADFGX, it adds support for digits (0–9), providing a 36-character alphabet and stronger diffusion across the ciphertext.
The cipher operates in two phases. First, each plaintext character is located in the 6×6 square and replaced by a corresponding two-symbol code. Second, the resulting string of symbols is divided into columns determined by the keyword, and columns are reordered alphabetically according to the key. The combination of fractionation and transposition makes the ADFGVX Cipher significantly more resistant to frequency analysis than simple substitution or basic columnar ciphers.
ADFGVX Cipher: Encoding
Using the default settings:
- Key: zebra
- Alphabet: ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
- Labels: A, D, F, G, V, X
- Plaintext: HELLO WORLD (spaces removed → HELLOWORLD)
Step 1: Map each character using the Polybius square (6×6)
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
Symbol pair stream: DAGFDGFGDDADAFAFAGXA
Step 2: Arrange pairs under columns labeled by 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 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: DAGFDGFGDDADAFAFAGXAADFGVX Cipher: Decoding
Decoding reverses the steps. The recipient must know the same 36-character alphabet and keyword:
Ciphertext: DAGFDGFGDDADAFAFAGXA
Step 1: Determine column lengths based on key and ciphertext
Step 2: Assign characters to columns in alphabetical key order (A, B, E, R, Z)
Step 3: Read rows to reconstruct 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 symbol pair back through the Polybius square
Plaintext: HELLOWORLDADFGVX Cipher: Usage Notes
The cipher requires exactly 36 unique characters (A–Z plus 0–9) and a keyword for columnar transposition. Spaces and non-alphanumeric symbols are typically removed. Fractionation spreads plaintext symbols across multiple positions in the ciphertext, increasing diffusion and resisting simple frequency analysis. Although insecure by modern standards, the ADFGVX Cipher is historically important and useful for learning classical cryptography concepts, including fractionation, columnar transposition, and polygraphic substitution.