ADFGX Explained: 5 Facts About the Cipher That Nearly Won a War

ADFGX explained in plain terms means understanding the field cipher that Germany trusted with its most secret orders in the spring of 1918, a design that scrambles messages twice, once with a square and once with a transposition. The central question is how a cipher built from only five letters could be strong enough for a battlefield, and the answer is that those five letters were chosen because they sound different in Morse code, and the double scrambling behind them kept the cipher safe until one French officer broke it.

ADFGX is a manual cipher designed by the German signals officer Fritz Nebel and introduced in March 1918, during the First World War. It was used to encrypt German army radio messages, and it is built so that every letter of the message is first replaced by a pair of symbols from a square, and then the pairs are shuffled by a columnar transposition.

This article gives you five facts about ADFGX, explains what it is, how it works, and why it still matters.

Key takeaways

  • ADFGX is a German First World War field cipher from 1918.
  • It uses a 5 by 5 Polybius square with the letters A, D, F, G and X.
  • It combines fractionation with a columnar transposition.
  • It was broken by the French officer Georges Painvin.
  • It is used in teaching and in cipher history today.

What ADFGX is

The first fact is that ADFGX is a fractionating cipher. Each letter of the message is replaced by two symbols, which means the letters of the plaintext are split apart and mixed before they are shuffled, and that splitting is what makes the cipher strong, because an attacker who intercepts the message sees only fragments, never whole letters.

The second fact is that it uses only five letters, A, D, F, G and X. Those letters were chosen because their Morse code signals are hard to confuse with each other, which means a radio operator copying a message by ear was unlikely to mistake one for another, and that practical choice is what made the cipher usable in the noise and stress of the front line.

The third fact is that it hides the message twice. The Polybius square replaces each letter with a pair of symbols, and then the columnar transposition shuffles all of those symbols into a new order, which means the cipher is two ciphers in one, and breaking it means undoing both layers, not just one.

The fourth fact is that it was broken by one man. The French cryptanalyst Georges Painvin worked on ADFGX through the spring of 1918, and in June he broke the message that revealed the German offensive towards Paris, which means his work changed the course of the war, and the cipher that was meant to protect an army ended up betraying it.

The fifth fact is that ADFGX grew a sixth letter. In June 1918 the Germans added the letter V, making ADFGVX, so that digits could be encrypted too, which means the cipher kept evolving even as it was being broken, and that evolution is why both versions are remembered together today.

Our guide to Enigma explains the machine cipher that followed ADFGX by a generation, and our guide to Lorenz explains the cipher that guarded Hitler’s own messages.

How ADFGX works

Everything starts with the square, which is a five-by-five grid filled with twenty-five letters of the alphabet, with J merged into I. The rows and columns of the square are labelled A, D, F, G and X, which means every letter in the square has a unique pair of labels, and because the square is the key, changing the square changes the whole cipher.

Each letter begins by finding its pair in the square. The sender looks up the plaintext letter, reads off its row label and then its column label, and writes down the two symbols, which means a message of ten letters becomes twenty symbols, and because each letter is split into two, the structure of the original message is already hidden.

The transposition is what makes the cipher work as a whole. The pairs are written into rows under a keyword, and then the columns are read out in the alphabetical order of the keyword letters, which means the symbols are shuffled across the whole message, and because the two halves of each pair end up far apart, an attacker cannot tell which symbols belong together.

The keyword is what holds the transposition together. Both sides must agree on the keyword, and the columns are reordered according to the alphabetical rank of its letters, which means the keyword is the second key of the cipher, and because the keyword changes with each message, every message is shuffled differently.

The output is a stream of the five letters that looks like nonsense. The ciphertext keeps none of the word lengths and none of the letter frequencies of the original, which means a reader who counts symbols learns almost nothing, and that flat frequency profile is part of why the cipher resisted attack for months.

Decryption runs the same steps in reverse, starting with the transposition and working backwards to the square. The receiver writes the ciphertext into columns in keyword order, reads the rows to recover the pairs, and looks each pair up in the square, which means the same key serves both directions, and that symmetry is standard for a cipher of this family.

A dark office desk with a laptop showing a glowing green cipher diagram, a brass key and a notebook beside it
A dark office desk with a laptop showing a glowing green cipher diagram, a brass key and a notebook beside it, shows how ADFGX works: letters take turns through a five-by-five square and a shuffled column order, pair after pair, until the message is hidden.

Comparing ADFGX with other classical ciphers

