Sunteți pe pagina 1din 15

Enigma M4 for Silent Hunter 5Mod developed and implemented by SkyBaron

Contact: skybaron123@gmail.com or the subsim.com forums

Manual v1.02
For the mod version that comes integrated with The Wolves of Steel megamod

Copyright © 2016 – No part of this manual may be reproduced or distributed without the prior permission of the author.
Preface
This mod is the result of a lot of hours of work doing historical research, learning Python, learning SH5’s menu interface through a lot
of trial and error, countless CTDs, designing graphic elements for the Enigma interface, etc. while still having a real life with
commitments. ☺

I hope to bring a little bit more historical realism to our Silent Hunter hobby with this simulation. If like me you are interested in the
mystique surrounding the Enigma and its use by U-boats you’ll probably enjoy this mod!

This Enigma mod is a platform for the simulation of the “Schlüssel M Form M4” (4-rotor Enigma) along with the Kriegsmarine’s
decoding procedure using the Kenngruppen (indicator groups) system that was used by U-boats during WWII. An Enigma Message
Encryptor(EME) application is available to encrypt messages. See Part II of this manual.

It can also be used as a standalone in-game Enigma simulator. It does not depend on the indicator groups book and setting tables
described here.

NOTE: The real decoding procedure using the Kenngruppen system was a bit more involving than the one implemented here. It used
more tables in the first steps of the procedure and sometimes different procedures were used with additional tables but using the
same Kenngruppen book, e.g. Reservehandverfahren(manual procedure), Sonderschlüssel(special key), among others. This mod
implements the most common procedure I found while researching the subject. The only difference is that it uses less substitution
tables in the first step of the workflow.

NOTE 2: Historically, U-boats in WWII used the 3-rotor Enigma M3 until the introduction of the M4 in 1942. This mod version simulates
the M4 machine from the beginning until the end of the war.

Acknowledgments

I’d like to thank Dirk Rijmenants, from the Cipher Machines and Cryptology website, who helped me by answering many questions
about the Enigma M4 through emails back in 2013. This mod’s User Interface is inspired by his popular Enigma simulator.

I also thank Frode Weierud, from the CryptoCellar website, for answering many questions about the Kriegsmarine’s decoding
procedures and for providing me with pictures of actual Enigma tables and some of the Kenngruppenbuch pages.

Thanks to James Lyons, from Practical Cryptography, whose Enigma cipher algorithm was used as the basis for programming the logic
of how the Enigma works.

1
Part I
How to use the Kenngruppen decoding procedure with this mod
IMPORTANT: Because of how the SH5 interface works, the Enigma should be used while the GAME IS PAUSED especially
if you are using your computer keyboard to type messages. Pause is activated when you bring up the Enigma page.

This manual is more of a walkthrough tutorial as applied to SH5 gameplay. To get a better understanding of the Enigma
M4 you can take a look at the links under reference on page 14.

All in-game pages in this mod are draggable by clicking on the top left corner of the page.

On Part III of this manual you will find some exercises to practice decoding messages using the supplied cipher networks,
Kenngruppenbuch and key tables.

I - Message description.

For this example let’s assume that you’re on patrol in the North Atlantic on November, 9 1942. These two facts will
become important later on.

Here’s a typical encrypted message that you may receive -- generate by the EME application:

BDU 1330/9/11/42 14
WTML JPNT PLCY WGDY IUCR IDSV GQRH
XWUO BRHC JCEN XXVS DVIX WTML JPNT

The header shows that the message was sent by BDU, and it was created at 13:30, on the 9th of November 1942. The
last number (14) is the number of groups that the message should contain.
Each four letter set forms a group. The first two groups are known as the message indicator groups and are repeated at
the end. These indicators are encoded with a bigram table called the Doppelbuchstabentauschtafel or double-letter
substitution table. These tables basically switch reciprocal pairs of letters (AE=DF, DF=AE, …) The other groups in blue
are the actual message. The message indicators are used to set up the Enigma machine for decryption, as you will see.

II – Using the bigram tables to decode the message indicator groups.

The first step after receiving the message is to decode these indicators:

