ADFGVX cipher
View on WikipediaIn cryptography, the ADFGVX cipher was a manually applied field cipher used by the Imperial German Army during World War I. It was used to transmit messages secretly using wireless telegraphy. ADFGVX was in fact an extension of an earlier cipher called ADFGX which was first used on 1 March 1918 on the German Western Front. ADFGVX was applied from 1 June 1918 on both the Western Front and Eastern Front.
Invented by the Germans signal corps officers Lieutenant Fritz Nebel (1891–1977)[1][2] and introduced in March 1918 with the designation "Secret Cipher of the Radio Operators 1918" (Geheimschrift der Funker 1918, in short GedeFu 18), the cipher was a fractionating transposition cipher which combined a modified Polybius square with a single columnar transposition.
The cipher is named after the six possible letters used in the ciphertext: A, D, F, G, V and X. The letters were chosen deliberately because they are very different from one another in the Morse code. That reduced the possibility of operator error.
Nebel designed the cipher to provide an army on the move with encryption that was more convenient than trench codes but was still secure. In fact, the Germans believed the ADFGVX cipher was unbreakable.[3]
Operation
[edit]For the plaintext message, "Attack at once", a secret mixed alphabet is first filled into a 5 × 5 Polybius square:
| A | D | F | G | X | |
|---|---|---|---|---|---|
| A | b | t | a | l | p |
| D | d | h | o | z | k |
| F | q | f | v | s | n |
| G | g | i/j | c | u | x |
| X | m | r | e | w | y |
i and j have been combined to make the alphabet fit into a 5 × 5 grid.
By using the square, the message is converted to fractionated form:
a t t a c k a t o n c e AF AD AD AF GF DX AF AD DF FX GF XF
The first letter of each ciphertext pair is the row, and the second ciphertext letter is the column, of the plaintext letter in the grid (e.g., "AF" means "row A, column F, in the grid").
Next, the fractionated message is subject to a columnar transposition. The message is written in rows under a transposition key (here "CARGO"):
C A R G O _________ A F A D A D A F G F D X A F A D D F F X G F X F
Next, the letters are sorted alphabetically in the transposition key (changing CARGO to ACGOR) by rearranging the columns beneath the letters along with the letters themselves:
A C G O R _________ F A D A A A D G F F X D F A A D D F X F F G F X
Then, it is read off in columns, in keyword order, which yields the ciphertext:
FAXDF ADDDG DGFFF AFAX AFAFX
In practice, the transposition keys were about two dozen characters long. Long messages sent in the ADFGX cipher were broken into sets of messages of different and irregular lengths to make it invulnerable to multiple anagramming.[3] Both the transposition keys and the fractionation keys were changed daily.
ADFGVX
[edit]In June 1918, an additional letter, V, was added to the cipher. That expanded the grid to 6 × 6, allowing 36 characters to be used. That allowed the full alphabet (instead of combining I and J) and the digits from 0 to 9. This mainly had the effect of considerably shortening messages containing many numbers.
The cipher is based on the 6 letters ADFGVX. In the following example, the alphabet is coded with the Dutch codeword 'nachtbommenwerper'. This results in the alphabet: NACHTBOMEWRPDFGIJKLQSUVXYZ. Digits are inserted after the first occurrences of the letters A (1), B (2) to J (0). This creates the table below with the letters ADFGVX as column headings and row identifiers:
| A | D | F | G | V | X | |
|---|---|---|---|---|---|---|
| A | N | A | 1 | C | 3 | H |
| D | 8 | T | B | 2 | O | M |
| F | E | 5 | W | R | P | D |
| G | 4 | F | 6 | G | 7 | I |
| V | 9 | J | 0 | K | L | Q |
| X | S | U | V | X | Y | Z |
The text 'attack at 1200am' translates to this:
| A | T | T | A | C | K | A | T | 1 | 2 | 0 | 0 | A | M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AD | DD | DD | AD | AG | VG | AD | DD | AF | DG | VF | VF | AD | DX |
Then, a new table is created with a key as a heading; the following example uses 'PRIVACY' as a key, but usually much longer keys or even phrases were used.
| P | R | I | V | A | C | Y |
|---|---|---|---|---|---|---|
| A | D | D | D | D | D | A |
| D | A | G | V | G | A | D |
| D | D | A | F | D | G | V |
| F | V | F | A | D | D | X |
The columns are sorted alphabetically, based on the keyword, and the table changes to this:
| A | C | I | P | R | V | Y |
|---|---|---|---|---|---|---|
| D | D | D | A | D | D | A |
| G | A | G | D | A | V | D |
| D | G | A | D | D | F | V |
| D | D | F | F | V | A | X |
Then, appending the columns to each other results in this ciphertext:
DGDD DAGD DGAF ADDF DADV DVFA ADVX
With the keyword, the columns can be reconstructed and placed in the correct order. When using the original table containing the secret alphabet, the text can be deciphered.
This cipher might be modified by transposing the rows as well as the columns, creating a harder but improved cipher.
Cryptanalysis
[edit]ADFGVX was cryptanalysed by French Army Lieutenant Georges Painvin, and the cipher was broken in early June 1918.[4] The work was exceptionally difficult by the standards of classical cryptography, and Painvin became physically ill during the process. His method of solution relied on finding messages with stereotyped beginnings, which would fractionate them and then form similar patterns in the positions in the ciphertext that had corresponded to column headings in the transposition table. (Considerable statistical analysis was required after that step had been reached, all done by hand.) It was thus effective only during times of very high traffic, but that was also when the most important messages were sent.
However, that was not the only trick that Painvin used to crack the ADFGX cipher.[3] He also used repeating sections of ciphertext to derive information about the likely length of the key that was being used. Where the key was an even number of letters in length he knew, by the way the message was enciphered, that each column consisted entirely of letter coordinates taken from the top of the Polybius Square or from the left of the Square, not a mixture of the two. Also, after substitution but before transposition, the columns would alternately consist entirely of "top" and "side" letters. One of the characteristics of frequency analysis of letters is that while the distributions of individual letters may vary widely from the norm, the law of averages dictates that groups of letters vary less. With the ADFGX cipher, each "side" letter or "top" letter is associated with five plaintext letters. In the example above, the "side" letter "D" is associated with the plaintext letters "d h o z k", and the "top" letter "D" is associated with the plaintext letters "t h f j r". Since the two groups of five letters have different cumulative frequency distributions, a frequency analysis of the "D" letter in columns consisting of "side" letters has a distinctively different result from those of the "D" letter in columns consisting of "top" letters. That trick allowed Painvin to guess which columns consisted of "side" letters and which columns consisted of "top" letters. He could then pair them up and perform a frequency analysis on the pairings to see if the pairings were only noise or corresponding to plaintext letters. Once he had the proper pairings, he could then use frequency analysis to figure out the actual plaintext letters. The result was still transposed, but to unscramble a simple transposition was all that he still had to do. Once he determined the transposition scheme for one message, he would then be able to crack any other message that was enciphered with the same transposition key.[3]
Painvin broke the ADFGX cipher in April 1918, a few weeks after the Germans launched their Spring Offensive. As a direct result, the French army discovered where Erich Ludendorff intended to attack. The French concentrated their forces at that point, which has been claimed to have stopped the Spring Offensive.
However, the claim that Painvin's breaking of the ADFGX cipher stopped the German spring offensive of 1918, while frequently made,[5] is disputed by some. In his 2002 review of Sophie de Lastours' book on the subject, La France gagne la guerre des codes secrets 1914-1918, in the Journal of Intelligence History, (Journal of Intelligence History: volume 2, Number 2, Winter 2002) Hilmar-Detlef Brückner stated:
Regrettably, Sophie de Lastours subscribes to the traditional French view that the solving of a German ADFGVX-telegram by Painvin at the beginning of June 1918 was decisive for the Allied victory in the First World War because it gave timely warning of a forthcoming German offensive meant to reach Paris and to inflict a critical defeat on the Allies. However, it has been known for many years, that the German Gneisenau attack of 11 June was staged to induce the French High Command to rush in reserves from the area up north, where the Germans intended to attack later on.
Its aim had to be grossly exaggerated, which the German High Command did by spreading rumors that the attack was heading for Paris and beyond; the disinformation was effective and apparently still is. However, the German offensive was not successful because the French had enough reserves at hand to stop the assault and so did not need to bring in additional reinforcements.
Moreover, it is usually overlooked that the basic version of the ADFGVX cipher had been created especially for the German Spring Offensive in 1918, meant to deal the Allies a devastating blow. It was hoped that the cipher ADFGX would protect German communications against Allied cryptographers during the assault, which happened.
Telegrams in ADFGX appeared for the first time on 5 March, and the German attack started on 21 March. When Painvin presented his first solution of the code on 5 April, the German offensive had already petered out.
The ADFGX and ADFGVX ciphers are now regarded as insecure.
References
[edit]- ^ Friedrich L. Bauer: Decrypted Secrets, Methods and Maxims of Cryptology. Springer, Berlin 2007 (4. Aufl.), S. 173, ISBN 3-540-24502-2.
- ^ Friedrich L. Bauer: Decrypted Secrets, Methods and Maxims of Cryptology. Springer, Berlin 2007 (4. Aufl.), S. 53, ISBN 3-540-24502-2.
- ^ a b c d "Codes and Codebreaking in World War I". Archived from the original on 3 May 2010. Retrieved 10 March 2010.
- ^ Newton, David E. (1997). Encyclopedia of Cryptography. Santa Barbara California: Instructional Horizons, Inc. p. 6.
- ^ "Painvin's manna had saved the French", wrote David Kahn, in The Codebreakers - The Story of Secret Writing, 1967, ISBN 978-0-684-83130-5, Chapter 9. Kahn also details the role that Painvin's decryption of German messages played in the French response to Operation Gneisenau.
Sources
[edit]- Childs, J. Rives, General Solution of the ADFGVX Cipher System, Aegean Park Press, ISBN 0-89412-284-3.
- Friedman, William F. Military Cryptanalysis, Part IV: Transposition and Fractionating Systems. Laguna Hills, California: Aegean Park Press, 1992.
External links
[edit]ADFGVX cipher
View on GrokipediaHistory
Invention and Development
The ADFGVX cipher was invented by Fritz Nebel, a lieutenant serving in the German Army's radio staff office within the Great General Staff, who lacked formal cryptographic training but designed the system specifically for secure field communications during the 1918 Spring Offensive.[1] Nebel developed the cipher in early 1918 as a direct improvement over his earlier creation, the ADFGX cipher, which used a 5x5 grid limited to the 26 letters of the alphabet and had been introduced on March 5, 1918.[5] The primary motivation was to create a more versatile manual cipher for radio transmission that incorporated digits alongside letters, addressing the ADFGX's inability to encode numbers efficiently while enhancing resistance to frequency analysis through a combination of fractionation and transposition techniques.[1] To accommodate 36 symbols—the 26 English letters plus the digits 0 through 9—Nebel expanded the substitution mechanism to a 6x6 Polybius square, which fractionated plaintext into digraphs for greater diffusion and security against interception.[5] The cipher's name derives from the six distinct letters A, D, F, G, V, and X, deliberately selected by Nebel for their highly dissimilar Morse code representations (A: .-, D: -.., F: ..-., G: --., V: ...-, X: -..-), which minimized the risk of transcription errors during wireless transmission over noisy channels.[1] This choice reflected practical considerations for frontline operators, prioritizing clarity in Morse over arbitrary symbols. Following initial testing of the ADFGX variant, the ADFGVX cipher—adding the "V" row and column to the grid—was officially adopted and introduced by the German Army on June 1, 1918, just before the launch of Ludendorff's major offensive on the Western Front.[5] This rapid evolution underscored the urgency of German cryptographic innovations amid World War I's escalating reliance on radio for command and control.[1]Military Deployment
The ADFGVX cipher was introduced by the German Army in June 1918 as an extension of the earlier ADFGX system, providing enhanced security for field communications during the closing stages of World War I.[6] It was rapidly adopted across the Western Front following its development as a secure alternative to prior ciphers vulnerable to Allied interception.[1] This deployment marked a shift toward more robust encryption for operational directives amid intensifying radio traffic. The cipher's scope centered on tactical and strategic messaging between divisions, corps, and higher army headquarters, facilitating coordination over distances beyond immediate front-line zones. Messages were primarily transmitted via radio telegraphy, with supplementary use of telephone lines for shorter-range relays or couriers for sensitive dispatches to minimize wireless exposure. On the Western Front, it supported command-level orders during retreats and defensive maneuvers, while on the Eastern Front—beginning in July 1918—it enabled communications with occupied territories, including the Balkans, Black Sea ports, and outposts in the Middle East. Notable instances included its application in post-Spring Offensive defenses through November 1918 and strategic updates on events like the Kiel Mutiny's repercussions.[6][1] Key management involved daily changes on the Western Front and initially every two days on the Eastern Front, shifting to every three days from September 1918, implemented through codebooks that derived the Polybius square and transposition keys from selected keywords. These practices aimed to limit exposure from compromised materials, with keys distributed securely among units and neighboring divisions occasionally sharing variants for interoperability.[6][1] In practice, the cipher faced limitations from the volume of intercepted radio traffic—initially around 25 messages per day on the Western Front, increasing before offensives—and procedural lapses such as operator transcription errors, which were common in cryptograms through misrecorded symbols or omitted characters. These issues, compounded by the reliance on manual encoding under battlefield pressures, heightened vulnerability to Allied monitoring despite the system's intended strength.[6][1]Design and Components
Polybius Square
The Polybius square forms the substitution foundation of the ADFGVX cipher, consisting of a 6×6 grid that accommodates the 26 letters of the alphabet (A–Z) and the 10 digits (0–9) across its 36 cells.[2] The rows and columns are labeled with the distinct letters A, D, F, G, V, and X, arranged in that fixed order, allowing each cell to be uniquely identified by a coordinate pair drawn from this set.[7] This structure extends the traditional 5×5 Polybius square to include numerical characters, enabling the cipher to handle both alphabetic and numeric plaintext while producing ciphertext exclusively in the six-letter alphabet.[8] The grid is filled with a randomized arrangement of the 36 characters to eliminate predictable patterns, achieved through a keyword-based derangement of the standard sequence.[9] The process begins by converting the keyword to uppercase and inserting its letters sequentially, omitting any duplicates while preserving the first occurrence of each. The remaining unused letters from A to Z are then appended in alphabetical order, followed by the digits 0 through 9 in ascending order, yielding a 36-character mixed sequence. This sequence is placed into the grid row by row, from left to right and top to bottom.[10] For instance, with the keyword "PRIVAT", the unique letters are P, R, I, V, A, T. The remaining letters (skipping those already used) are B, C, D, E, F, G, H, J, K, L, M, N, O, Q, S, U, W, X, Y, Z, followed by 0–9. The full sequence is thus P R I V A T B C D E F G H J K L M N O Q S U W X Y Z 0 1 2 3 4 5 6 7 8 9. The resulting grid is:| A | D | F | G | V | X | |
|---|---|---|---|---|---|---|
| A | P | R | I | V | A | T |
| D | B | C | D | E | F | G |
| F | H | J | K | L | M | N |
| G | O | Q | S | U | W | X |
| V | Y | Z | 0 | 1 | 2 | 3 |
| X | 4 | 5 | 6 | 7 | 8 | 9 |
Key Generation
The ADFGVX cipher employs a dual-key system, consisting of a substitution key used to construct the Polybius square and a separate transposition key that determines the column permutation during encryption.[1][2] The substitution key is an alphabetic keyword selected from military codebooks, which is processed by removing duplicate letters while preserving their first occurrence and then filling the remaining positions in the 6×6 Polybius square row-wise with the rest of the 26 letters A–Z followed by the digits 0–9 to reach 36 unique characters.[5][2][1] This keyword-derived filling randomizes the mapping of plaintext letters and digits to ADFGVX coordinate pairs, enhancing the fractionation step's diffusion. For example, using the keyword "PRUSSIAN" (with duplicates removed to "PRUSIAN"), the square might begin with P in row A column A, R in A-D, U in A-F, and continue alphabetically and numerically thereafter.[1] The transposition key is a distinct word or numeric sequence, often also drawn from codebooks, that specifies the order in which columns of the fractioned message are rearranged. To generate the permutation, the key's letters are ranked by their alphabetical order (with ties broken by their position in the key), assigning numbers from 1 to the key length to indicate reading order; columns are then sorted and read accordingly.[2][5] For instance, with the key "LEMON" (length 5), the letters rank as E (1, position 2), L (2, position 1), M (3, position 3), N (4, position 5), O (5, position 4), yielding column numbers 2, 1, 3, 5, 4—meaning the second column is read first, followed by the first, third, fifth, and fourth.[2] Keywords were changed frequently—typically every few days during World War I operations—to introduce randomness and thwart cryptanalytic pattern recognition, with codebooks ensuring standardized yet varied selections across units.[1] This periodic renewal, combined with the keys' lengths (often 16–23 for transposition), contributed to the cipher's initial resistance to frequency analysis.[1]Encryption Process
Fractionating Step
The fractionating step constitutes the initial substitution phase of the ADFGVX cipher, converting each plaintext character into a digram from the symbols A, D, F, G, V, X via a 6×6 Polybius square.[11] This process fractionates the message, replacing single letters with coordinate pairs that obscure the original structure and facilitate diffusion in subsequent steps.[9] To perform the fractionation, the plaintext is first prepared by converting to uppercase and removing spaces and punctuation; digits, if present, are mapped directly using their positions in the square.[9] Each character is then located in the keyed Polybius square—a grid filled with a keyword-derived sequence of the 26 letters and 10 digits—and replaced by the labels of its row and column.[11] The resulting digrams are concatenated into a single string of even length (twice the number of input characters), which is arranged as a rectangular block sized according to the transposition key length.[11] For illustration, consider the plaintext "MEET ME" processed with the following sample Polybius square (filled using a keyword like "KEYWORD" followed by remaining letters and digits):| A | D | F | G | V | X | |
|---|---|---|---|---|---|---|
| A | K | E | Y | W | O | R |
| D | D | F | G | H | I | L |
| F | M | N | B | C | P | Q |
| G | S | T | U | V | 0 | 1 |
| V | 2 | 3 | 4 | 5 | 6 | 7 |
| X | 8 | 9 | A | Z | X | J |
- M is at row F, column A: FA
- First E is at row A, column D: AD
- Second E is at row A, column D: AD
- T is at row G, column D: GD
- Second M is at row F, column A: FA
- Third E is at row A, column D: AD
Transposition Step
The transposition step rearranges the ADFGVX digrams produced by the fractionating step into a columnar transposition grid to further obscure the message. This process uses a keyword of length $ n $, forming a rectangular block with $ n $ columns and $ r = \lceil m / n \rceil $ rows, where $ m $ is the even length of the fractionated text.[2][5] The fractionated text is written into the grid row by row. If the total length $ m $ is not a multiple of $ n $, the incomplete last row is padded with nulls, such as 'X', to fill the grid completely; these nulls are later removed during decryption. The columns are then reordered according to a permutation derived from the keyword: the keyword letters are sorted alphabetically (with ties resolved by original position or additional numerical labels), assigning numbers 1 to $ n $ in that order, and the ciphertext is read column by column from top to bottom in numerical sequence.[2][3] For instance, consider the keyword "ZEBRAS" (length 6), which sorts alphabetically as A (position 5), B (3), E (2), R (4), S (6), Z (1), yielding read order 5-3-2-4-6-1. For a short fractionated text "ADFVGD" padded to 6 symbols as "ADFVGD" (1 row), the grid is:| Z | E | B | R | A | S |
|---|---|---|---|---|---|
| A | D | F | V | G | D |
Decryption Process
Inverse Transposition
The inverse transposition step reverses the columnar transposition applied during encryption, reconstructing the original sequence of ADFGVX symbols (digrams) from the ciphertext using the known transposition key. This process assumes the key and Polybius square are available to the recipient, focusing solely on reordering the symbols into a grid and extracting them row-wise to recover the fractionated text prior to substitution.[3] The transposition key, typically a keyword of length $ n n = 7 $), the sorted letters are G, H, I, K, N, S, T, corresponding to positions 4, 5, 3, 1, 2, 7, 6. Thus, the ciphertext fills column 4 first, followed by column 5, column 3, column 1, column 2, column 7, and column 6.[3][12] To build the grid, compute the number of rows $ r = \lceil L / n \rceil $, where $ L $ is the ciphertext length. The remainder $ L \mod n $ determines the column heights: the first $ L \mod n $ columns in the filling order receive $ r $ symbols, while the rest receive $ r - 1 $. The ciphertext is then written vertically into these columns in the permutation order, top to bottom. For a ciphertext of length 32 with the key "KNIGHTS", $ r = 5 $ and remainder 4, so columns 4, 5, 3, and 1 get 5 symbols each, and columns 2, 7, and 6 get 4 each.[3] After filling, read the grid horizontally row by row, left to right and top to bottom, omitting any unfilled cells in partial rows. This yields the pre-transposed sequence of symbols, grouped into digrams for the next step. In the example, filling the ciphertext "XGAVFXXVVADFXDFVADAXFXXDFAAVFDDA" produces the grid:| Col 1 | Col 2 | Col 3 | Col 4 | Col 5 | Col 6 | Col 7 |
|---|---|---|---|---|---|---|
| V | F | D | X | X | F | F |
| A | X | F | G | V | D | A |
| D | X | X | A | V | D | A |
| A | D | D | V | A | A | V |
| X | F | F | D |
Substitution Recovery
The substitution recovery phase of ADFGVX decryption reverses the initial fractionating step by converting the ordered sequence of digrams back into plaintext characters via the Polybius square. Once the inverse transposition has restored the digrams to their original sequence, the recipient processes them pairwise: the first symbol of each digram designates the row in the 6×6 grid, while the second designates the column. The character (a letter or digit) at that row-column intersection is retrieved as the corresponding plaintext element. This square, generated from a keyword to arrange the 36 symbols (A–Z and 0–9), ensures the mapping is unique and reversible when the key is known.[5][2] For example, consider a sample Polybius square filled with the alphabet and digits in standard order after keyword "KEY" (rows and columns labeled A, D, F, G, V, X):| A | D | F | G | V | X | |
|---|---|---|---|---|---|---|
| A | K | E | Y | A | B | C |
| D | D | F | G | H | I | J |
| F | L | M | N | O | P | Q |
| G | R | S | T | U | V | W |
| V | X | Z | 0 | 1 | 2 | 3 |
| X | 4 | 5 | 6 | 7 | 8 | 9 |