On the Subject of the Bazeries CM

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

For this, you will need 2 matrices. The first matrix, Matrix A, is already done for you:

AFLQV
BGMRW
CHNSX
DIOTY
EKPUZ

Turn each number on screen 1 into their word formats. Then create a key using the words as the keyword and the Boolean Expression on screen A. Make sure to replace any Js with Is. Rearrange the key into a 5×5 matrix. This will be called Matrix B.

Divide the encrypted word into subgroups of N letters where N equals the sum of the numbers on screen 1, modulo the length of the encrypted word minus 1, plus 2.

For each subgroup, reverse the letters inside of it.

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 Matrix A.
  • Use the row/col from Matrix A in Matrix B to get your Nth decrypted letter.
  • 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 Matrix B.
  • Use the row/col from Matrix B in Matrix A to get your Nth decrypted letter.
  • Do this for each letter of the encrypted word to get a decrypted word.

Finally, if any of the letters on screen 2 match at the same position as any of the letters of your encrypted word, replace that letter with a J. You should now have an decrypted word.

Example 1

Encrypted Word: WKSO
Screen 2: KAFD
Key: 7570
Matrix B: ABCDGHKLMPQTUWXYSEVNFIZRO
Using Encrypt Rules

7 + 5 + 7 + 0 → (19 mod (4 - 1)) + 2 → 3 + WKSO → WKS O → SKWO
SKWO → WIPE
WIPE + KAFD → WIPE
Decrypted Word: WIPE

Example 2

Encrypted Word: IMMADGYI
Screen 2: TAVUUHZA
Key: 2799
Matrix B: TWOSEVNIABCDFGHKLMPQRUXYZ
Using Decrypt Rules

2 + 7 + 9 + 9 → (27 mod (8 - 1)) + 2 → 8 + IMMADGYI → IMMADGYI → IYGDAMMI
IYGDAMMI → MUSHROOM
MUSHROOM + TAVUUHZA → MUSHROOM
Decrypted Word: MUSHROOM

Example 3

Encrypted Word: CBKHQNM
Screen 2: DIEDFBP
Key: 5422
Matrix B: FIVEOURTWABCDGHKLMNPQSXYZ
Using Encrypt Rules

5 + 4 + 2 + 2 → (13 mod (7 - 1)) + 2 → 3 + CBKHQNM → CBK HQN M → KBCNQHM
KBCNQHM → SUBDECT
SUBDECT + DIEDFBP → SUBJECT
Decrypted Word: SUBJECT