The Making Of The Enigma Machine

While watching the movie ‘The Imitation Game’  I was deeply fascinated by the workings of the Enigma machine.It was a German build machine for transferring messages of military and state secrets.The complexity of the machine was of such brilliance that only the sharpest mind could dream of breaking it.In this blog and the blogs later I’ll try to give you a vivid sketch of the making of the Enigma and how the code was finally broken. At the end I’m sure you will deeply appreciate the minds that worked to ensure security of their country.

The Foundation

In 1918,a German researcher and  engineer Arthur Scherbius laid a project to replace the inadequate systems of cryptography used in the First World War that led to the defeat of Germany.He focused on using electrical machines, a twentieth century technology,for cryptography.He combined different cipher machines to form a complex machine known as the Enigma meaning a ‘mystery’.If we break down the machine to its constituent parts then it will be easy to visualize the principles that underlie.


The Scrambler,Reflector and Plugboard

The machine mainly consists of three elements connected by wires: a keyboard for inputting plaintext (original message), a scrambling unit for encryption to a ciphertext (coded message), and a display board to indicate the ciphertext letters.

The scrambler, a thick rubber disk riddled with wires, is the most important part of the machine.For simplicity let’s consider a scrambler limited to six alphabets.From the keyboard, the wires enter the scrambler at six points, and then make a series of twists and turns within, to emerge out at six points on the other side.The internal wiring decides connections between input and output units.The figure describes this:


This was a basic cipher technique, to make it more difficult Scherbius made the scrambler disc to rotate by one-sixth of a revolution each time a letter is encrypted (or one-twenty-sixth of a revolution for a complete alphabet of 26 letters).This rotations changed the cipher alphabets constantly after each encryption.The figure explains different scenarios.


However the problem was after six rotations the message would repeat again to the initial wired settings.In general, cryptographers are keen to avoid repetition because it leads to regularity and structure in the ciphertext, symptoms of a weak cipher. This problem was alleviated by introducing a second scrambler disk and later a third one.Until the first scrambler rotates completely the second doesn’t start and after the completion of the second the third starts.Just like a car odometer which works on the same principle.For a full alphabet these three scramblers would provide 26 × 26 × 26, or 17,576 distinct scrambler arrangements.

Now comes the role of the reflector which is as much as a scrambler, but the wires enter at one side and reemerge on the same side.It basically reflects the signal through the three scramblers again but along a different route.


The signal does not actually emerge through the keyboard as it seems but is diverted to the lampboard.At first this attachment seems useless but when we see the decryption of message at the reciever end it makes logic.The sender first has to arrange the three scramblers in a start position out of the 17,576 possibilities.The initial settings are noted as a 3 letter key in a codebook.The sender writes keys sufficient for four weeks in a day which are made available to the reciever, each key for each day for security reasons.The reciever has an Enigma machine which is setup according to the day’s key.The sender types the message and sends the ciphertext to the reciever through radio.The reciever now types the ciphertext in his Enigma machine and the plaintext comes out.How’s it possible?Encipherment and decipherment are mirror processes. The ease of decipherment is a consequence of the reflector.Try tracing the paths of the letters ‘b’ and ‘D’ in the figure above to see this.Thus the key is an important factor and should  never be allowed to fall in enemy hands.A typical codebook writings:

(1) Plugboard settings            A/L-P/R-T/D-B/W-K/F-O/Y.

(2) Scrambler: arrangement:  2-3-1.

(3)Scrambler orientations:  Q-C-W.

If many cryptoanalysts in the enemy camp tried all the 17,576 possibilities they will require nearly a day to decode which was still a risk.Therefore Scherbius decided to increase security.He didn’t want to add scramblers which would increase the weight of the Enigma, instead he changed the arrangement of the three scramblers among themselves by creating detachable scramblers, this changed the wirings and provided six more different ways.

Next he added the plugboard between the keyboard and first scrambler.The plugboards allows the sender to insert cables which have effect of swapping some letters before they enter the scramblers.For example, a cable could be used to connect the ‘a’ and ‘b’ sockets of the plugboard, so that when the cryptographer wants to encrypt the letter ‘b’, the electrical signal actually follows the path through the scramblers that previously would have been the path for the letter ‘a’, and vice versa.The letters to be swapped were specified in the codebook and only six pairs were swapped.


The Possibilities

Now as we know the structure of the Enigma let’s see the possibilities:

Scrambler orientations: Each of the 3 scramblers can be set in one of 26 orientations. There are therefore

26 × 26 × 26 settings:


Scrambler arrangements. The three scramblers (1, 2 and 3) can be positioned in any of the following six orders:

123, 132, 213, 231, 312, 321.


Plugboard. The number of ways of connecting, thereby swapping, six pairs of letters out of 26 is enormous:


Total. 10,000,000,000,000,000!!!!

Thus a cryptoanalyst will require more time than the age of the universe to check all possibilities!

Over the next two decades, the German military would buy over 30,000 Enigma machines. Scherbius’s invention provided the German military with the most secure system of cryptography in the world, and at the outbreak of the Second World War their communications were protected by an unparalleled level of encryption. At times, it seemed that the Enigma machine would play a vital role in ensuring Nazi victory, but instead it was ultimately part of Hitler’s downfall.

I’ll cover the attempts of breaking the enigma and the war scenes in my next blogs.

Thank you,

Shoubhik Banerjee

IISER Bhopal

Another blog author: “LIFE SAVING TOY-PAPERFUGE”

(Available address:




3 thoughts on “The Making Of The Enigma Machine

Leave a Reply

Your email address will not be published. Required fields are marked *