## On the Subject of the Gracie 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. Split the key into 2 equal halves and place the 2nd half underneath the 1st half. This will be referred to as the Gracie Key.

If there is a number on screen 2, take out the letter at that position in the encrypted word. Set aside this letter to be put back in at a later step. Split the encrypted word into pairs of letters. Depending on which instruction is required, apply it to each pair of letters.

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

#### Encrypt Instructions

• If the 2 letters are the same, replace each letter with the letter that is in the opposite column and opposite row of the Gracie Key.
• Otherwise, if the letters appear on the same row of the Gracie Key, replace them with the letters that are above/below them.
• Otherwise, if the letters appear on the same column of the Gracie Key, replace them with the letters immediately to their right, wrapping around when necessary.
• Otherwise, replace each of them with the letter on the same row but in the column of the other letter in the original pair.

#### Decrypt Instructions

• If the 2 letters are the same, replace each letter with the letter that is in the opposite column and opposite row of the Gracie Key.
• Otherwise, if the letters appear on the same row of the Gracie Key, replace them with the letters that are above/below them.
• Otherwise, if the letters appear on the same column of the Gracie Key, replace them with the letters immediately to their left, wrapping around when necessary.
• Otherwise, replace each of them with the letter on the same row but in the column of the other letter in the original pair.

Finally, if you took out a letter, insert that letter back into position equal to the number on screen 2.

#### Example 1

Encrypted Word: YOQATEL
Screen 2: 2
Using Encrypt Rules

 V E R Y A B C D F G H I J K L M N O P Q S T U W X Z

YOQATEL + 2 → YQATEL
YQ → CN
AT → FO
EL → RM
CNFORM + 2 + O → CONFORM
Decrypted Word: CONFORM

#### Example 2

Encrypted Word: HCZBPRMD
Using Decrypt Rules

 E D U C A T B F G H I J K L M N O P Q R S V W X Y Z

HC → WO
ZB → RK
PR → AB
MD → LE
Decrypted Word: WORKABLE