Getting started
This page takes you through everything you need to know to use Virtual M-209. When you first load the simulation and click Start Virtual Hagelin M-209, you should see the closed M-209, ready for use.
Looking around
The first thing to learn is how to look around. Left-click and drag anywhere outside the M-209 box (on the table, for example) to turn your viewpoint around the machine. The cursor shows as an arrow when you can move the camera, and as a pointing hand when there is something to interact with.
To move where the camera is pointing (left, right, up or down), hold Shift with the left mouse button, or drag with the right mouse button if you have one. To zoom in and out, use the middle mouse button or the scroll wheel.
Opening the case and basic use
Left-click the lid of the green case to open the M-209 and see the cipher machine, ready to work.
This part of the tutorial is also available in the simulation, with helpful pointers: click the Basic Tutorial button.
The letter to encipher is set by turning the setting knob: the grey knob at the front left of the machine, with the indicator disk showing the letters of the alphabet.
Click and drag up or down on the setting knob to set the letter you want against the indicator line.
To make the machine encipher and print the letter, use the black operating handle on the right of the machine. It turns a full 360 degrees and clicks to a stop when done.
Click on the handle once to run a single character, or press the Space bar.
Notice how the mechanism moved the indicator disk on several steps, and so changed the cipher letter printed. For security, the operating handle locks at the end of each cycle, so the indicator disk must always be moved before another letter can be enciphered. To use the same letter again, turn the setting knob one step and back (or press the up and down arrow keys).
On top of the inner cover is the letter counter, which shows how many letters you have entered. It should be set back to 0000 before you start to encipher or decipher, so you know how much of your message you’ve done.
To reset the letter counter (and the key wheels), you first press the reset button: the silver button at the back left on top of the inner cover. On the real machine you would hold this button down and turn the reset knob to wind the key wheels back until the counter showed 0000. To make this easier in the simulation, one left-click on the button holds it down for you, and a second click releases it.
Click the reset button, then left-click and drag up or down on the reset knob until the letter counter shows zero.
Before starting a message, the six key wheels need setting to the chosen key. Each wheel has a different number of letters round it, and is set by clicking and dragging up or down.
Set the key wheels to the letters QAHNKE.
The lever on the left side marked C/D switches the M-209 between cipher and decipher mode. In cipher mode the letters on the tape are printed in groups of 5; switched to D (decipher), it prints without grouping and turns the letter Z into a space.
Encipher more than 5 letters in cipher mode to see the grouping. Then click on the cipher/decipher lever to change mode.
As a shortcut, you can type A–Z on your keyboard, which sets the indicator disk and turns the handle for you.
The paper feed knob feeds the paper tape out, to see more of the message or to remove it. Click on it to turn it one space.
The top paper pressure lever is normally used when putting the tape in, and also has a tear-off edge. In the simulation, clicking on it removes the printed tape, leaving you a fresh blank section.
To close the top outer cover, click on the cover support (the silver bar at the back left, between the inner and outer case).
Setting the internal key
This part of the tutorial is also available in the simulation, with helpful pointers: click the Setting Tutorial button.
The M-209’s internal key was changed regularly. This section takes you through an example of setting it. First, open the outer lid (click on it), then open the inner lid to reach the mechanism; there is a raised section at the front left of the inner lid for this.
You can also click Setup Mode at the top of the screen, which opens the case, moves you closer, and gives you an example key sheet to work through.
There are two internal setting mechanisms on the M-209. The first is the set of pins next to each letter on the key wheels at the front. These can be pushed through to the left or the right (on the real machine, using the screwdriver tool kept in the lid).
A pin set to the left is inactive; to the right, it is active. In Setup or Tutorial mode, one row is highlighted to make it easier to see which one you are setting.
Left-click any pin to switch it between active and inactive.
On the drum at the back of the machine (sometimes called the squirrel cage by operators) are 27 bars. Each has two lugs, which slide left or right into one of 6 active positions (marked 1–6) or 2 inactive ones (marked 0). To move a lug, pull it forwards away from the bar to release the catch, then move it to a new hole.
Left-click and drag left or right on a few of the lugs to move them to new settings.
Before setting the daily key, it’s easier if we “zeroise” the mechanism: move all the pins to the left (inactive) and all the lugs to 0. You can do this by hand or click Zeroise on the right of the screen to do it quickly.
The setting sheet on the left of the screen has the new values for the pins and lugs. The left-hand table has 27 rows.
The lug settings come first (for example 3-6), then columns of letters and dashes for the six key wheels, from left to right. Where there is a letter, move that pin to active (right); for a dash, leave it at the left (inactive).
Set the pins on the A row: wheels 1, 2, 3 and 6 need to be active (to the right).
With the pins set, you need to set the lugs on the first bar. To make this easier, the lugs to set are repeated in the right-hand table. For the first row, the first lug goes to position 3 and the second to position 6.
Click and drag the lugs on the highlighted bar to positions 3 and 6.
-------------------------- --------------------- NR LUGS 1 2 3 4 5 6 BAR 1 2 3 4 5 6 -------------------------- --------------------- 01 3-6 A A A - - A 01 - - X - - X 02 0-6 B - B - B B 02 - - - - - X 03 1-6 - - - C - - 03 X - - - - X 04 1-5 D D - - D D 04 X - - - X - 05 4-5 - E - E E - 05 - - - X X - 06 0-4 - - - F F - 06 - - - X - - 07 0-4 - G G - - - 07 - - - X - - 08 0-4 H - H H H H 08 - - - X - - 09 0-4 I - - I I - 09 - - - X - - 10 2-0 - J J - - - 10 - X - - - - 11 2-0 K K - - - K 11 - X - - - - 12 2-0 - L L - - - 12 - X - - - - 13 2-0 M - M M M - 13 - X - - - - 14 2-0 N - N N N N 14 - X - - - - 15 2-0 - O - - - O 15 - X - - - - 16 2-0 - - - P P - 16 - X - - - - 17 2-0 - - - - - Q 17 - X - - - - 18 2-0 - R R - - 18 - X - - - - 19 2-0 S S S S S 19 - X - - - - 20 2-5 T - T T 20 - X - - X - 21 2-5 - U U U 21 - X - - X - 22 0-5 V - - 22 - - - - X - 23 0-5 W X X 23 - - - - X - 24 0-5 - - 24 - - - - X - 25 0-5 - - 25 - - - - X - 26 0-5 - 26 - - - - X - 27 0-5 27 - - - - X -
Now move on to the next row down, the B row. The Next Position option on the right of the screen moves both the wheels and the drum on one step and highlights the next ones to set.
Set the pins on the B row: wheels 1, 3, 5 and 6 need to be active.
For the lugs on bar 2, there is only one X in the right-hand table, and the lug setting is 0-6. So leave the first lug at its inactive 0 setting and move the second lug to position 6.
Set the second bar’s lugs to 0 and 6.
Carry on with the settings for each of the 27 rows. The later wheels have fewer positions than the first, so there are fewer pins to set once you get past Q.
To set everything automatically, press Auto Set. Restart takes the wheels and drum back to the first row (and the counter to zero) so you can work through the sheet again; Zeroise clears all the pins and lugs. Complete all the settings, either by hand or with Auto Set.
Well done: you have completed the internal setup of the M-209.
A string of enciphered letter As is used to check the settings.
Encipher the letter A (or press the A key) 26 times.
Make sure the output is TNJUW AUQTK CZKNU TOTBC WARMI O. This confirms your internal settings are correct. If you don’t get exactly this, start again with the setting sheet, checking each of the pins and lugs.
Enciphering a message
The external message indicator
With the machine set up, we can start enciphering a message.
Reset the counter: press the reset button (at the top left of the machine), then drag up or down on the reset knob until the counter shows 0000. Then set the cipher/decipher switch to cipher (C).
Next, set six completely random letters on the six wheels. This is the external message indicator; write these six letters down for later. For security, a random message indicator must only ever be used once with that day’s machine settings. Every external message indicator must be unique.
Let’s use DUFLJB as the external message indicator.
Click and drag on each pin-wheel to set it to the right letter: D U F L J B.
Next, choose a random letter, say K, and write it down too. We now encipher the letter K 12 times.
Encipher K 12 times: either set the indicator disk to K and click the operating handle each time, or just type K on your keyboard.
The result is 12 random cipher letters: PEQGB JGCDF UP. The operator would now remove the tape with these 12 letters and reset the counter to zero.
The internal message indicator
These 12 letters are used to set the secret internal message indicator. Start with the first letter and set the leftmost wheel to it, then carry on through the wheels from left to right. As some letters are missing from some wheels, a letter may not be on the wheel; in that case, cross it out and use the next one.
If the 12 letters aren’t enough to make up the internal message indicator, because too many were crossed out, choose another external message indicator and start again. Once all the wheels are set, we’re ready to encipher the message with this internal message indicator.
Our internal message indicator, from the 12 letters, is PEQGBJ.
Enciphering the message
Now we can encipher the message, with the cipher/decipher switch still at cipher. While enciphering, replace the spaces between words with the letter Z; when the receiver deciphers the message, each Z becomes a space again. Single letters are replaced by their phonetic words (C becomes CHARLIE, E becomes EASY and so on), and numbers are spelt out (1 as ONE, 2 as TWO and so on).
The message:
OPERATION ZEBRA STARTS AT SUNSET
The cipher message:
KBMUN ODDDC YWLVM RBVUS QYRHT XNZUI HX
Once the whole message is enciphered, the cipher text is printed in groups of five letters on the paper tape. If the last group has fewer than five letters, complete it by writing the letter X until there are five. (Don’t encipher these Xs; just write them in.)
KBMUN ODDDC YWLVM RBVUS QYRHT XNZUI HXXXX
To complete the message, we add three indicators, both before and after it. The first, the system indicator, tells the receiving operator the message was enciphered on the M-209. It is the letter we enciphered 12 times, written twice: KK.
The second is the random external message indicator we wrote down (not the secret internal message indicator), written just after the system indicator: DUFLJB.
The third is the key list indicator, which tells the receiving operator which key sheet was used. Let’s say our key list is XA. It is written just after the external message indicator. We now have the complete message, with its indicators:
KK DUFLJB XA KBMUN ODDDC YWLVM RBVUS QYRHT XNZUI HXXXX KK DUFLJB XA
Finally, the message is rewritten in groups of five characters:
KKDUF LJBXA KBMUN ODDDC YWLVM RBVUS QYRHT XNZUI HXXXX KKDUF LJBXA
We now destroy the paper with the 12 letters and turn the wheels to a random position, to hide the internal message indicator.
Deciphering the message
To decipher the message, the receiving operator sets the cipher/decipher switch to cipher (not decipher). Just as the sender did, they set the six wheels to the external message indicator given in the message (DUFLJB) and encipher the letter K, found at the start and end of the message, 12 times, which gives the 12 letters that make up the internal message indicator.
Then reset the counter to 0000, set the pin-wheels to the internal message indicator (PEQGBJ), turn the cipher/decipher switch to decipher (D) and decipher the message. Each deciphered Z is replaced by a space. Where a missing Z in a word is obvious, as in ZEBRA, write the Z back in.
OPERATION EBRA STARTS AT SUNSETbecomesOPERATION ZEBRA STARTS AT SUNSET
You have now learned the complete procedure for sending messages with the M-209 cipher machine.
Try it yourself
This next message was enciphered with the same machine settings, from the example key sheet. It’s up to you to decipher it. Good luck!
SSCVQ IMKXA SISMR TRNLE POFCW
LWKUW AJWGL SUUAE NZANO TZARZ
VRBVN ZDKEB JGPUI WXXXX SSCVQ
IMKXA
This last example is based on the one in the excellent Windows M-209 simulator by D. Rijmenants.