Apr 142013
 

This post is part of a series of posts describing practical use of the M-209 cipher machine. The series will cover operation of the machine, setting the cipher key, formatting of messages, ciphering and deciphering messages, dealing with transmission errors, practices to make cryptanalysis (code breaking) of messages more difficult, and generating new key tables.

This chapter covers recognition and deciphering of messages.

The M-209 Cipher Machine

The M-209 Cipher Machine

The M-209 is a cipher machine designed by Boris Hagelin, and used by U.S. forces during World War 2 for encryption of lower level traffic. It was known to be breakable by German forces, but it was still useful for low-level, high-volume traffic that only needed to be protected for a matter of hours. More details about the machine’s functioning and history can be found online at many places including Wikipedia and my own web page. M-209 machines are available on the surplus market, but they are somewhat rare and expensive (despite being among the least expensive cipher machines available). If you do not have access to a real one, you can use a simulator such as this excellent graphical simulator for Windows computers or the command-line simulator I wrote to help me understand the machine better.

Chapter 1:  Cryptographic Basics
Chapter 2:  Operating the M-209
Chapter 3:  M-209 Under the Covers
Chapter 4:  Enciphering Messages
Chapter 5:  Deciphering Messages  (this post)
Chapter 6:  When Things Go Wrong  (coming soon)
Chapter 7:  Making Things Harder for the Enemy  (coming soon)
Chapter 8:  Creating Key Tables  (coming soon)

 


Chapter 5: Deciphering Messages

Now that we know how to prepare M-209 messages to send to others, let’s learn how to recognize and decipher M-209 messages when we receive them. Let’s say that our radio operator just handed us this message that he received:

An Enciphered Message

An Enciphered Message

Recognizing M-209 Messages

It’s clearly an enciphered message, since it consists of unintelligible five-letter groups. Is it an M-209 message, or was it enciphered with one of our other cryptographic systems? Let’s take a closer look at the contents of the message:

DDGPD UCOFM JSCPS XZTGR HHWJG
BDKKK SHISC IMDFK RLUVH TWGAW
SUYMM VZBQP OEBJE KPMBW GPGNI
OFGAL VRYJC LSPLJ GRFYE UQVZT
PSNDT OAPYG SKGKM CKQTD JCPBE
NHYRX DDGPD UCOFM

Notice the following two details that you should learn to recognize:

  1. The first two groups are the same as the last two groups.
  2. The first two letters are the same.

These are two hints that this is probably an M-209 message. If it was enciphered in one of our other cryptographic systems, it would probably look different, by design.

Now, message formatting procedures can change over time, and the same German document that disclosed that this system was used by Allied forces in practice also reveals that sometimes the last two groups were swapped. But for our purposes, we’ll assume that we are only using this particular format.

Extracting the Message Indicators

Recall from the last chapter that the first pair of groups (and their duplicate copy at the end) are the message indicator. We break the message indicator down into smaller pieces like this:

Message indicator:          DDGPD UCOFM
---------------------------------------
System indicator:           DD
External message indicator:   GPD UCO
Key list indicator:                  FM

We need to process the message indicator to retrieve the internal message indicator so that we’ll know how to set the key wheels. We use the exact same procedure that we covered in the last chapter :

  • Verify that the M-209 is set up with the pin and lug settings from the key table identified by the key list indicator. In this case, the message was enciphered with key table FM.
  • Reset the letter counter to 0000, and set the encipher-decipher knob to C.
  • Set the key wheels to the external message indicator, which is GPDUCO in this example.
  • Encipher the system indicator letter twelve times, then tear off the resulting tape:

PLIHK WZVIH JE

Now, we can decipher the rest of the message.

Deciphering the Message

First, lets set up the machine:

  • Reset the letter count to 0000 again.
  • Set the encipher-decipher knob to D.
  • Set the key wheels to the internal message indicator from that piece of tape you just created. Remember, work from left to right, and cross out any letters that are not present on the wheel that you are setting. In this case, we set the wheels to PLIHKI, skipping the letters W, Z and V, as well as the final letters H, J and E.

With the machine set up, now we can decipher the message. Skip the message indicators at both ends of the message, and enter this text into the machine, ignoring the spaces:

JSCPS XZTGR HHWJG
BDKKK SHISC IMDFK RLUVH TWGAW
SUYMM VZBQP OEBJE KPMBW GPGNI
OFGAL VRYJC LSPLJ GRFYE UQVZT
PSNDT OAPYG SKGKM CKQTD JCPBE
NHYRX

Deciphering the above text yields this result:
MISSION ACCOMPLISHED X ALL ENEMY FORCES NEUTRALI ED X  ERO CASUALTIES X EIGHT PRISONERS TAKEN X AWAITING FURTHER ORDERSO

We’re almost done. Recall that each letter ‘Z’ turns into a space when we decipher a message. That’s a convenient feature, because our deciphered message already has the words separated by spaces. If this was a German Enigma message, then the words would be crammed together and we would need to guess where to insert spaces. We do need to guess where actual ‘Z’s should be inserted into the text, though, and this message needs two of them:

  • NEUTRALI ED” should be corrected to “NEUTRALIZED“.
  • ERO” should be corrected to “ZERO“.

Notice that the message also has ‘X’s where periods would naturally belong. The sender might have used a different convention such as leaving out periods, spelling them out as “PERIOD” or “PER“, etc., so just use common sense here.

Finally, the last word doesn’t look right. It should be “ORDERS” instead of “ORDERSO“. Notice that the extra ‘O’ lines up with an ‘X’ at the end of the last cipher group. That ‘X’ was probably added to pad the last group out to five letters, so we’ll just omit the trailing ‘O’ from the plaintext.

Now we can transpose the message to an M-210 form. Early in the war, the paper tape was gummed so that it could be easily torn up and glued to a blank message form, but the gummed tape didn’t work well in tropical climates. It was replaced with plain tape so that tape reels wouldn’t turn into sticky discs in humid air. We’ll just write it down, with our corrections:

The Deciphered Message

The Deciphered Message

Cleaning Up

As in the last chapter, don’t forget to destroy all leftover tapes (including the one you made to determine the internal message indicator), and scramble the key wheels.

Now you know how to send and receive M-209 messages! But what if something goes wrong? What if the message is garbled in transmission? What if you try to decipher a message and end up with gibberish? The next chapter will cover some techniques and hints for dealing with problems like those.

  11 Responses to “Practical Use of the M-209 Cipher Machine: Chapter 5”

  1. GOODS TUFFM ARKKE EPITU PLOLX

  2. Hey Man can you upload Chapter 6 and 7,8 Please you posted it would be coming soon. Thanks anyways Great Information on your website 🙂

    • Oops. As usual, I got distracted by other shiny objects. Hopefully I’ll get around to writing them one of these days!

      Actually, I’ve been thinking that I should make an M-209 training video on Youtube, too…

  3. Hey Agian your website is really Cool how many days until you release Chapter 6,7 on M-209???
    Can you make a new chapter on crytography and Quantum Computing. Thanks 🙂

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)