## On the Subject of the Inverted Magenta Cipher

The color magenta doesn't exist, it is your brain trying to make sense of your red and blue cones activating while the green is inactive. This cipher is merely a pigment of your imagination.

On the module, you will see 3 screens, a keyboard, 2 arrows, and a submit button that displays the current page you're on.

Pressing any of the arrows will only clear any letters that you have pressed since there is only 1 page for this cipher.

The top screen shows a 6 letter encrypted word, the middle screen displays a number, and the bottom screen shows a 3 letter key.

### Step 1: Autokey Cipher

For this, you will need the encrypted word from the top screen and the key from the bottom screen. Modify the key by adding the first 3 letters of the encrypted word to the end of the key.

Take the first letter of your encrypted word and the first letter of the key and turn them into numbers using their alphabetic positions.

Now take the sum of the 2 numbers, and then turn the new number back into a letter treating as its alphabetic position.

If the resulting number is 27 or above, subtract 26 until the number is between 1 - 26.

Repeat this for each letter to get a new encrypred word.

#### Example

Encrypted Word: NYFNCM Key: OMP -> OMPNYF

N, O -> 14 + 15 -> 29 - 26 -> 3 -> C
Y, M -> 25 + 13 -> 38 - 26 -> 12 -> L
F, P -> 6 + 16 -> 22 -> V
N, N -> 14 + 14 -> 28 - 26 -> 2 -> B
C, Y -> 3 + 25 -> 28 - 26 -> 2 -> B
M, F -> 13 + 6 -> 19 -> S

New Encrypted Word: CLVBBS

### Step 2: Myszkowski Transposition

Create a key by taking the letters in the serial number and assign each letter in alphabetical order, ties included, where 1 is a letter that occurs earliest from the alphabet.

Write the encrypted word you got from step 1 underneath the key so that it fits in the columns of the key in reading order.

Read each letter in ascending numerical order. In the case of duplicate numbers in the key, read them from left to right, top to bottom for the current duplicate number. You should now have a new encrypted word.

#### Example

Encrypted Word: CLVBBS
Letters: LPWP

 L P W P 1 2 3 2 C L V B B S

New Encrypted Word: CBLBSV

### Step 3: Affine Cipher

The encrypted word can be decrypted using this formula: ((C * E) + X) % 26

X is calculated by taking the sum of the serial number digits, modulo 25, plus 1. E is the number displayed on the middle screen.

For each letter, turn it into a number using their alphabetic positions, plug it into the variable C in the equation, and turn the resulting value back into a letter. Note: Z can be both 0 and 26.

You should now have a decrypted word.

#### Example

Encrypted Word: CBLBSV
Middle Screen: 21
X: ((7 + 3) % 25) + 1 = 11

C -> ((3 * 21) + 11) % 26 -> 22 -> V
B -> ((2 * 21) + 11) % 26 -> 1 -> A
L -> ((12 * 21) + 11) % 26 -> 3 -> C
B -> ((2 * 21) + 11) % 26 -> 1 -> A
S -> ((19 * 21) + 11) % 26 -> 20 -> T
V -> ((22 * 21) + 11) % 26 -> 5 -> E

Decrypted Word: VACATE

Once you finally have your decrypted word, you can submit it. Once you start typing, all the screens will go black and the bottom screen will show what you are typing.

To clear it, just click one of the arrows. This goes to one of the pages and clears any input you put in. It will not let you go over 6 letters on input.

Once you are satisfied with your input, press the button labeled "SUB" to submit your answer. On a strike, the module will go back to the first page of the module, but it does not regenerate.