Saturday, July 23, 2022

Intercepted and Decoded a Secret Message!

 The Maritime Radio Historical Society sent a message encrypted via Germany's infamous Enigma cryptography machine from coast station KPH in Point Reyes, CA (which happens to be only 36 miles from where I used to live in Vallejo when I was in Navy A and C school).


The message was sent in 5-letter groups via Morse code and afterward using Radioteletype. Stations that received the message were then faced with the challenge of decoding it.

This is what it sounded like to receive the Morse code:


 

SPOILERS AHEAD: If you continue to read, you will see the encoded message and my steps to decode it and the final clear-text message.

Here's a screenshot of my Radioteletype reception:



This is, by the way, exactly as it was sent via Morse code.

"CQ" means "Calling all stations." "DE" means "From." "KPH" is the station callsign on Pt. Reyes. The actual message starts with "HQTRS FR FOCH" and that first line is understood as "To Headquarters from Foch sent at 1914 Zulu time today; 100 characters in the coded message; message keys are BRV and LTV;". The rest are the encoded message in 5-letter groups.

In order to decode the message you had to have the Codebook and the message keys. Here is a page from a German codebook:

Each day has its own line of info needed to decode the messages sent on that day, and the codebook is only good for one month. The columns to the right of the date column are Roller Position, Ring Position, Plug Connections, and ID Groups. Think of the Enigma machine as a typewriter with interchangeable letter cartridges. Roller Position is the roller number to be used. You would take the three rollers for the day and put them in the machine. Ring position is where the rollers would be placed. Ring Position 1 is "A", 2 is "B" etc. The Enigma also had a panel of jumper connections kind of like an "old-timey" switchboard, so for the day's messages, you would plug in the jumpers between the specified letters. ID Groups are codes that confirm you're using the right row of decoding settings. If you look at the message in the screenshot, the first code group starts with VCX. If you look at the line for the date of the 23rd, you see at the end of the ID groups is VCX.

So for today's messages, at the start of each message, the machine is configured thus:
Roller Position (Roller #) V II III
Ring Position 11(K) 21(U) 08(H)
Plug Connections EY DT KF MO XP HN WG ZL IV JA
ID Groups lsd nuo vcr vcx

All this info is kind of like the "Private Key" for the message (but not completely analogous). Only the Sender and Receiver know this info. There is also an analogue to "Public Key" of modern encryption, and that is the Message Key mentioned previously. The Message key is randomly picked by the operator sending the message. He randomly picks six letters. It's a convoluted process, but the first three are clear text to decrypt the second three, and this is the final setting to inter into the Enigma machine.

 Here's a graphical representation of an Enigma machine online. The Rollers/Rings are internal, so they are not shown, but clicking near the top lets you set the initial values. The three dials at the top are where you set the message key. The dots at the bottom are the plug connections.


Once the machine is set up with the configuration for the day and the message key, the message is typed and the machine outputs the clear text (or the encrypted) message.


 You'll notice that the encrypted message I typed into the machine does not start with the first code-group, but rather the second. This is because of the ID Group I mentioned above. The three letters of the ID group, VCX, have two more random letters added on to them in order to make it a group of 5, like all the rest, but if you start there, your message will be gibberish because that first group is for confirmation purposes and doesn't contain actual message data.

So why would including it mess up your message? Because every time a key is pressed on the keyboard of the Enigma machine, the encoding scheme advances by 1. For example if the machine was configured so that A=E and you press any letter on the keyboard, A now equals a different letter, and it changes with every stroke. So if you type in the first code group, the real message would be off by 5 steps, resulting in total gobble-de-gook. The letters above the keyboard light to show what the ciphered letter is for that key press. A quick test of repeatedly pressing "A" on the keyboard shows that the progression of the cipher is NOT linear, IE, "A" does not equal E,F,G,H, etc. with each key press. Rather, it varies widely.

So the decrypted message sent today is as follows:
MY RIGHT IS HARD PRESSED X MY CENTER IS YIELDING X IMPOSSIBLE TO MANEUVER X SITUATION EXCELLENT X I AM ATTACKING X

This is a quote from French General Ferdinand Foch (pr "Fosh"), Supreme Allied Commander during the First World War.

You notice I left off the last "WI" after the final "X". These two letters are there to make the final group of letters total 5, like all the rest of the code groups. (X is like a period or "STOP" in a telegram message.)

So that was a lot of fun, and a challenge, to boot! Radio signals fading and atmospheric noise make it a challenge to copy the message. This is why "numbers stations" repeat the same message over and over and over. We only got two shots today to copy it. Then there's the whole "Enigma for Dummies" crash course. I learned something and had a good time doing it. I hope you enjoyed reading about it!

73 de N8VCL

 

No comments:

Post a Comment

Log