## 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:

A | F | L | Q | V |

B | G | M | R | W |

C | H | N | S | X |

D | I | O | T | Y |

E | K | P | U | Z |

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.