Bring up the Enigma machine page. You can get to it by clicking on the Radioman’s
menu < E > icon.

VERSION 1.02: Make sure the selected year is the correct one for the message. You can use the mouse
wheel to select the desired year. When you start a new game the selected year will be the current in-
game year. Note that you can only change year if the envelopes, code book and tables pages are closed.

2
Bring up the bigram tables folder by clicking on its icon and click on the substitution table chart (Tauschtafelplan)

Check which substitution table is being used for the current in-game month (Monat) or the month in the message
header.

Since it is November you will be using the Ufer table. In real life each table was further subdivided into more sub-tables
(A to J) used on different days. This mod uses a table per month and changes the sequence each year.

3
Close the Tauschtafelplan and select the table name used for November on Kennwort. Click on the top middle area of
the folder to open it.

There are two tables with pairs in alphabetical order, from pairs AA to MZ on table A and NA to ZZ on table B. You can
go back and forth between them using the arrow keys near Tafel.

Look up the four pairs of the message indicator groups(WTML JPNT) and write down the corresponding exchange pairs
from the table:

WT = RW
ML = EC
JP = IE
NT = IT
Rearrange the decoded pairs reading them in the vertical (VERY IMPORTANT!) so that the new indicator groups
become:

REII WCET
4
The first new four-letter group (REII) is known as the Schlüsselkenngruppe, or cipher indicator group used to identify
which cipher network the message belongs to.

The second group (WCET) is known as the Verfahrenkenngruppe, or encryption indicator group and it is used to recover
the message key used to decode the actual message.

You should write the new indicator groups on a piece of paper.

III – Using the Kenngruppenbuch to find out which cipher network to use for the message.

Cipher networks were used to send messages to U-boats in different geographical areas. Each one had their own daily
Enigma settings and some followed different decoding procedures. For example, U-boats issued with settings tables for
the Hydra cipher network were unable to decode messages sent through another network and vice-versa.

For this mod all the networks follow the same decoding procedure but each one has its own tables with daily settings for
that network.

The U-boat cipher networks implemented here and their operational time frame* for gameplay purposes are:

CIPHER AREA FROM UNTIL


Hydra All areas until the introduction of other ciphers starting in 1941. Then used War War end
for the North Sea, British Coast, Baltic Sea, Norwegian Sea and Arctic. beginning
Medusa Mediterranean Sea. 06-1943 10-1944
Niobe U-boats based in Norway. 06-1944 War end
Poseidon Black Sea. 10-1943 12-1944
Potsdam Naval operations against the Soviet Union in the Baltic Sea. 06-1941 War end
Thetis Training U-boats. 01-1943 War end
Tibet Indian Ocean, Pacific and other distant waters. 09-1941 War end
Triton North and South Atlantic. Used for the Mediterranean sea until June 1943. 10-1941 War end
* Based on the historical data that I could find. This may change in future versions.

NOTE: In real life there were many more cipher networks for communication with surface warships, merchants, special
operations, ships in training, etc. This mod focus only on the ones historically used by U-boats. You as the player will only
have access to settings for the networks that are operational during the time period of your patrol.

Now that you have the decoded cipher indicator group (REII), you can find out which cipher network was used to
encrypt the message you just received. The daily settings for each cipher network consist of the code wheels sequence
and settings(Innere Einstellung) as well as plugboard connections and starting wheel position (Äußere Einstellung). This
will be explained in more detail below.

Even before decoding the whole message you can check if it is applicable to you by finding out if the message’s cipher
network covers your current patrol area or an area that you might patrol later on.

Start by removing the first letter of the cipher indicator group (REII) which leaves you
with the trigram EII:

Bring up the indicator groups book (Kenngruppenbuch) by clicking on its icon and then
clicking anywhere in the middle of the cover to open it.

5
In the index page, click on groups list (Gruppenliste.) Click on the first letter of the trigram, in this case E, and using the
arrows on the bottom of the page navigate to the page where the column EIA is located. Go down the rows until you
find EII = ###. Memorize or write down this number, in this example 32, which should fall in an interval allocated to
the message’s cipher network.

