## On the Subject of the ADFGX CM

A machine that knows no bounds when it comes to ciphers.

Create a key using the keyword on screen 1 and the Boolean Expression on screen A. Make sure to replace any Js with Is. Rearrange the key into a 5×5 matrix. Label the columns/rows of the matrix with ADFGX, left to right, top to bottom. This will be referred to as the ADFGX Key.

For each letter of the encrypted word, find them in the ADFGX Key and turn them into a row/col pair using the labels of the ADFGX Key. This is your new encrypted word.

Then take the keyword on screen 2 and write numbers underneath it in such a way that the letter that comes earliest in the alphabet gets the lowest number and the letter that comes latest in the alphabet gets the highest number. If there are any ties between letters, then the letter that comes first in reading order gets the lowest number and the letter that comes last in reading order gets the highest number. This will be referred to as the Number Key.

If the Submit Button is white, follow the instructions under Encrypt Instructions. Otherwise follow the instructions under Decrypt Instructions.

#### Encrypt Instructions

• Write the encrypted word underneath the Number Key so that it fits in the columns of the Number Key.
• Rearrange the columns so that the numbers are in ascending order.
• Read the letters top to bottom, left to right to get a new encrypted word.

#### Decrypt Instructions

• Put X dashes under the Number Key so that it fits in the columns of the Number Key. X is equal to the encrypted word’s length.
• In ascending order, take the encrypted word and replace all the dashes under the Number Key with the letters.
• Read the letters in reading order to get a new encrypted word.

Split the encrypted word into letter pairs. For each pair, use it as a row/col pair in the ADFGX Key to get a letter using the intersection of the pair. Finally, if any of the letters on screen 3 match at the same position as any of the letters of your encrypted word, replace that letter with a J. You should now have a decrypted word.

#### Example 1

Encrypted Word: DCXYR
Screen 2: GONE
Screen 3: WWAIC
Using Encrypt Rules

AACDEF
DGHIKL
FMPQRS
GTUVWX
XZBONY

GONE -> 2431

2431
GXXX
FG

DXAGFAXFXG → LEMON
LEMON + WWAIC → LEMON

Decrypted Word: LEMON

#### Example 2

Encrypted Word: CGOHHB
Screen 3: VFZNTL
Using Decrypt Rules

AROABC
DDEFGH
FIKLMN
GPQSTU
XVWXYZ