The Enigma Introduction

Amanda Pan
05 Aug 2010
Cosmos; Cluster 6
The Enigma
Introduction
The Enigma was a machine for encrypting messages invented by Arthur Scherbius. It was used by the German military starting 1925 and through World War II. Before the beginning of World War II, the Polish Biuro Szyfrów was the main force in breaking the Enigma. Shortly before Poland was invaded, they sent their discoveries to the Allies, and further codebreaking was done at Bletchley Park, an estate in England. The military intelligence gained from cryptanalysis greatly contributed to the Allies' victory. The fact that the Enigma had been broken was not discovered, and was only revealed in the 1970s. Cryptography Terms
Some of the following terms and concepts will make the Enigma easier to understand. Before it is encrypted, the message is called the plaintext, and ciphertext afterwards. The key is the information needed to encrypt or decrypt that doesn't include the general method. A cipher is a way of encrypting a message by replacing letters with symbols. A Caesar shift is a kind of cipher that replaces each letter with a letter a fixed number of places away in the alphabet. Another way of looking at it is by representing the letters by the numbers 1­26, atnd adding a fixed number modulo 26. Monoalphabetic ciphers, where the same letters are encrypted with the same symbols, will have the symbols occuring the same numbers of times as the letters they represent. Using this fact is called frequency analysis. Most variations of monoalphabetic ciphers, like replacing each letter with one of multiple symbols, are harder to break, but still weak. The only absolutely secure form of cryptography is the one­time pad, where the key is random. The key in the one­time pad, a string of letters, is added modulo 26 to the plaintext to encrypt it. However, there are practical problems with using one­time pads. Each key must be different, and must be distributed to each party that is communicating. The same key can never be used twice, and each key must be as long as the message it encrypts, so a lot of random letters are needed. Keys either must be distributed very often, which is a logistical problem, or the keys for a long period of time are distributed all at once, but it is more dangerous if the keys are captured. The next best is having a key that is unpredictable. This was what the Enigma was designed to do.
How the Enigma Works
There are several different versions of the Enigma, so the following explanation of it will just be of the simplest case. After a letter is entered on a keyboard, it goes through a plugboard. The plugboard has six plugs, which can be used to switch any two letters. Then, the letter passes through three rotors, or rotating disks, called scramblers. Each of the 26 letters on the scramblers preforms a Caesar shift on the letter that is inputted. After each letter, one or more scramblers may advance to the next letter. When the fast scrambler, which advances every turn, completes a full revolution, it advances the next scrambler. It is the same with the medium scrambler and the slow scrambler. This is similar to the second, minute, and hour hand of a clock. The scramblers may be taken out and their positions changed. (Later, more scramblers were added)This changes which scrambler is the fast, medium, or slow one. Then the letter passes through a reflector, which moves the letter to another letter. The letter goes through the scrambler and plugs again, but in reverse. Then, the letter is displayed on a lampboard. The ring with the alphabet may also be rotated relative to the plugboard before the rest of the encryption. In most of this paper, the alphabet ring will be ignored. Because of the reflector, no letter can be enciphered as itself. This also allows the Enigma to decrypt a message in the same way that it is encrypted. The day key, which is issued to the Enigma operators in a codebook, is the order of the scramblers and the arrangement of the plugs. The message key is what letter the scramblers begin on. It is encoded with the the day key, and the rest of the message uses the message key. The Number of Possible Keys
Alphabet ring settings:
1 (The ring doesn't affect the number of keys because you could just rotate the scramblers and plugboard to get the same effect as rotating the alphabet ring.)
Plugboard settings (with 6 plugs)
C (26,2)C (24,2)C ( 22,2)C (20,2)C (18,2)C (16,2)
=100391791500
6!
Scrambler order
3!=6
Scrambler settings:
26 3=17576
When these numbers are multiplied, you get 1058691676442400
Strengths of the Enigma
The features of the Enigma make it both hard to break, but easy to send the keys. The key is never repeated in a message, which means that no two letters are enciphered in the same way. This is because the key only repeats itself after 17576 letters, much longer than a normal message. If many messages were sent with the same key, they would be susceptible to frequency analysis. This is avoided with the rotations of the scrambler. Mainly because of the plugboard, there are so many possible keys that it would be hopeless to try each of them with pencil and paper, and it would still take a long time even with a machine. Also, The part of the key that needs to be communicated is much smaller than that of a one­time pad. The day key, which is the plugboard, scrambler order, plugboard setting, alphabet ring, and later starting rotation of the scramblers, can occupy one line on a piece of paper instead of the huge amount needed for a one­time pad. Cryptanalysis of the Enigma
The Biuro Szyfrów had some information besides the message when they did cryptanalysis on it. From an informant, they knew how the scramblers mapped the letters to each other. When the message key was transmitted, it was repeated in case of error. This allowed the day keys to be SGH. The first and fourth letter of the ciphertext must be the same letter in the plaintext. This is also true with the second and fifth, and the third and sixth. When a table of first and fourth letters with the same day key is compiled, patterns emerge. For example, suppose the following is one such table:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
F Q H P L W O G B M V R X U Y C Z I T N J E A S D K
If you see A in the top row, F is in the bottom row. F can be followed to W in its bottom row. And W returns to A. This is called a chain. This particular chain has a length of 3v
Even if a plugboard swapped two letters, it would not affect the length of the chains. If we think about it with group theory, the above table and any table where two letters are swapped are isomorphic. This means that the problems of finding the scrambler and plugboard settings can be seperated. After compiling a catalog of chain different scrambler positions, it would be possible find the chain lengths of a day's messages and then look up the corresponding scrambler setting. After the scrambler setting was found, the plugboard was now only a simple cipher. Frequency analysis isn't even necessary, because some letters have been unchanged and they can be used find which have been swapped. At first, the process of recording chain lengths was done by hand, but later was done with a machine called a cyclometer. Eventually, the practice of sending the scrambler settings twice was no longer used, and other methods had to be found. Unfortunately, it would take too long to fully explain any of the methods.
Several avenues of attack were opened up by operator error, not because of the Enigma. For example, operators often chose message keys that were neighboring keys on the keyboard, or used the same message key for different messages. These were called cillies, and made it easier to find the scrambler settings. Some messages also had predictable content, like daily weather reports having the German word for weather in them, which was called a crib. Sometimes, planes could also plant mines at a known locations. The German ships encountering the mines would send out the coordinates of the mines, so the cryptanalysts would know some of the plain text. This practice was called gardening. The cribs were used to check what would happen if the crib was at any position of the ciphertext. If the crib being in one position caused contradictions like a letter being enciphered as itself, the crib couldn't be there. After checking all positions and eliminating the impossible, which was done using machines called bombes, the remaining positions were checked to see if they made sense. More weaknesses resulted from the rules for keys. When there were 5 scramblers, no scrambler could be placed in the same position as it was the previous day. With no restrictions on scrambler position, the number of permutations would be:
P (5,3)=60
However, with the restriction, the number of permutations is: P (5,3)−3×P (4,2)+ 3×P (3,1)−1=32
The restriction almost halves the number of possible scrambler positions each day.
Bibliography
Deavours, Cipher A., and Luis Kruh. Machine Cryptography and Modern Cryptanalysis. Dedham: Artech, 1985. Print.
Konheim, Alan G. Cryptography, a Primer. John Wiley & Sons. 1981. Print.
Singh, Simon. The Code Book. Random House. Print.