Go back to the index by closing the groups list pages. Select the allocation list section(Zuteilungsliste für Kenngruppen)
and then click on the top-right arrow to go to Teil B.

6
In the Schlüsselkenngruppe column, look for the column interval where 32 is to be found. In this case it’s between
columns 1 and 50 which were allocated for the Triton network, meaning that the message you just received is intended
for U-boats patrolling the North and South Atlantic as well as the Mediterranean because you are in November 1942,
before the Medusa cipher network became operational in June 1943. Other networks used the same Kenngruppenbuch,
so their names are included for completeness.

Since you are on patrol in the North Atlantic(from the example at the beginning), you would go ahead and decode the
message.

The allocation list Teil A and the Columns List (Spaltenliste) sections of the book are used to encode outgoing messages.
Even though sending out messages is not simulated in this mod, and will not be covered in this manual, all the tools are
there to encrypt messages if you want.

There is also a section with instructions(Gebrauchsanweisung) which shows a quick guide of this whole procedure and
another section describing the U-boat cipher networks with their time frames and areas (Schlüsselbereiche.)

IV – Using the key tables to set up the Enigma for decryption -- internal settings.

All the above steps had the objective of finding out which cipher network settings to use. Since your message network is
Triton, you need to use the daily settings for it.

Click on the key tables envelope(Schlüsseltafeln) icon. On


Schlüssel M select the network that you got in the previous
step, then the month (Monat), and click on the bottom part of
the envelope to open it.

The internal settings (Innere Einstellung) will be displayed


on the first table. These are the wheel sequence and ring
settings (Ringstellung) for each couple of days.

The internal settings are valid from the odd days of the
month until the next day at midnight unless the month
ends on an odd day (29 or 31) in which case they will be
valid only for that day.

7
Since you are patrolling on the 9th of November in this example, look for the settings for that day. In this case they are:

B The reflector to be used. The B reflector is fixed for this version.*


Beta Called the Greek wheel (Griechenwalze), to be placed in slot 1 with ring setting A.
IV Wheel to be placed in slot 2 with ring setting P.
III Wheel to be placed in slot 3 with ring setting V.
VIII Wheel to be placed in slot 4 with ring setting S.
* There was also a reflector-C, introduced in 1943, that was used by the M4 Enigma. It was mostly used in combination with the Gamma wheel, so
that by using Beta+Reflector-B and Gamma+Reflector-C the machine became compatible with the M3 variety. The current mod version has only a
fixed reflector-B but simulates both Beta and Gamma wheels .

A note about the Greek wheels: each cipher network encodes their messages with either a Beta or a Gamma wheel, and
although their ring setting could be any letter they are always set to A.

Open up the Enigma machine’s cover by clicking on the key lock.

The opened machine has click spots for each of the


wheels, slots, and the close cover area. The middle
right spot is where wheels are placed face down so
that you can adjust the ring settings.

There are 8 code wheels and 2 Greek wheels(Beta and Gamma) in the wheel box. On the top there are four slots to
insert the wheels. The default sequence is always Beta-1-2-3 with ring settings AAAA.

Clicking on a wheel in the bottom box will place it face down in the middle over the lamps. There you can adjust the ring
setting with the mouse wheel.

8
Clicking on a free slot on the top will place the face down wheel there.

The same principle applies if you want to remove a wheel from one of the top slots, just click on it and then click on its
place in the box.

NOTE: To place the wheel back in the box you need to click on its spot over the green pads. The interface will not allow
wheels to be mixed up. For example, you can’t put wheel number I in the place labeled VI in the box, and vice versa. Also,
Greek wheels will only fit in the first slot.

Remove the wheels already in the slots, start selecting each wheel from the settings for
November 9 in the Triton key table and adjust the ring settings (A P V S) for each one. It
should read “B 4 3 8” under the slots.

To adjust the ring settings, place the code wheel in the face down position and use the mouse
wheel to set the corresponding letter

After you are done you can close the cover by clicking on the top of the battery. The machine
will only close if all the top slots are occupied.

V – Using the key tables to set up the Enigma for decryption -- external settings.