ADFGX is one of several classical ciphers, and each was built with a different emphasis. The Playfair cipher encrypts letters in pairs with a square but no transposition, the Vigenère cipher shifts letters with a keyword but never splits them, and ADFGX is the one that both splits letters and shuffles them, while each approach trades something for something else.

The table below sets out the main contrasts between the leading approaches.

Aspect ADFGX Playfair Vigenère
Method Square plus transposition Digraph square Keyword shifts
Alphabet Five symbols Twenty-five letters Full alphabet
Era First World War 19th century 16th century
Key Square and keyword Square Keyword
Best for History lessons History lessons History lessons

The practical result is that ADFGX is the right choice for history lessons, Playfair suits history lessons too, and Vigenère fits history lessons instead.

Where ADFGX is used

Teaching uses it as the fractionation example. Cryptography courses introduce ADFGX when they teach fractionation, because it is the clearest example of splitting letters before shuffling them, and a student who understands ADFGX understands why two weak layers can make one strong cipher.

History uses it to tell the story of 1918. The breaking of ADFGX by Georges Painvin is one of the great stories of signals intelligence, and the cipher is remembered wherever that story is told, which means it survives as history long after it stopped being a serious tool.

Puzzles use it to hide messages with flair. Puzzle hunts and escape rooms use ADFGX because its five-letter ciphertext looks strange and satisfying, which means the cipher survives as a game, and its Morse-proof letter choice is a detail puzzlers love to discover.

Software uses it as a test case. When someone builds a cipher library or a puzzle app, ADFGX is often one of the classical ciphers they implement, because it combines two techniques in one design, and a platform that handles ADFGX correctly is ready for harder ciphers.

Standards history uses it to mark the radio era. ADFGX was built for radio, where messages could be intercepted by anyone with an aerial, and it represents the moment when cryptography moved from paper to the airwaves, which means historians of the field return to it whenever they ask how war changed the cipher.

Strengths and limits

The greatest strength of ADFGX is its double layer. A cipher that splits letters and then shuffles them hides both the letters and their positions, and that double hiding is real, measured in the months it resisted the best French cryptanalysts and confirmed by the effort Painvin needed to break it.

It is also a strength that the design was built for its channel. A cipher whose symbols were chosen to survive Morse code shows what happens when cryptography is designed for the real world, and that practicality is worth more than cleverness in a field where a cipher that operators cannot use is a cipher that fails.

The limits are total, though, and the biggest is that ADFGX is broken. Painvin’s methods work against it, modern computers break it in minutes, and the five-letter alphabet is far too small for modern security, which means ADFGX must never be used for anything that needs secrecy, and its value today is entirely as a teacher.

ADFGX checklist

  • Use ADFGX for teaching and puzzles, never for secrets.
  • Remember it combines a square with a transposition.
  • Study its five letters to understand Morse-proof design.
  • Compare it with Playfair to see the transposition trade-off.
  • Note Painvin broke it in June 1918.
  • Try the ADFGVX variant to see how digits were added.
  • Keep real secrets behind modern encryption, not ADFGX.
  • Read Painvin’s story to see cryptanalysis change a war.
  • Choose AES for any system that needs real protection today.

Frequently asked questions

What is ADFGX in simple terms?

It is a German First World War cipher that replaces each letter with two symbols from a five-by-five square, then shuffles all the symbols with a keyword transposition.

Why is it called ADFGX?

After the five letters used to label the rows and columns of its square, A, D, F, G and X, chosen because they are hard to confuse in Morse code.

How is ADFGX different from Playfair?

Both use a square, but ADFGX splits each letter into two symbols and then transposes them, while Playfair encrypts letters in pairs with no transposition.

Is ADFGX still secure?

No, Georges Painvin broke it in 1918, and modern computers break it in minutes, so it offers no security against a determined attacker today.

Where is ADFGX used?

In teaching, in puzzles, in escape rooms, and in the history of signals intelligence, wherever a famous broken cipher is needed.

When should I use ADFGX?

When you teach fractionation, when you tell the story of 1918, or when you want a classical cipher that combines two techniques in one design.

The bottom line

ADFGX explained in one line is this: the five-letter cipher that nearly won a war, a double-layered design from 1918 that proved two weak layers can make one strong cipher.

It is proof that practical design matters as much as mathematics, and the reason it still matters is that every cipher designed since has been judged partly by the lesson ADFGX taught.

This article is general information about how ADFGX works, not advice about choosing encryption for a particular device or system.

Latest articles

Scroll to Top