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.

Char Value Char Value Char Value Char Value
0 00000 8 01000 J 10000 S 11000
1 00001 9 01001 K 10001 T 11001
2 00010 B 01010 L 10010 V 11010
3 00011 C 01011 M 10011 W 11011
4 00100 D 01100 N 10100 X 11100
5 00101 F 01101 P 10101 Y 11101
6 00110 G 01110 Q 10110 Z 11110
7 00111 H 01111 R 10111 ? 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- 2E 75 3F 99 09 6C BC 61 7C 2A 96 4A F4 6D 29 FA
1- 90 14 9D 33 6F CB 49 3C 48 80 7B 46 67 01 17 59
2- B8 FA 70 C0 44 78 48 FB 26 80 81 FC FD 61 70 C7
3- FE A8 70 28 6C 9C 07 A4 CB 3F 70 A3 8C D6 FF B0
4- 7A 3A 35 54 E9 9A 3B 61 16 41 E9 A3 90 A3 E9 EE
5- 0E FA DC 9B D6 FB 24 B5 41 9A 20 BA B3 51 7A 36
6- 3E 60 0E 3D 02 B0 34 57 69 81 EB 67 F3 EB 8C 47
7- 93 CE 2A AF 35 F4 74 87 50 2C 39 68 BB 47 1A 02
8- A3 93 64 2E 8C AD B1 C4 61 04 5F BD 59 21 1C E7
9- 0E 29 26 97 70 A9 CD 18 A3 7B 74 70 96 DE A6 72
A- DD 13 93 AA 90 6C A7 B5 76 2F A8 7A C8 81 06 BB
B- 85 75 11 0C D2 D1 C9 F8 81 70 EE C8 71 53 3D AF
C- 76 CB 0D C1 56 28 E8 3C 61 64 4B B8 EF 3B 41 09
D- 72 07 50 AD F3 2E 5C 43 FF C3 B3 32 7A 3E 9C A3
E- C2 AB 10 60 99 FB 08 8A 90 57 8A 7F 61 90 21 88
F- 55 E8 FC 4B 0D 4A 7A 48 C9 B0 C7 A6 D0 04 7E 05

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:

1 8 5 1 9 20 13 11 17 16
2 5 6 15 10 4 14 13 18 9
3 14 7 7 11 10 15 17 19 6
4 12 8 2 12 3 16 19 20 18

If the light on the module is red:

1 15 5 10 9 17 13 20 17 7
2 5 6 16 10 18 14 14 18 2
3 4 7 11 11 8 15 6 19 9
4 12 8 3 12 1 16 19 20 13

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.

Dec Char Dec Char Dec Char Dec Char
0 & 8 F 16 4 24 1
1 6 9 0 17 5 25 2
2 7 10 + 18 M 26 =
3 N 11 # 19 C 27 %
4 P 12 S 20 H 28 3
5 R 13 T 21 J 29 Q
6 8 14 X 22 - 30 @
7 9 15 Y 23 K 31 W