Using the arrow on the top go to the second table sheet for
the external settings (Äußere Einstellung.)

The external settings are changed daily, they are only valid
until midnight. Look for the current day under Tag. Here you
have the settings for the plugboard (Steckerverbindungen)
and the start position for the wheels (Grundstellung).

Bring up the plugboard by clicking anywhere on the bottom


part of the machine.

Start pairing the plugs following the sequence for that day. Click on the plug holes to insert a plug, then click on the
corresponding paired value. The paired number will be shown in yellow. If you make a mistake, just click the plug again
and it will be removed.

9
You can move the plugboard (top-left corner spot)
and underline the plug settings line to make it
easier to read.

To remove ALL the plugs at once click on the click


spot in the bottom left corner over the screw.

After you are done, close the plugboard by clicking


on the close click-spot on the top.

Using the mouse wheel set the start position (Grundstellung) with the
rotor thumbwheels. In this case it is: Z V F M.

Open the notepad (Schlüsselzettel) by clicking on its icon and type the encryption indicator (Verfahrenkenngruppe) that
you got in step one: WCET

The letters you type will appear in the Funkgruppen column. This was used by the radio operator to write down the
received Morse code messages. The Gruppenzahl on the top shows the number of four-letter groups typed.

The Buchgruppen column will show you the decoded message key. This key is what you’ve been looking for through this
whole process!

Go back to the rotor thumbwheels and reset the start position to the decoded
message key: O H K C.

You’re done! Now you have everything set up to decode the actual message. Start typing the message groups but do not
include the two indicator groups at the beginning or their copies at the end! You will need to interpret the decoded
message because it should come in a short, four groups at a time format. See Part II for more info on this.
10
In this case the message:
WTML JPNT PLCY WGDY IUCR IDSV GQRH XWUO BRHC JCEN XXVS DVIX WTML JPNT
Was decoded as:
TEST MESS AGEF ORTH EENI GMAM ODBY SKYB ARON XZZZ
And transcribed as:
Test message for the Enigma mod by SkyBaron.
The XZZZ at the end is a period(X) and filler Zs. See Part II.

You can click on the Bedeutung Blatt white space and start typing
the meaning of the transcribed message groups. Then click on
the bottom icon to send the message to the ship log if you want
to keep it.

You can also erase a letter at a time (backspace) or the whole


message with the buttons on the bottom of the page. This is
important if you make a mistake while typing the message. Just
erase the letter you mistyped and rotate the first thumbwheel
one letter back.

To use your real keyboard while typing make sure the game is paused and check the
little box at the bottom of the keyboard. Always uncheck the box after you’re
finished.

11
Part II
External application to encrypt and format messages

The Enigma Message Encryptor (EME) allows you to create encrypted messages that you can add to message files. After
the message is encrypted, you can copy it to the clipboard.

The EME input options are:

Sender: Abbreviation of the message sender. Up to 4 letters.

Time: The time when the message was encrypted in 24-hour


format. When you start the app it will show the current system
time. Up to 4 digits.

Year, Month, Day: First select the year and then the month. The
program then creates a list of cipher networks that are
operational on that month. After choosing a cipher, you can
select the day that the message will be sent.

Cipher: The cipher network you want to encrypt your message


with. Hovering the mouse over the drop-down box will show you
the operational time-frame of that cipher and which areas it
covers.

NOTE: Due to the time consuming aspect of decoding messages with the Kenngruppe procedure, I would suggest to
encrypt only messages that are important and relevant to what is happening in the game such as convoys, battles and
events that are scripted in the campaign and that will affect the player’s strategy. Many messages that are historical or
for immersion purpose should be left unencrypted. It makes more sense to have the player work a little more for his
intelligence or orders than for the news.

The application EME.exe is found under the data\Applications\EME folder. When you run it for the first time, it will ask
for the SH5’s path. This path is shown on the bottom of the EME screen and saved to the eme.cfg file. Check if it is
pointing to the right path in case the cipher networks are not loaded and the cipher box is empty after you select the
month.

12
I - About the radiomessages.txt and campaign_radiomessages.txt files
These are only suggestions.

