On the Subject of the Wonder Cipher

What happens is a mystery!

This module has a screen, a keyboard, and two buttons and a light on the top.

The screen will display a 20-character message. To solve the module, encode the message using a Wonder Cipher.

Pressing the top-left button will toggle the screen’s display from the message to an input terminal to enter the encoded message. Type the encoded message into the terminal and press the submit button to submit your answer. Submitting a wrong or incomplete answer will yield a strike.

Characters on the screen are always displayed in two rows, each with two groups of 5 characters. Some characters may not be entered into the terminal and are marked in red on the keyboard.

Step 1:

Take all the characters from the screen in order and convert each of them to five-digit binary numbers using the table below. Append all the numbers to make one large binary number.

CharValueCharValueCharValueCharValue
000000801000J10000S11000
100001901001K10001T11001
200010B01010L10010V11010
300011C01011M10011W11011
400100D01100N10100X11100
500101F01101P10101Y11101
600110G01110Q10110Z11110
700111H01111R10111?11111

Step 2:

Take this new binary number and convert it to hexadecimal. There should be 25 digits. If there are less, prepend zeroes until the number reaches 25 digits.

For each pair of digits, replace them with a different pair of digits using the table below. The first digit of the pair represents the row, and the second digit represents the column. Ignore the first digit of the full hexadecimal number in this calculation, but do not remove it.

-0-1-2-3-4-5-6-7-8-9-A-B-C-D-E-F
0-2E753F99096CBC617C2A964AF46D29FA
1-90149D336FCB493C48807B4667011759
2-B8FA70C0447848FB268081FCFD6170C7
3-FEA870286C9C07A4CB3F70A38CD6FFB0
4-7A3A3554E99A3B611641E9A390A3E9EE
5-0EFADC9BD6FB24B5419A20BAB3517A36
6-3E600E3D02B034576981EB67F3EB8C47
7-93CE2AAF35F47487502C3968BB471A02
8-A393642E8CADB1C461045FBD59211CE7
9-0E29269770A9CD18A37B747096DEA672
A-DD1393AA906CA7B5762FA87AC88106BB
B-8575110CD2D1C9F88170EEC871533DAF
C-76CB0DC15628E83C61644BB8EF3B4109
D-720750ADF32E5C43FFC3B3327A3E9CA3
E-C2AB106099FB088A90578A7F61902188
F-55E8FC4B0D4A7A48C9B0C7A6D0047E05

Step 3:

Take this new hexadecimal number and convert it to duotrigesimal (base 32). There should be 20 digits. If there are less, prepend zeroes until the number reaches 20 digits.

Using one of the tables below, swap each digit in the number with a different digit. Take the digit in the position of the right side of the table and move it to the position on the left side of the table. Only move each digit once.

If the light on the module is blue:

185192013111716
256151041413189
3147711101517196
4128212316192018

If the light on the module is red:

1155109171320177
2561610181414182
34711118156199
4128312116192013

Step 4:

Once all the digits are swapped, turn each digit into a different character using the table below. Submit this sequence of characters into the module.

Note that this table uses the decimal value of the duotrigesimal digit.

DecCharDecCharDecCharDecChar
0&8F164241
1690175252
2710+18M26=
3N11#19C27%
4P12S20H283
5R13T21J29Q
6814X22-30@
7915Y23K31W