The M‑209 Cipher is a portable mechanical encryption device used by the U.S. Army during World War II for tactical field communications. It employs six rotating key wheels, each with a different number of pins, and a set of lugs connecting pairs of wheels. When a letter is entered, the current wheel positions and lug connections generate a polyalphabetic shift. Each subsequent letter causes the wheels to step, producing a dynamic substitution pattern.

The encryption relies on both the initial positions of the wheels and the configuration of the lugs. The combination of wheel rotations and pin-lug interactions determines the shift applied to each plaintext letter. Decoding requires an identical M‑209 setup with the same wheel positions and lug configuration.

M‑209 Cipher: Encoding

Using the default initial state, encode the plaintext HELLO. The cipher calculates the shift for each letter based on the current wheel and lug configuration and applies it to the letter:

Plaintext: HELLO
Wheel Positions: default initial positions
Compute Shift: determined by pin-lug connections at each step
Encrypted Letters:
H → X
E → U
L → B
L → B
O → E

Ciphertext: XUBBE

Each letter’s shift changes as the wheels rotate. The shift is calculated from the combination of the active pins on connected wheels. After each letter, all wheels step forward, altering the next shift.

M‑209 Cipher: Decoding

Decoding requires the recipient to set the M‑209 wheels to the same initial positions. By inputting the ciphertext VDHPQ, the machine reverses the shift sequence using the current wheel states at each step:

Ciphertext: XUBBE
Wheel Positions: default initial positions
Compute Shift: same as encoding, applied in reverse
Decrypted Letters:
X → H
U → E
B → L
B → L
E → O

Plaintext: HELLO

M‑209 Cipher: Notes

The M‑209 Cipher is an example of mechanical polyalphabetic encryption. Its security depends on the secrecy of the initial wheel positions and the lug configuration. Even though each shift is relatively small, the dynamic stepping of the wheels produces a complex polyalphabetic sequence, making interception without the key challenging. It demonstrates practical, field-ready encryption used in historical military operations.

M‑209 Machine