﻿ Mechanus Cipher — Keep Talking and Nobody Explodes Module

## On the Subject of Mechanus Cipher

A cipher named after the plane of order, where a creature lurks to bring structure.

The module displays two rows of lettered panels, an extra lettered panel, a submit panel, and two lettered gears.

You can press any of the panels on a row to flip that row. The top row shows an encrypted word, a keyword and a binary string. The bottom row shows two sets of numbers and a second keyword. The extra panel shows a key letter.

To solve the module, decrypt the word following the steps below and submit it using the gears. To submit, press the gears to turn them, and press the submit button when you want to enter the selected letter. You can flip the panels to clear your input.

### Decrypting the word

#### Step 0 - Creating your key

For steps 2 and 3 you need a key. To make this key, take your keyword from the top row and repeat it until you have 26 letters. Then, for all letters in this string in reading order, if a letter has already occurred, shift it forward in the alphabet until this is not the case.

Example: TROUPER -> TROUPERTROUPERTROUPERTROUP -> TROUPESVWQXYFZABCDGHIJKLMN

#### Step 1 - Pancake Transposition

Take your encrypted word from the top row and the two number strings on the bottom row. Take the first number from both number strings and mirror the group of letters that are positioned between and including those two numbers. Repeat for the other numbers in the strings.

Example: EOISDYN, 1223236 2456565
EOISDYN 12 -> OEISDYN
OEISDYN 24 -> OSIEDYN
OSIEDYN 25 -> ODEISYN
ODEISYN 36 -> ODYSIEN
ODYSIEN 25 -> OISYDEN
OISYDEN 36 -> OIEDYSN
OIEDYSN 56 -> OIEDSYN

#### Step 2 - Binary Gear Cipher

Take your encrypted word from previous step, the key from step 0, the key letter on the extra panel and the binary string on the top row. Make a column of your key's letters and a column of decreasing 4-bit binary numbers starting from 1111. Start at 0000 on the binary column and start at your key letter on the key column. Then move up both columns simultaneously, wrapping around if necessary, until you hit the first letter of your encrypted word and note down the current value from the binary column. Repeat this for the other letters, starting from where you just ended. If a letter in your encrypted word is the same letter as the previous one, move up both columns until you hit it again (this also applies if the first letter in the encrypted word is your key letter). Append all these binary numbers into one big string and split it into four equal groups and set it up as a table.

Read the first column of the binary table from top to bottom. Starting from the place where you previously ended, move up both columns until you hit this binary. If the first digit of the binary string is a 1, shift up until you hit it again. The letter you land on is your new letter. Repeat for all columns in the binary table.

Example: OIEDSYN, A, 1100000

 T R O U P E S V W Q X Y F Z A B C D G H I J K L M N
 1111 1110 1101 1100 1011 1010 1001 1000 0111 0110 0101 0100 0011 0010 0001 0000
 1 1 0 0 0 1 0 0 0 0 1 1 0 0 0 1 1 1 0 0 0 0 0 1 1 1 0 1

O -> 1100
I -> 0100
E -> 0011
D -> 0001
S -> 1100
Y -> 0001
N -> 1101

(+1)1000 -> M
(+1)1010 -> S
(+0)0011 -> L
(+0)0111 -> H
(+0)0101 -> E
(+0)1000 -> O
(+0)0001 -> H

#### Step 3 - Strangely Elusive Letter Cipher

Take your encrypted word from previous step, the key from step 0 and the keyword on the bottom row. Make a 3-dimensional 3×3×3 grid of your key. Label the leftover space with a #. Look up the first letters of both the encrypted word and the keyword in this grid. For each grid axis, if the positions of the two letters match, your new letter will lie on the same position on that axis. If they don’t match on an axis, your letter will lie on the unused position on that axis. Your new letter will be at the position found after evaluating all three axes. If this is a '#', it is the letter of the encrypted word instead. Repeat for all letters in your encrypted word and submit the resulting word.

Example: MSLHEOH, CHIMERA

z=1z=2z=3
TROQXYGHI
UPEFZAJKL
SVWBCDMN#

M+C -> W
S+H -> A
L+I -> # -> L
H+M -> L
E+E -> E
O+R -> T
H+A -> S