## On the Subject of the Quagmire CM

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

Create a key using the keyword on screen 1 and a true boolean value. Then create a Quagmire Key by writing the alphabet on the first row (alphabet row), and the next X rows underneath it being the key where X is equal to the length of the keyword on screen 2 (key rows). Shift each key row so that the left most column spells out the keyword on screen 2 top to bottom. The resulting 7 row key is the Quagmire Key.

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

#### Encrypt Instructions

• Find the Nth letter of the encrypted word in the alphabet row of the Quagmire Key.
• Replace that letter with the letter at the Xth key row in the same column. X is equal to N minus 1, modulo the number of key rows, plus 1.
• Do this for each letter of the encrypted word to get a decrypted word.

#### Decrypt Instructions

• Find the Nth letter of the encrypted word in the Xth row of the Quagmire Key. X is equal to N minus 1, modulo the number of key rows, plus 1.
• Replace that letter with the letter at the alphabet row in the same column.
• Do this for each letter of the encrypted word to get a decrypted word.

#### Example 1

Encrypted Word: NELEKJI
Screen 1: DERMAL
Screen 2: LEASE
Using Encrypt Rules

ABCDEFGHIJKLMNOPQRSTUVWXYZ
LBCFGHIJKNOPQSTUVWXYZDERMA
ERMALBCFGHIJKNOPQSTUVWXYZD
ALBCFGHIJKNOPQSTUVWXYZDERM
STUVWXYZDERMALBCFGHIJKNOPQ
ERMALBCFGHIJKNOPQSTUVWXYZD

NELEKJI → SLOWING

Decrypted Word: SLOWING

#### Example 2

Encrypted Word: TXGYDG
Screen 1: SLENDER
Screen 2: STAR
Using Decrypt Rules

ABCDEFGHIJKLMNOPQRSTUVWXYZ
SLENDRABCFGHIJKMOPQTUVWXYZ
TUVWXYZSLENDRABCFGHIJKMOPQ
ABCFGHIJKMOPQTUVWXYZSLENDR
RABCFGHIJKMOPQTUVWXYZSLEND

TXGYDG → TEETER

Decrypted Word: TEETER