On the Subject of the Foursquare CM

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

This cipher uses 2 pages.

Create a key using the keyword on screen 1 page 1 and the Boolean Expression on screen A page 1. Make sure to replace any Js with Is. Rearrange the key into a 5×5 matrix. This will be called Matrix A.

Create a 2nd, 3rd, and 4th matrix by doing the same steps to create Matrix A but with the keyword on screen 2 page 1 and the Boolean Expression on screen B page 1 to create Matrix B, the keyword on screen 3 page 1 and the Boolean Expression on screen C page 1 to create Matrix C, and the keyword on screen 4 page 1 and the Boolean Expression on screen D page 1 to create Matrix D.

Form an 2x2 square of matrices with A in the top left, B in the top right, C in the bottom left, and D in the bottom right.

Split the encrypted word into pairs of letters. If there is an odd amount of letters, leave the last letter as the odd letter. Depending on which instruction is required, apply it to each pair of letters.

If the Submit Button is white, follow the instructions under Encrypt Instructions. Otherwise follow the instructions under Decrypt Instructions.

Encrypt Instructions

  • Find the 1st letter in Matrix A. Find the 2nd letter in Matrix D.
  • Find the intersection between A and D within B to get your 1st letter of the pair.
  • Find the intersection between A and D within C to get your 2nd letter of the pair.

Decrypt Instructions

  • Find the 1st letter in Matrix B. Find the 2nd letter in Matrix C.
  • Find the intersection between B and C within A to get your 1st letter of the pair.
  • Find the intersection between B and C within D to get your 2nd letter of the pair.

Finally, if any of the letters on screen 1 page 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

Encrypted Word: LVVSNCE
Screen 1 Page 2: FRNZMXI
Matrix A: BCDGHIKMOPQRSTUVWXYZFALEN
Matrix B: ABDFGIKMNPQRSUVWXYZCLOTHE
Matrix C: REMBACDFGHIKLNOPQSTUVWXYZ
Matrix D: WRAPINGBCDEFHKLMOQSTUVXYZ
Using Decrypt Rules

BCDGHABDFG
IKMOPIKMNP
QRSTUQRSUV
VWXYZWXYZC
FALENLOTHE
REMBAWRAPI
CDFGHNGBCD
IKLNOEFHKL
PQSTUMOQST
VWXYZUVXYZ

LV → FU
VS → ST
NC → IC
FUSTICE + FRNZMXI → JUSTICE
Decrypted Word: JUSTICE