ADFGVX Cipher (History and Example)

ADFGVX cipher is a fractionating transposition cipher that uses 6 by 6 square grid to replace the plaintext by pairs of letters among A, D, F, G, V, X and then this ciphertext get a permutation of its letters.

ADFGVX cipher combines an adapted Polybius Square with Columnar transposition, similar to trans-positing fractionated text.

To put is simply, in ADFGVX cipher, a polybius square is used normally, but the headings of the rows and columns are the letters ADFGX for a 5 by 5 grid or ADFGVX for a 6 by 6 grid.

A brief history of ADFGVX cipher:

It was invented by Colonel Fritz Nebel around 1918. It was even used by the German Army during the world war 1 as a field cipher.

It is also an extension of the earlier ADFGX cipher which worked in a very similar way.

The V was added to the original ADFGX cipher so that all 26 letters and the 10 digits could be encrypted easily.

The army preferred ADFGVX cipher to trench codes since they could easily encrypt messages while on the move.

Are you interested in finding out more about ciphers and codes?

The Codebreakers – The Story of Secret Writing book by David Kahn is what I would start with.

ADFGVX Cipher

In this guide I will be discussing the following:

  • How to solve ADFGVX cipher.

How to solve ADFGVX cipher

How to encrypt using ADFGVX cipher

First I need to make sure my message only contains digits and Latin letters in lowercase. All other characters, like punctuation are skipped.

Then I fill the “adfgvx” table with my secret alphabet. I can also use a secret keyword then fill in the square with the other letters of the alphabet in order.

Here is an example:

Plaintext: Kifanga.

Secret alphabet: dhxmu4p3j6aoibzv9w1n70qkfslyc8tr5e2g

Here is my table or square to be used during encryption:

\  A D F G V X
 \------------
A| d h x m u 4
D| p 3 j 6 a o
F| i b z v 9 w
G| 1 n 7 0 q k
V| f s l y c 8
X| t r 5 e 2 g

Using the above square, I convert the message to fractionated form. That is, row followed by column.

For example, plaintext letter “K” fractionated form is “GX”.

Thus, fractionated message:

k  i  f  a  n  g  a
GX FA VA DV GD XX DV

Then, I create a new table with a key as the heading.

For example, the key is “Cipher”. If the key contains duplicated letters, only the first one should be used.

So, “Kifanga” becomes “Kifang”.

c i p h e r
-----------
G X F A V A
D V G D X X
D V

Then i sort the columns alphabetically based on the keyword.

Thus, the table changes to this form:

c e h i p r
-----------
G V A X F A
D X D V F X
D     V

Finally, I read off my encrypted message in columns, in keyword order.

Thus, ciphertext: GDDVXADXVVFFAX.

How to decrypt ADFGVX cipher

First you need to undo the Columnar transposition by writing the ciphertext in the grid in the right way.

Then read off the rows, with the keyword correctly ordered, and finally convert the pairs of letters back to plaintext using the mixed square.

How to recognize an ADFGVX ciphertext

The cipphertext must contain only 6 distinct characters: A, D, F, G, V, and X. Also the encoded message must have number of character divisible by the permutation length.

How to recognize a non-permuted text

If the ciphertext has not been permuted, the text is a bigrammic substitution. After a substitution by a random alphabet, the text should have a correct index of coincidence.

How to decipher ADFGVX without key for permutation

You can crack ADFGVX and find the permutation order without knowing the key by brute forcing all possible permutations.

How to decipher ADFGVX without grid

You can crack ADFGVX and find the substitution grid by making an alphanumeric replacement of the bigrams resulting from the permutations.

How to decipher ADFGVX without key nor grid

You can crack ADFGVX without the key nor the grid by first finding the permutation and then do an alphabetical substitution.

Why the letters ADFGVX

The letters A, D, F, G, V, and X have been selected because their equivalent in morse code are very unique. Thus, preventing transmission error by radio.

What is the GEDEFU 18

GEDEFU 18 for GEheimschrift DEr FUnker 18, which can be translated in radio-operators’ cipher 18 is the old name of ADFGVX cipher.

What is ADFGX

ADFGX is the earlier version of ADFGVX, a variant that used a 5 by 5 square based on the Polybius Square Cipher.

Who cracked ADFGVX cipher

Georges Jean Painvin is recognized as the first person that broke this cipher in June 1918. Among the decrypted messages, one text was nicknamed The radiogram of the victory because it allowed France to win a battle in June 1918.

What is the Roitelet Theorem

The theorem of Roitelet is a novel by Frédéric Cathala, which has as protagonist a spy during the first world war having messages encrypted with ADFGVX.

Are you interested in learning how to break codes?

The Elementary Cryptanalysis – A Mathematical Approach book by Abraham Sinkov is what I would recommend.

Add Comment