Skip to main content

ADFGX Cipher

ADFGX Cipher


The ADFGX cipher, sometimes referred to as the ADFGVX cipher, is one of the most famous codes in the entire history of cryptography. Introduced by the Germans in World War I, it is based on an ancient idea of associating letters with positions on a grid. Variations on the code have made communication possible across the walls of prison cells, and further intricacies added through the technique of transposition have made the code unbreakable without the aid of a computer.

Greek historian Polybius (fl.c. 200 b.c.) introduced what became known as the Polybius square, a 5 x 5 grid that used the 24 letters of the Greek alphabet. Each letter had a unique position identifiable by a coordinate system that numbered the rows and columns. For example, A was one column to the right of the point of origin, and one row down, so its coordinate would be 11. In the English alphabet, two letters are combined in a single square so that the 26 letters fit into the 25-square grid. Supposing I and J are combined, then K would be at position 25two rows down, and five squares over.

Over the centuries that followed, the Polybius square made possible a system of taps or knocks whereby prisoners could pass messages to one another across walls. Applied by groups ranging from Russian anarchists to American prisoners of war in Vietnam, the system has been described by writers as diverse as Arthur Koestler in Darkness at Noon, Aleksandr Solzhenitsyn in The Gulag

Archipelago, and Senator John S. McCain in Faith of Our Fathers. It has undergone countless variations based on the needs of the usersfor example, a 6 x 6 grid for the 33 letters of the Russian alphabetbut the basic principle remains the same. According to the English-language grid described earlier, for instance, K would be rendered by two rapid knocks or taps, a short break, and then five rapid knocks or taps.

The ADFGX Cipher in World War I. The ADFGX cipher, developed by German army radio officer Fritz Nebel (18911967), made its appearance on March 5, 1918, when the Germans used it in a wireless transmission on the western front. Instead of the numerals 1 through 5 along a side of the Polybius square, Nebel's cipher applied the letters A, D, F, G, and X, which he chose because their equivalents in Morse code were so dissimilar that confusion was unlikely. (For example, A is one dot and two dashes, while D is one dash and two dots.) Three months later, on June 1, the German army added the letter V to make a sixth row and column. The 6 x 6 grid of the ADFGVX cipher allowed the inclusion of the 10 numerals from 0 to 9, like its predecessor.

The brilliance of the ADFGX cipher lay in the fact that, unlike ordinary codes, the frequency of letters such as E was not easy to recognize. Furthermore, the code could become even more challenging by applying a system of transposition. Suppose a message is written out in ADFGVX formatthat is, as a series of two-letter combinations using just those six letters. That string of letters is then placed in a matrix under the letters of a chosen keyword, such as KAISER, which an army in wartime would typically change every day, Then the letters of the keyword are placed in alphabetical orderin this case, spelling AEIKRS, with the corresponding columns moved as well. After being transposed in this manner, the message is transcribed by reading down along each column, making it impossible for anyone who does not know the keyword to translate the message.

A modern computer would be capable of unscrambling such a transmission, even in a situation involving an unknown keyword, but the Allies in World War I were initially unable to break Nebel's code. However, French artillery captain Georges-Jean Painvin (18861980) did succeed in deciphering the code. Though his work was good only for a single day, it enabled the allied armies to counter the German offensive of June 9, 1918.



Haldane, Robert A. The Hidden War. New York: St. Martin's Press, 1978.

Konheim, Alan, G. Cryptography: A Primer. New York: Wiley, 1981.

Rosen, Kenneth H., and John G. Michaels. Handbook of Discrete and Combinatorial Mathematics. Boca Raton, FL: CRC Press, 2000.


Codes and Ciphers
Cryptology, History

Cite this article
Pick a style below, and copy the text for your bibliography.

  • MLA
  • Chicago
  • APA

"ADFGX Cipher." Encyclopedia of Espionage, Intelligence, and Security. . 20 Mar. 2019 <>.

"ADFGX Cipher." Encyclopedia of Espionage, Intelligence, and Security. . (March 20, 2019).

"ADFGX Cipher." Encyclopedia of Espionage, Intelligence, and Security. . Retrieved March 20, 2019 from

Learn more about citation styles

Citation styles gives you the ability to cite reference entries and articles according to common styles from the Modern Language Association (MLA), The Chicago Manual of Style, and the American Psychological Association (APA).

Within the “Cite this article” tool, pick a style to see how all available information looks when formatted according to that style. Then, copy and paste the text into your bibliography or works cited list.

Because each style has its own formatting nuances that evolve over time and not all information is available for every reference entry or article, cannot guarantee each citation it generates. Therefore, it’s best to use citations as a starting point before checking the style against your school or publication’s requirements and the most-recent information available at these sites:

Modern Language Association

The Chicago Manual of Style

American Psychological Association

  • Most online reference entries and articles do not have page numbers. Therefore, that information is unavailable for most content. However, the date of retrieval is often important. Refer to each style’s convention regarding the best way to format page numbers and retrieval dates.
  • In addition to the MLA, Chicago, and APA styles, your school, university, publication, or institution may have its own requirements for citations. Therefore, be sure to refer to those guidelines when editing your bibliography or works cited list.