On the Subject of Unfair’s Forgotten Ciphers

The display on the top shows an encrypted message. There is also a strip of LEDs underneath the display which will light up depending on what page the defuser is on.

In this state, the buttons in the middle can be selected at any point to cycle between pages and toggle between submitting the words and viewing pages.

All ciphers mentioning the alphabet in this manual will correspond to the English alphabet: “ABCDEFGHIJKLMNOPQRSTUVWXYZ”, unless otherwise stated. Alphabetic position mentioned in this manual will correspond to the A1Z26 equivalents, unless otherwise stated.

The right screen on page 1 will always have its strike counter in RED and its module ID in WHITE.

The functions for the buttons while the module is not in submission mode is the following, with the directional button representing the buttons in between Inner Center and Outer Center:

  • Left: Go to page 1 on the module.
  • Up: Go to page 2 on the module.
  • Right: Go to page 3 on the module.
  • Down: Go to page 4 on the module.
  • Outer Center: Toggle between submission and viewing pages.
  • Inner Center: If held, shows the names of the colors displayed on pages 3 and 4. This can be used EVEN IF the user has colorblind mode disabled for this module.
  • Right Screen: Swaps contents displayed on the right and top. The manual will refer to the instructions as if the right screen was not pressed at all.

Decrypting — Step 1: Binary Code Retrieval and Obtaining Keys

On page 2, there will be a long string of characters on the top and right displays. The full binary string is obtained by the following procedure:

  1. Concatenate the text on this page’s top and right displays in that order.
  2. Convert this encoded string to binary by replacing each letter with its binary code using the table below.
    A0B1C00D10E01F11
    G000H001I100J101K010L011
    M110N111O0000P1000Q0001R1001
    S0100T1100U0101V1101W0010X1010
    Y0011Z1011
  3. On page 3, both screens consist of up to 9 keywords, which when concatenated and only accounting for the first occurrences of each letter, form a keystring that will be used to decrypt when the Huffman tree is completed.
    • Concatenations should be done in reading order of the keywords obtained, starting with the top, then the right screen
    • Discard a keyword if it contains all of the letters previously encountered when concatenating.

Decrypting — Step 2: Red Huffman Cipher

Using the binary string obtained from step 1, perform the following procedure until 10 leafing nodes are obtained, where a leafing node is a node at the end of the tree. Binary digits are to be read once from left to right, and never traced back.

  1. Start with the two leafing nodes: “0” and “1”.
  2. Read binary digits in a sequence until the only node that matches that binary sequence is reached.
  3. Split that node into two parts, with both entries starting with the binary sequence and ending with “0” and “1” respectively. Maintain the order of the leafing nodes when splitting.
  4. Repeat the previous two steps.

After obtaining a portion of the Huffman tree, the binary string must then be used to obtain numbers used for the 3×3 Hill Cipher. 18 digits should be obtained in this manner before continuing to construct the full Huffman tree.

  1. Assign digits 0–9 in that order to each leafing node, prioritizing the nodes starting with 0 in the tree.
  2. Read binary digits until a leafing node is encountered. Note down that digit and restart at the top.
  3. Repeat the previous step until enough digits have been obtained.

Once 18 digits have been obtained, resume constructing the Huffman tree until 16 more leafing nodes have been constructed, for a total of 26 leafing nodes. Assign each letter in the keystring to each leafing node, again prioritizing nodes starting with 0.

Read through the rest of the binary string to get a 4-8 letter word and a string of repeated letters. The repeated letters at the end should be discarded. The rest of the string obtained is the keyword for the next step.

Example — Red Huffman Cipher Construction

The first 8 iterations are shown here.

Starting Binary String: 0111100000110101

[0][1]

Binary String After Split #1: 111100000110101

[00][01][1]

Binary String After Split #2: 11100000110101

[00][01][10][11]

Binary String After Split #3: 100000110101

[00][01][10][110][111]

Binary String After Split #4: 0000110101

[00][01][100][101][110][111]

Binary String After Split #5: 00110101

[000][001][01][100][101][110][111]

Binary String After Split #6: 10101

[000][0010][0011][01][100][101][110][111]

Binary String After Split #7: 01

[000][0010][0011][01][100][1010][1011][110][111]

Leafing Nodes After 8 Splits:

[000][0010][0011][010][011][100][1010][1011][110][111]

Example — Red Huffman Cipher Binary Read

6 digits are read in this example.

Starting Binary String: 0001011001100110010111

[000][0010][0011][010][011][100][1010][1011][110][111]
0123456789

“000”, 0

Current Binary String After Digit #1: 1011001100110010111

[000][0010][0011][010][011][100][1010][1011][110][111]
0123456789

“1011”, 7

Current Binary String After Digit #2: 001100110010111

[000][0010][0011][010][011][100][1010][1011][110][111]
0123456789

“0011”, 2

Current Binary String After Digit #3: 00110010111

[000][0010][0011][010][011][100][1010][1011][110][111]
0123456789

