Enigma

Description

Algorithm

Implementation

Enigma was one of the most popular and most important cryptographic electro-mechanical rotor machines. It was used in the middle of the 20th century by the Germans and other nations for encryption of thousands of radio messages. The Enigma machine was invented by a German engineer Arthur Scherbius at the end of World War I.

Cryptographic rotor machine

The Enigma machines started to be used commercially in the early 1920s but gained most popularity for their military applications. During World War II they were used by the German armies and became their main cryptographic tool for encryption and decryption of tactical and strategic communication.

Even after the war, the Enigma machines were still used by various agencies in some countries, until in the second part of the 20th century it was revealed, that their security had been compromised by the Allies as early as at the beginning of World War II.

The Enigma machines were produced in many versions and they were continuously improved over time. As for other cryptographic rotor machines, the strength of encryption depended mainly on the several rotors, each with 26 electrical connections corresponding to 26 alphabet letters.

To make the cipher even stronger, the Germans added some more elements, like the plugboard. Also, to allow encryption and decryption by using the same machines with the same parameters, an additional important device was added, called the reflector.

In the most popular Enigma version, a signal from the key pressed by the user was passing first through the plugboard, then the entry wheel, then through the three moving rotors until it reached the reflector. After being processed by the reflector, the signal went all the way back through the three rotors, the entry wheel and the plugboard up to the output panel of lamps.

A diagram of the Enigma machine

Rotors

The number of rotors in different Enigma versions varied. At the beginning, the German army used a version with three different available rotors. All the three rotors were installed in the machines each day and used for encryption. The rotor ordering (Walzenlage) and each ring settings (Grundstellung) were a part of everyday secret initial configuration, distributed in codebooks. The ring settings were the relative positions of the alphabet ring to the rotor wiring. The initial position of each rotor was supposed to be set randomly by the operator before sending a message.

Over time (in December 1938), a two new discs were added, but only three rotors were still installed in the machines each day. The number of possible initial combinations increased significantly.

The Naval version of Enigma was distributed with more rotors that the ordinary Army version. Starting from six, the number of available rotors gradually increased up to eight. Also, the Naval Enigma discs rotated with the higher frequency due to a different number of notches. The later versions of Naval Enigma used four rotors at once, instead of three.

The plugboard

The military versions of Enigma contained an additional element called the plugboard (Steckerbrett in German). If installed, it would connect the keyboard output to the rest of the machine.

The plugboard allowed the operator to create pairs of letters, by using cables plugged into their corresponding connectors. The signals from the letters connected by the cable were swapped twice. First time, before they entered the main rotor mechanism, and then at the end of the encryption process just before producing the output.

It was possible to create up to 13 connections but usually only 10 were used. The connections of the plugs in the plugboard (Steckerverbindungen) were a part of the initial everyday configuration, available from the secret codebook.

The plugboard turned out to be a useful feature, which significantly increased the strength of the cipher.

The entry wheel

All Enigmas were fitted with an element called the entry wheel or the entry stator (Eintrittswalze in German). This was a simple static wiring which connected the keyboard or the plugboard to the rotor mechanism.

The commercial Enigma versions had the keys connected in the order of their sequence on a QWERTZ keyboard (Q-A, W-B, E-C, R-T, etc.), while the military versions connected the letters in an alphabetical order: A-A, B-B, and so on.

The reflector

A reflector (Umkehrwalze in German) was a device which made Enigma machines symmetrical. This means that encrypting the same message twice, would produce the original message.

The reflector connected the outputs of the last rotor in pairs, thus sending the signals back, again through the whole encryption mechanism.

There were several versions of this device. It made using the machine much easier and was one of the reasons of popularity of Enigma. On the other hand, due to some mathematical properties, it significantly reduced the cipher strength.

Security of Enigma

Due to its universal applications by the Germans during World War II, breaking the Enigma was an extremely important success for the Allies. It allowed them to intercept all kinds of communication, almost throughout the whole war.

The history of Enigma cryptanalysis is undoubtedly fascinating but due to many versions of the machine and many stories describing the attempts from different perspectives, this website is simply not large enough to accommodate the topic.

One should refer to the books, lectures and simulations that deal with the Enigma cryptanalysis history.

A short story of breaking Enigma

The history of attacking Enigma is a history of great Allies mathematical analysis, shameful German self-confidence, and unfortunate errors of the Enigma operators. It eventually reaches the building of first large computer-like machines in the UK and later in the US.

The first three-rotor military Enigma machines were broken by the Polish Biuro Szyfrów agency, long before the outbreak of World War II, in 1932. After that year, the Polish intelligence were able to read all the messages encoded by Enigma almost in the real time. Three cryptologists had a particularly great impact on breaking the cipher: Marian Rejewski (1905–1980), Jerzy Różycki (1909-1942) and Henryk Zygalski (1908-1978).

Just before the outbreak of World War II, when the Germans added more rotor designs to Enigma, thus making the decoding impossible for Poles, the Polish intelligence handed on the complete documentation to the French and the British.

Over the next years, the burden of breaking new Enigma versions was taken on chiefly by the British intelligence. The teams located at Bletchley Park were able to successfully break many Enigma versions. What is more important, the British commanders were able to use the received information to their advantage. Alan Turing (1912-1954) was a remarkable British cryptologist and mathematician of that time.

Throughout the end of the war, the Americans built huge and powerful machines that were able to break the latest and most complex versions of Naval Enigmas (fitted with four rotors).