The M-209 Cipher Machine


The M-209 was a portable cipher machine used during World War II by the U.S. Navy, mainly for low level tactical messages, remaining in active use through the Korean War.

With little modifications, it was initially designated as C-38 by the manufacturer, Swedish cryptographer Boris Hagelin, and CSP-1500 by the Navy.

The following paragraphs will show you how the M-209 worked and which were its external and internal components.

External Elements

These are parts of the machine visible and not under the hood.

Cipher/Decipher switch

Right above the entry wheel rests the cipher/decipher switch, labeled C/D. This switch controls how the machine formats its output text:

  • When deciphering, each appearance of the letter "Z" on the coded message is automatically replaced with a space on the output (deciphered) text. This also produced words with spaces, for instance "ORGANI ED" was to be read as "ORGANIZED".
  • When ciphering, lettes where automatically written as 5-letter groups. The operator should replace spaces with the letter "Z".

Entry Wheel

The Entry wheel is used to select the letter to encrypt. The operator would rotate it to the desired position and then use the ...

Hand crank or power handle

This letter is encoded by turning a hand crank or power handle on the right side of the machine; at the end of the cycle, the ciphertext letter is printed onto a paper tape, the key wheels each advance one letter, and the machine is ready for entry of the next character in the message.

Key Wheels windows

Through the Key Wheels windows its possible to see the current position of the Key Wheels (more on them later), but the cover needed to be open to manipulate them.

Letter Counter

A letter counter on top of the machine indicated the total number of encoded letters, and could be used as a point of reference if a mistake was made in enciphering or deciphering.

Internal Elements


Lifting the machine cover, the machine drum and keywheels appear. These are the fundamental parts of the machine.


The rotating drum has 27 bars, each with two lugs. These lugs can be set to any position 1 through 6, in which case they are aligned with the corresponding key wheel, or they may be set to one of two "0" positions, in which case they are ineffective.


The six key wheels each have a small movable pin aligned with each letter on the wheel. These pins may each be positioned to the left or right; the positioning of these pins affects the operation of the machine. The left position is ineffective, while the right position is effective.

Each key wheel contains a different number of letters, and a correspondingly different number of pins. From left to right, the wheels have:

26 letters, from A to Z
25 letters, from A to Z, excepting W
23 letters, from A to X, excepting W
21 letters, from A to U
19 letters, from A to S
17 letters, from A to Q

Machine operation

Operation of the M-209 was relatively straighforward.

First, the ciper/decipher switch should be stablished.

Then, each letter in the input message was selected on the entry wheel, rotating it to the desired position.

After the letter was selected, the power handle or hand crank was turned a full cycle, encrypting/decrypting the letter.

The resulting output was written then to the paper tape attached to the machine.

Cipher Keys

The M-209 was programmed with a daily key, stablishing the internal pin and lug settings.

Then, for each message, the following was done:

The operator should select six random positions for the key wheels, then a random letter would be chosen, encrypting it 12 times.

After that, these 12 cipher letters would be used to setup the starting position for the six key wheels.

Why 12 letters? sometimes, the cipher letter would not be available, because not all key wheels had 26 letters. In that case, it would be simply skipped, and the next available one, used.

The external indicator sent with the message will be the letter we encoded written twice followed by the initial position of the rotors. Also two more letters indicating the cipher net need to be added at the end.