#25 ADFGX and ADFGVX Cipher

1.1K 3 0
                                        

#Cryptography

LECTURE #25: ADFGX and ADFGVX CIPHER

Common question is: What’s the difference between the two?

ADFGX Cipher was a field cipher used by the German Army in the Western Front during World War I. AFFGX is a fractionating transposition cipher which combined a modified Polybius square with a single columnar transposition. On the other hand, Lieutenant Fritz Nebel (1891-1977) invented the ADFGVX cipher and was later introduced in March 1918. It was in fact an extension of the ADFGX.

ADFGX Cipher is named after the five (5) possible letters used in the ciphertext—A,D,F,G, and X. ADFGVX Cipher is named after the six (6) possible letters used in the ciphertext—A,D,F,G,V, and X. These letters were chosen deliberately because they sound very different from each other when transmitted via morse code. The intention was to reduce the possibility of operator error

ENCRYPTION:
ADFGX-
The key for ADFGX is a key square and a key word. The key square is 5x5 square containing all letters except letter J.
Q A Z X S
W E D C V
F R T G B
N H Y U I
M K L P O

Suppose that we need to encrypt the plaintext AVE FELLOW. A secret mixed alphabet is filled into a 5x5 Polybius square
A D F G X
A Q A Z X S
D W E D C V
F F R T G B
G N H Y U I
X M K L P O

To encode using the matrix, locate the letter from the plaintext in the matrix then read off the letter on the far left side on the same row, followed by the letter at the top in the same column. In which AVE FELLOW will be: AD DX DD FA DD XF XF XX DA. Next, the fractionated message is subject to a columnar transposition. We write out the message in rows under a transposition key:

C I P H E R
A D D X D D
F A D D X F
X F X X D A

Perform a columnar transposition. Sort the code word alphabetically, moving the columns as you go.
C E H I P R
A D X D D D
F X D A D F
X D X F X A

Read the final ciphertext in column:
AFXDXDXDXDAFDDXDFA

The same goes with the ADFGVX. But the difference is that ADFGVX is a 6x6 key square containing the numbers from 0-9 and all the letters.
N X 1 C 3 H
8 T B 2 O M
E 5 W R P D
4 F 6 G 7 I 
9 J 0 K L Q

Suppose that we need to encrypt WATSONIAN
   A D F G V X
A N X 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 A Z

FF XV DD XA DV AA GX XV AA

With the key word DR JOHN, we write it in rows then underneath it lies the message.
D R J O H N
F F X V D D
X A D V A A
G X X V A A

We then perform the Columnar Transposition Cipher by sorting out the keyword alphabetically moving the columns as you go.
D H J N O R
F D X D V F
X A D A V A
G A X A V X
It is then read in column:
FXGDAAXDXDAAVVVFAX

DECRYPTION:
ADFGX-
Divide the number of letter of the encrypted message by the number of letters of the keyword.
AFXDXDXDFDAFDDXDFA contains 18 letters while CIPHER contains 6.
18 is then divided by 6 and we will get the number of 3. The quotient will tell how many letters does each column has.
We will then arrange our keyword alphabetically and then place our message underneath it.
C E H  I  P R
A D X D D D
F X D A D F
X D X F X A
Now we need to rearrange the keyword back to itself while moving the column with it.
C  I  P H E R
A D D X D D
F A D D X F
X F X X D A
We will read it by row — AD DX DD FA DD XF XF XX DA. We will now find its equivalent in our keysquare.
AD DX DD FA DD XF XF XX DA=AVE FELLOW

The same process is applied in the ADFGVX Cipher.
FXGDAAXDXDAAVVVFAX contains 18 letters while out keyword, DR JOHN, has 6. 18 divided by 6 is 3.
D H J N O  R
F D X D V F
X A D A V A
G A X A V X
==
D R J O H N
F F X V D D
X A D V A A
G X X V A A

FF XV DD XA DV AA GX XV AA= WATSONIAN

With the same key square and the same keyword, message us the answer to these:

1. XFXDAFFFAVGAFXAAGV
2. GXGGDDAGGXXAGDDADD

*note: try them both with ADFGX and ADFGVX until you get the encrypted message

— Perkele —

Codes And CiphersWhere stories live. Discover now