 ## On the Subject of the Caesarean Role-Switching CM

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

From the Distance Cipher module by Eltrick, Depresso, and Obvious.

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

#### Encrypt Instructions

1. Prepend the letter on screen 1 to the encrypted word.
2. Repeat steps 3 - 6 for each letter of the encrypted word starting at the 2nd letter.
3. Take the (N - 1)th letter and subtract it by the Nth letter (A1Z26).
4. Add the resulting number from step 3 and add it to (N - 1)th letter of the encrypted word (A1Z26).
5. If the resulting number falls out of the range of 1 - 26, add/subtract until it is.
6. Turn the number back into a letter to get your Nth decrypted letter (A1Z26).

#### Decrypt Instructions

1. The letter shown on screen 1 is your 1st decrypted letter.
2. Repeat steps 3 - 6 for each letter of the encrypted word starting at the 1st letter.
3. Take the Nth letter of the decrypted word and subtract it by the Nth letter of the encrypted word (A1Z26).
4. Take the resulting number from step 3 and add it to the Nth letter of the decrypted word (A1Z26).
5. If the resulting number falls out of the range of 1 - 26, add/subtract until it is.
6. Turn the number back into a letter to get your (N + 1)th decrypted letter (A1Z26).
7. Remove the 1st letter of the decrypted word to get your decrypted word.

#### Example 1

Encrypted Word: AMUW
Screen 1: D
Using Encrypt Rules

D - A → D + 3 → G
A - M → A - 12 → O
M - U → M - 8 → E
U - W → U - 2 → S

Decrypted Word: GOES

#### Example 2

Encrypted Word: ZQLGX
Screen 1: H
Using Decrypt Rules

H - Z → H - 18 → P
P - Q → P - 1 → O
O - L → O + 3 → R
R - G → R + 11 → C
C - X → C - 21 → H

Decrypted Word: PORCH