Use the same date as start_date and end_date for Enigma messages and 0100 - 2300 as start_date_time and
end_date_time. Also set the trasmission_type flag to 1.

For the above example you’d use something like:

19421109 0100 19421109 2300 (…flags…) player BDU 1330/9/11/42 14|WTML JPNT PLCY
WGDY IUCR IDSV GQRH XWUO BRHC JCEN XXVS DVIX WTML JPNT

II - Some guidelines on how to format messages for encryption


1 – Economy of characters is important so that you can fit more information into shorter messages. Messages should
be as brief as possible without sacrificing clarity. This is usually achieved by removing letters and still have the word
being understood.

Here are a few suggestions:

VESLS = Vessels OLRS = Oilers DGRS = Degrees ESTM = Estimate


CRS = Course DEPTD = Departed TNS = Tones UUU* = U-boat
KTS = Knots CONV = Convoy WFPCK = Wolf pack QU* = Quadrant(Grid)
*UUU and QU were actually used in real Kriegsmarine messages

…you get the idea.

2 - Proper names (ships, places, people, operations) should not be abbreviated. Digits will be ignored when encrypting
so numbers should be spelled out. It is better to break numbers and use words from ZERO to TEN for digits.

Speed 15 knots = SPD ONE FIVE KTS, 1075 tones = TEN SEVEN FIVE TNS, Course 303° = CRS THREE ZERO THREE DGRS

3 - Spaces and actual punctuation marks will be ignored by the program as well. Punctuation marks are coded as follows:

X = Period XX = Colon
Y = Comma YY = Dash/Hyphen
J****J = Stress mark KK****KK = Parenthesis

Here’s an example of a relevant(convoy is really scripted in the campaign) message that you may see in SH5:

Convoy TC-1 troopships departed Halifax for Firth of Clyde. Estimated 12 vessels, LIGHT escort.

This can be written for Enigma encryption as follows, emphasizing the word light with stress marks:

CONV TCYYONE TRPSHIPS DEPTD HALIFAX FOR FIRTH OF CLYDEX ESTM ONE TWO VSLSY JLIGHTJ ESCTX

When decrypted the player should see the decoded groups:

CONV TCYY ONET RPSH IPSD EPTD HALI FAXF ORFI RTHO FCLY DEXE STMO NETW OVSL SYJL IGHT JESC TXZZ

Red letters are punctuation marks. The program will add Zs as filler at the end of character sequences that aren’t a
multiple of four. The above result is what the player should see on the Schlüsselzettel (notepad) if the decoding
procedure was followed correctly.

13
Part III
Encrypted messages for practice

You can practice the Kenngruppen procedure by decoding the following messages. The decoded messages should make
sense if you got the procedure right. Remember the dates are in the format HOUR/DAY/MONTH/YEAR.

Cipher: Hydra (see if you get the same cipher network with the indicators)
BDU 1000/17/10/41 9
XKDQ UERB ZQDF CBAS ZZNB UWDV EMBH XKDQ UERB

Cipher: Triton
BDU 340/5/6/42 18
KFQY AMZI IHGI CGME ASCF HUPC HXSX MCPF KWVJ NLMV ZMPO OVEI XJCZ BGAB UYWM XFAX KFQY AMZI

Cipher: Medusa
BDU 630/10/7/43 18
FCBL KQWQ OGRU AKRH FFXC GSDI JCKV GQXJ VLRF VTWI YBWS BIRT ZGLG IOUS TTRJ AKDA FCBL KQWQ

Cipher: Tibet
BDU 1535/9/3/44 16
ZILH EQIU XFNR FJDI SYXO ECFI WDNJ DKYQ CQGB JWKC NOGK AUQU BSVI GVYI ZILH EQIU

On-line references

http://cryptocellar.org
http://enigma.hoerenberg.com
http://stoneship.org.uk/~steve/banburismus.html
http://users.telenet.be/d.rijmenants/en/enigmatech.htm
http://cryptomuseum.com/crypto/enigma/m4/index.htm
http://practicalcryptography.com/ciphers/mechanical-era/enigma

14

S-ar putea să vă placă și