CRACKING ENIGMA

Introduction

Everyday the enigma codes were encrypted using a new day key these keys were distributed to all the German operators to tell them how to set up their machines at the start of each message. For even greater security the operators would use the day key to encrypt a message key then both the receiving and the transmitting operators would set their machines to the message and then encrypt the message as normal. However in order to avoid any radio transmitting mistakes they had to send the message key twice. The message key consisted of three letters these letters represented the starting letters on each scrambler.

How it was done

The main reason that it was impossible to simply try every possible starting combination and see which one worked was the plug board the plug board consisted of 6 cables which swapped 6 pairs of letters around and because there are several million ways in which 12 out of 26 letters can be swapped round checking them all was impossible.

What the English needed was something that would be different for every scrambler setting but would be un affected by swapping letters round. So used the fact that the Germans repeated their message keys. They knew that the 1st and the 4th letters of each message was the same in the plaintext as were the 2nd and the 5th and the 3rd and the 6th. From this they could work out that a certain letter, which might be encrypted as A, and three letters later the same letter might be encrypted as E. Then they could make tables showing what certain encrypted letters became three letters later; with enough messages complete tables could be made.

e.g.

A B C D E F G H I J K L M O N P Q R S T U V W X Y Z

E D W T R Q Y U I O P A S F G H L Z J X K C V M B N

From a table such as this you can construct chains of letters in this case you would start at A go down to E go to E on the top line down to R and so on.

AERZNGYBDTXMSJOFQLA 18 links

CWVC 3 links

HUKPH 4links

II 1link

For every scrambler setting the number and length of the chains was different and they were unaffected by swapping letters round so all the English had to do was compile a book of all the scrambler settings and the corresponding chains and then just work out the chain lengths everyday and look up the scrambler settings for that day. Once they knew the day key they could work out the plug board settings with comparative ease by looking for phrases that made sense when a pair of letters was swapped for example.

Allive in Belrin

could be

Arrive in Berlin

with the R and the L swapped round. Once the plug board settings had been guessed all the messages that day could be deciphered and at midnight the process would start again.