“0011”, 2

Current Binary String After Digit #4: 0010111

[000][0010][0011][010][011][100][1010][1011][110][111]
0123456789

“0010”, 1

Current Binary String After Digit #5: 111

[000][0010][0011][010][011][100][1010][1011][110][111]
0123456789

“111”, 9

Digits obtained: 072219

Decrypting — Step 3: RGBA Decomposition Cipher

The diagram provided shows all 27 colours that can appear on this module. On page 3, 6 LEDs are coloured, such that when used on each letter and operator, will correspond to a decrypted letter’s position.

Take the keyword obtained from step 2, remove any duplicate letters while retaining the first occurrences of each. Take the alphabet and remove any letters present in the keyword.

If “MODULE ID:” is present on the first line on the right screen of page 1, place the alphabet at the end of the keyword. Otherwise, place the alphabet at the start of the keyword. The order of placing letters starts at - and ends at +, according to the diagram provided.

On page 4, 3 LEDs will be shown in different shades of R, G, and B, though they may not be in that order. The 3 LEDs dictate the channel order that the letters in the keystring should be placed in (e.g. GBR would mean that all Green channels must be placed first, then all Blue, then all Red), and when rearranged in RGB order, will correspond to a colour that should be skipped over when placing the keystring.

  • Each LED is the result of a primary colour (Red, Green, or Blue), averaged with itself, Black, or White
  • If the LED is the result of a primary colour averaged with
    • Black, the primary colour’s representation is -.
    • Itself, the primary colour’s representation is 0.
    • White, the primary colour’s representation is +.

Decrypting — Step 3: RGBA Decomposition Cipher (Continued)

Also on page 4, there are 3 lines of strings showing transformations for each channel. Convert letters from the top screen of page 1 to their corresponding colours, resulting in 6 triplets. rearrange these triplets into a right triangle, where the first line has three triplets, the second has two, and the last has the remaining triplet. The 3 strings displayed on the top screen will be in RGB order from top to bottom, shifted to the right by the number of ports, in RGB order (R -> G -> B), wrapping around to R if on B. The transformations are then applied to this triangle for each channel in the order shown on the module. If a channel has “NONE”, that means no transformations were applied to that channel. Then, grab the displayed colours and rearrange them into a right triangle as above. This forms 6 pairs of triplets.

  • “TL”: Flip individual rows horizontally of that channel.
  • “TR”: Flip individual columns vertically of that channel.
  • “BL”: Swap rows and columns of that channel. (B1 <-> A2)
  • “BR”: That channel is inverted. In other words, - -> + and vice versa for that channel; channels with a value of 0 should not be modified with this.

The operators to be applied are displayed on the right screen of page 4. The operations are applied in order of the formed pairs of triplets, wrapping around to the first operator once the end is reached. The module will describe the symbols for the operations due to how some symbols are improperly rendered. Each description will only correspond to exactly 1 operator’s symbol.

+-0+
---0
0-0+
+0++
×-0+
-+0-
0000
+-0+
-0+
--+0
0+0-
+0-+
m-0+
----
0-00
+-0+
M-0+
--0+
000+
++++
-0+
-0-+
0-0-
++-0

Finally, convert each triplet back into a letter using the constructed keystring to obtain the decrypted string.

Example — RGBA Decomposition Cipher

Obtained from Page 1 Top Screen: AEIPAZ

Keyword: AMBITION

Displayed 6 LED Colors On Page 3: Mint, Plum, Indigo, Forest, Rose, Magenta

Displayed 3 LED Colors On Page 4: Mint, Red, Indigo

Displayed Transformations: “TL, BR”; “BR, TR”; “BR, BL”

Port Count, Modulo 3: 1

Interpreted Operators: +, ○

“Module ID” is shown.

Determined Color from 3 LEDs: 0+- (Lime)

G-0+-0+-0+-0+- 0+-0+-0+-0+-0+
R---000+++---0 00+++---000+++
B---------0000 00000+++++++++
AMBIT!ONCDEF GHJKLPQRSUVWXYZ

Rearranged to RGB Order:

R---000+++---0 00+++---000+++
G-0+-0+-0+-0+- 0+-0+-0+-0+-0+
B---------0000 00000+++++++++
AMBIT!ONCDEF GHJKLPQRSUVWXYZ

R Channel Transforms
--0
+-
+
BR
++0
-+
-
BL
+--
++
0
G Channel Transforms
-0-
+-
+
TL
-0-
-+
+
BR
+0+
+-
-
B Channel Transforms
-0-
0-
+
BR
+0+
0+
-
TR
-++
00
+

Rearranged: ++-, -0+, -++, ++0, +-0, 0-+

Converted LED Colors: 0+0, 0-0, --0, -0-, +-0, +-+

Result after using operators: ++-, ++-, -0+, 0-+, +-0, --+

Decrypted: CCRUKQ

Decrypting — Step 4: 3×3 Hill Cipher

There is approximately a 80% chance that people will use tools for this cipher.

