On the Subject of the Gridlock CM

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

Create a key using the keyword on screen 1 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 referred to as the Gridlock Key.

Take the digit string from screen 2 and place a cursor at the 1st digit.

For each letter of the encrypted word, do the following:

  • 1: Start at the space that contains the Nth letter of the encrypted word in the Gridlock Key.
  • 2: Repeat steps 3 - 6 until you reach a gridlock.
  • 3: Mark the space that you're currently at.
  • 4: Add the digits in the digit string at the cursor and to the right of the cursor, modulo 10. Append this digit to the digit string.
  • 5: Take the digit at the cursor and turn it into an instruction via the Instruction Table. Move the cursor to the right 1 digit.
  • 6: If the instruction tells you that you're in a gridlock, the current letter that you're on becomes your Nth decrypted letter.
  • 7: Reset the Gridlock Key so that all the spaces become unmarked.

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

Instruction Table

01234
Move N, wrapping around, until you reach an unmarked space. If you can't, then it's a gridlock.Move NE, wrapping around, until you reach an unmarked space. If you can't, then it's a gridlock.Move E, wrapping around, until you reach an unmarked space. If you can't, then it's a gridlock.Move SE, wrapping around, until you reach an unmarked space. If you can't, then it's a gridlock.Move S, wrapping around, until you reach an unmarked space. If you can't, then it's a gridlock.
56789
Move SW, wrapping around, until you reach an unmarked space. If you can't, then it's a gridlock.Move W, wrapping around, until you reach an unmarked space. If you can't, then it's a gridlock.Move NW, wrapping around, until you reach an unmarked space. If you can't, then it's a gridlock.If all the spaces orthogonally adjacent, wrapping around, are marked, then it's a gridlock. Otherwise, mark all of those spaces.If all the spaces diagonally adjacent, wrapping around, are marked, then it's a gridlock. Otherwise, mark all of those spaces.

Example

Encrypted Word: KXZLVH
Screen 2: 326
Screen 3: ENVRLX

AB11C10D*E7
F6GHI*K1
L2M3PQ*R4
UV*W*X5Y*
Z*T9O12N*S8
KLMRXXFEESTCBOO
326581394236591405
AB6CDE
F*GH*IK
LMPQ3R
UVW4X1Y
Z*TO5N2S
XNQWOBB
4054599483
A2B*CD5E*
F*G3H4IK
L*M6P*QR
U*V8W7XY
Z1T*O*NS
ZAAGHDMWVVV
48321536894731
A*B10C*DE15
F*G12H5IK2
L1M13P4Q7R
UV3W6X8Y
Z*T11O9N14S
LKVPHWQXOBBTGGMNE
73104145590494337603
ABC6DE
FG*HI*K
L3MPQR
U2V1WXY
ZT5O4N*S
VULOTCC
6036399281
A*B7C*D*E3
F*G6H1I2K*
LM5PQ*R
U*VW*X*Y
Z*T8O*NS4
HIIESSMMGBBTT
2810919009099988

OBVECT + ENVRLX → OBJECT

Decrypted Word: OBJECT