Thursday, April 13, 2017

The MeinEnigma Enigma Machine Kit - Message Decoding Example

Let's look at an example of decoding a real message using MeinEnigma.

While there are examples of real messages (1) from Word War II available on the Internet, they tend to be in German and contain a lot of military technical terms and abbreviations, making even the decrypted plain text hard to understand. I'll instead use a message that was posted as one of the monthly challenges on the Enigma World Code Group Forum, a group of Enigma enthusiasts. I've chosen one (2) that was about a year old, to avoid making this too much of a "spoiler".

Here is the encrypted message, which follows a standard format that you can read about on the forum:

[EWGC2016]
XTS WWK
YNUAL FXBLJ PVARC AUEFD IQKFE VYCXN FRBBE HJJAN JDCRI GMJZC MSTAL WFSPB
YUNFG UUDYL DZJIG XQCSK QPURI EKMVO PDWKG IXBLH RVLYQ LBAPT PWGNU UGINK
RWYYI IFCQC XZSRZ MDQBM JHUNY LVLXN OAEVZ WSVAT FTVZT YOECZ HEOTB UUAPG
UHIDK GMNGR ADTEO IISNA ZOHZC WJWNP HLCPH PBTOW

This was the monthly challenge for May 2016. The forum posting listed that this was encrypted for an Enigma model M3 with UKW B reflector.

First, we need to look up the keysheet (3) for May 2016 from the codebook that is used for these monthly challenges. Here is the entry for the 1st day of May 2016 (the columns are in German for authenticity with the original code books):

 ------------------------------------------------------------------------------
|Tag |Walzenlage|Ringstellung|      Steckerverbindungen      |   Kenngruppen   |
--------------------------------------------------------------------------------
| 01 | I  V III |  24 21 05  | AT BG CN EP FI HQ JS KZ OU XY | VWX YNU GUJ GGB |

We now have everything we need to decode the message. We turn on the MeinEnigma, and after starting up it prompts "model". We rotate the leftmost rotor to select M3:


Turning the function switch to the right, it prompts "reflector" and we can turn the left rotor to select UKWB:


Turning the switch clockwise once more, it prompts for "rotor" and we set it to 153, based on the table entry under Walzenlage that says I V III.


One more click clockwise, and we need to set the plugboard. We can either physically connect the cables or use the virtual plugboard set using the rotors. The second rotor selects the cable (from 1 to 10) and the third and fourth select the two letters to connect. Here are the first two connections using the virtual plugboard:

We need to do this for all 10 cable pairs listed in the table: AT BG CN EP FI HQ JS KZ OU XY

We now turn the function switch clockwise once more to the final "run" position.

First we need to set the rotor rings or Ringstellung. In the table they are listed as 24 21 05. The corresponding letters are X U E (24 = X, 21 = U, 05 = E).

For each of the three rotors, we need to rotate it until we see the decimal point lit up. This is the current ring position. We then hold down the corresponding button and rotate the rotor to the desired letter, and then release the button. We do this for all three rotors, at which point it should display XUE with all three decimal points lit up:


We now need to set the rotor start positions to the first "key" in the message itself, XTS:


The next step in the process is to enter the second "key" in the message, WWK, by typing the characters and noting the encrypted characters that are displayed.


If you followed the instructions correctly up to now, these three characters should have converted to J, Z, U. These are the rotor start positions that we need to use to decrypt the rest of the message. So we set the rotors to JZU:


As a check that we are using the correct code book entry, we are supposed to take the first three letters of the first character block, YNUAL, and confirm that YNU is one of the groups or Kenngruppen listed in the table, and in fact this is the case. The last two characters, AL, are ignored and are just there to complete the 5 character group.

Finally we are ready to enter and decode the message itself. We type in each letter of the message, omitting the first code group, i.e.

FXBLJ PVARC AUEFD IQKFE VYCXN FRBBE HJJAN JDCRI GMJZC MSTAL WFSPB
YUNFG UUDYL DZJIG XQCSK QPURI EKMVO PDWKG IXBLH RVLYQ LBAPT PWGNU UGINK
RWYYI IFCQC XZSRZ MDQBM JHUNY LVLXN OAEVZ WSVAT FTVZT YOECZ HEOTB UUAPG
UHIDK GMNGR ADTEO IISNA ZOHZC WJWNP HLCPH PBTOW

We note each character that is lit and/or spoken and write them down. Here is what it should return, still shown as 5 character groups:

WITHS OMEME SSAGE SCAPT UREDI NMAYO FNINE TEENF ORTYA SWEDI SHMAT
HPROF ESSOR SPENT TWOWE EKSTO DECIP HERED ANDRE VERSE ENGIN EERED ANEAR
LYVER SIONO FTHES IEMEN SANDH ALSKE TFIFT YTWOA LSOKN OWNAS THEGE HEIMF
ERNSC HREIB ERXWH ATWAS HISNA MEQUE STION MARKX

Now we need to manually put in the spaces between words and add punctuation. The procedures for the Enigma specified a number of rules for sending punctuation, numbers, and other characters using just the alphabetic characters available. Some common abbreviations were X for period, ZZ for comma, and FRAGE or FRAQ for a question mark. This message used the more easily understood QUESTIONMARK and added an X at the end to fill out the last 5 character code group.

Adding spaces and punctuation we get this message:

WITH SOME MESSAGES CAPTURED IN MAY OF NINETEEN FORTY A SWEDISH MATH PROFESSOR SPENT TWO WEEKS TO DECIPHERED AND REVERSE ENGINEERED AN EARLY VERSION OF THE SIEMENS AND HALSKE T FIFTY TWO ALSO KNOWN AS THE GEHEIMFERNSCHREIBER. WHAT WAS HIS NAME?

I should mention that you can also perform all of the settings and decryption using the Mein Egigma serial port commands. This is less autenthic but a lot less tedious and error prone.

These monthly challenges contain a question, and if you successfully decode them you are supposed to post the answer to the forum, encrypted using the same settings.

You might want to try decoding some of the monthly challenges that are posted at the Enigma World Code Group Forum. They can be decoded using any one of the many available simulator programs, if you don't have a MeinEnigma.

I've written (4) a short Quick Reference guide for the MeinEnigma that lists the keyboard commands, serial port commands, and an example of message decoding (the same one I used here). If you acquire a MeinEnigma you may find it handy. I plan to add more content to it in the future.

References


  1. http://wiki.franklinheath.co.uk/index.php/Enigma/Sample_Messages
  2. http://enigmaworldcodegroup.freeforums.net/thread/75/enigma-challenge-2016)
  3. http://enigmaworldcodegroup.freeforums.net/thread/55/optional-2016-ewcg-codebook
  4. https://github.com/jefftranter/meinEnigma/blob/master/MeinEnigmaQuickReference.pdf

No comments:

Post a Comment