## On the Subject of The Red Cipher

Seeing red is the standard for this module.

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 the right arrow takes you to the next page. Pressing the left arrow takes you to the previous page. There is a total of 2 pages.

On page 1, the top screen shows a 6 letter encrypted word, the middle screen shows a 6 letter string. If the encrypted word has any Js, replace each J with the letter in the same position as the string in the middle screen. After you do all 3 steps, change the letter(s) back into a J.

On page 2, all 3 screens show a word. The top screen will be referred to as KW1, the middle screen will be called KW2, and finally the bottom screen will be KW3.

Take the encrypted word and follow the mechanics down below:

### Step 1: Tri-square Cipher

This step require 3 matrices and the encrypted word from the top screen of page 1.

To create the 1st matrix, first replace any Js with Is in KW1, and remove any duplicates so each letter occurs once. Then take the alphabet and remove any occurences of all the letters in your current key.

If the first digit of the serial number is odd, place the alphabet at the end of your key. Otherwise place the alphabet at the beginning of your key.

Rearrange the new 25 length string into a 5x5 matrix.

To create the 2nd matrix, first replace any Js with Is in KW2, and remove any duplicates so each letter occurs once. Then take the alphabet and remove any occurences of all the letters in your current key.

If the second digit of the serial number is even, place the alphabet at the end of your key. Otherwise place the alphabet at the beginning of your key.

Rearrange the new 25 length string into another 5x5 matrix.

To create the 3rd matrix, first replace any Js with Is in KW3, and remove any duplicates so each letter occurs once. Then take the alphabet and remove any occurences of all the letters in your current key.

If the last digit of the serial number is odd, place the alphabet at the end of your key. Otherwise place the alphabet at the beginning of your key.

Rearrange the new 25 length string into another 5x5 matrix. You should now have 3 matrices.