The 18 digits obtained from step 2 form 9 sets of 2-digit values that are part of a 3×3 matrix in reading order. These are labeled a - i in this manual. To decrypt, calculate X, the determinant of this 3×3 matrix, which is obtained as such

3×3 Matrix Determinant

Y, the multiplicative inverse of X, is then calculated such that it satisfies the following:

Multiplicative Inverse

The adjugate of the original matrix is then found by obtaining the cofactor of the matrix, then flipping across the main diagonal (from top-left to bottom-right).

3×3 Matrix Adjugate

Decrypting — Step 4: 3×3 Hill Cipher (Continued)

Multiplying the adjugate matrix by the inverse of the original determinant, Y, then taking each entry modulo the length of the alphabet, will obtain the inverse matrix.

3×3 Matrix Inverse

To decrypt the word using this matrix, group the decrypted letters from step 3 into groups of 3 letters, and obtain the alphabetic positions of each, with Z being 0. Treat each triplet as a 1×3 vector, and multiply this vector by the inverse 3×3 matrix. The first value in the vector is multiplied to the first column, the same happens with the second value with the second column, and likewise the third value with the third column. This results in 3 1×3 vectors. Add each vector together, then take each entry modulo the length of the alphabet, and convert them back into their respective letters via alphabetic position again with 0 being Z.

This should result in an English word, which is the decrypted word to be submitted into the module.

Example — 3×3 Hill Cipher Obtaining Matrix Inverse

Obtained Matrix:

72219
21915
111622

Determinant: 7*9*22 + 22*15*11 + 19*21*16 - 7*15*16 - 22*21*22 - 19*9*11 = -2325

-2325 mod 26 = 15

15 * b = 1 mod 26, b = 7

Adjugate:

915
1622
-
2219
1622
2219
915
-
2115
1122
719
1122
-
719
2115
219
1116
-
722
1116
722
219

Inverse:

7*(9*22-15*16) -7*(22*22-19*16) 7*(22*15-19*9)
-7*(21*22-11*15) 7*(7*22-19*11) -7*(7*15-19*21)
7*(21*16-9*11) -7*(7*16-22*11) 7*(7*9-22*21)

-294-12601113
-2079-3852058
1659910-2793

Example — 3×3 Hill Cipher Using The Inverse Matrix

Inverse Matrix Obtained (after mod 26):

181421
154
21015

Encrypted: CCRUKQ

Alphabetic positions of each encrypted letter: 3, 3, 18, 21, 11, 17

3*18 + 3*14 + 18*21 = 474, 474 mod 26 = 6, F

3*1 + 3*5 + 18*4 = 90, 90 mod 26 = 12, L

3*21 + 3*0 + 18*15 = 333, 333 mod 26 = 21, U

21*18 + 11*14 + 17*21 = 889, 889 mod 26 = 5, E

21*1 + 11*5 + 17*4 = 144, 144 mod 26 = 14, N

21*21 + 11*0 + 17*15 = 696, 696 mod 26 = 20, T

Decrypted: FLUENT

Final Step: Submitting The Word

Please do not mess this up now

Now that the decrypted word has been obtained, press Outer Center to enter submission. The 4 buttons in between the Inner and Outer center will now turn into different shades of gray. Outer Center can be pressed at any point in this state to exit submission.

For all other presses (excluding the display), any press of those buttons will unlock the submission, but not pressing at the correct time will result in a strike. However, the submission will be unlocked regardless of striking.

  • Start with the last digit of the serial number, and add the module ID to it.
  • Add the number of letters that comes before N, excluding N, in all of the unlit indicators.
  • To the current value, if on line 2 of page 1, the strike counter has “STRIKE(S)” appended to the number, add the number of letters that comes before N, excluding N, in all of the lit indicators. Otherwise, if on line 2 of page 1, the strike counter has “STRIKE(S):” prepended to the number, add the number of batteries. Otherwise, add the sum of the number of battery holders and the number of port plates.
  • Subtract 3 times the amount of modules with “Fair” in its name, either as part of a word, or as its own word. This is case insensitive.
  • Add 3, and modulo the result by 10. When the last seconds digit of the countdown timer is that digit, the module will not strike when unlocking.

Once submission has been unlocked, the right display will show indications of what buttons access which portion of the module.

Pressing Left, Up, or Right will respectively input -, 0, or + into the right screen, which is then inputted into a letter to be displayed on the top screen.

Pressing Down will delete the displayed inputs on the right screen if there has been any, or delete the last letter on the top screen otherwise.

Pressing Inner Center will submit the letters on the top screen.

Pressing Outer Center will clear the entire input and exit submission.

If the submitted word is correct, the module will disarm. Otherwise the module will strike and exit submission as a result. The correct word will NOT change.

For reference, for the first input displayed on the right, inputting -, 0, or + will enter to the sections of the alphabet A–I, J–R, S–Z respectively. The second input is a 3 letter subsection of the first input, with the third input being a letter. “?” will be used to denote invalid letters.