On the Subject of The Red Cipher
Seeing red is the standard for this module.
All Is and Js are interchangeable in the decryption process.
The second display on page 1 can be disregarded.
- For each keyword on page 2, remove all duplicate characters, only keeping their first occurrence. Also prepare an alphabet with all letters from the keyword and the letter J removed.
- If the first digit of the SN is odd, place the alphabet at the end of keyword 1, else place it at the start.
If the second digit of the SN is even, place the alphabet at the end of keyword 2, else place it at the start.
If the last digit of the SN is odd, place the alphabet at the end of keyword 3, else place it at the start. - Arrange each 25-character string into a 5x5 matrix, labelled matrix 1-3.
- Take the top word on display 1 and Playfair it with matrix 1.
- If both letters are the same, keep them as-is.
- If both letters are on the same column, shift them both up one position.
- If both letters are on the same row, shift them both left one position.
- Otherwise, take the letter that is on the same row of this letter but on the column of the other letter for both in the pair.
- Get the coordinates of the word obtained above on matrix 2 in the form of row, then column. Write them all in a string then split this string into a 2x6 matrix.
- For each column of the number matrix above, treat them as coordinates in matrix 1 and turn them back into letters.
- Split the encrypted word above into three pairs. Find them in matrix 3.
- Playfair the pair.
- If both letters are the same, or they are on the same column, do nothing instead.
- If both letters are on the same row, do not Playfair them, but trade their positions. (do not modify the matrix)
- Otherwise, take the letter that is on the same row of this letter but on the column of the other letter for both in the pair.
- For each pair obtained above, get the coordinate of the first letter (in matrix 3) and look at that coordinate in matrix 1 for a letter of the final answer. Repeat with the coordinate of the second letter and matrix 2.