How did the Enigma machine work_

How did the Enigma machine work

Enigma Machine

Bundesarchiv Bild 183 2007 0705 502 Chiffriermaschine Enigma

Enigma was a highly anticipated cipher machine used by the Germans during the Second World War. It was used to transmit extremely secretive and important coded messages. The machine used more than a billion ways to encode a message, therefore made it almost impossible to crack the German code during the Second World War.

This distinctive ability to communicate securely was a massive advantage for the Germans during the war. The machine compiled of 26 letters of the alphabet and several electromechanical rotor mechanisms.

The Enigma machine was invented by Arthur Scherbius, a German engineer. The early models were used for commercial purposes and were majorly target for commercial use until adopted by the military and government of other countries, among which were immensely used by the Nazi Germans before and during World War II.

Many models of the Enigma machine were introduced, which involved many improvements during and before the war.

But the one common thing which made it extremely was the fact that the Germans changed the cipher system daily.

But this did not stop the Allies from exploiting the machine and developing different methods to decipher the codes.

Among which Marian Rajewski, a Polish mathematician, and cryptanalyst working at the Polish Cipher Beuro was the first to point out the flaws in the cipher machine and used different permutation and combination methods to break the procedure to decipher messages sent by the machine

They couldn’t decipher the message because the Poles lacked the knowledge of the wiring of the machine

But with time the Poles, through the help of Allies, got hold of certain German cipher materials, which helped them build their own Enigma Machine, which was called Enigma doubles.

Later with the help of cryptanalyst Jerzy Rozycki and Henryk Zygalski, the Polish Cipher Bureau developed different techniques to overcome the challenges, and by January 1933, they could successfully read German Enigma messages, but with time the German cryptographic procedures advanced, and they added many complexities to the Enigma machine, which led to a situation where it became too expensive for the Polish to encounter.

So they introduced their Enigma decryption techniques to and equipment French and British military intelligence to provide much exposure and insights to decipher the Enigma codes.

Many historians to this date believe that the decryption of Enigma and other ciphers shortened the timeline of the war and may even change its outcome.

The Design

Enigma Machine Labeled

The basic design of an Enigma machine rectangular wooden box, combining mechanical and electrical subsystems.

The main parts of an Enigma machine are

  1. Keyboard 
  2. Lampboard
  3. Rotor 
  4. Reflector
  5. Plugboard 

Enigma Keyboard

The keyboard is a set of mechanical keys on the Enigma machine. They compile of total 26 letters of the alphabet from A-Z and were used to type the encrypted message, which would appear scrambled on the on Lampboard for each letter typed on the Keyboard

Enigma Lampboard

The Lampboard was a set of 26 letters of the alphabet which were aligned just above the Keyboard. They simply use to lamp or show the encrypted message by lighting up on each character,

Example: if a person pressed a key from the Keyboard, the Lampboad will denote a significant scrambled character for that exact key, and hence the message was generated

Enigma Rotor

Enigma machine inside

The rotor is the real deal of the cipher machine, also known as the heart of an Enigma machine. The rotor is the part where the actual scrambling of the message functions.

Each rotor is a disk of approx 10cm in diameter made from Ebonite or Bakelite with 26 Brass with one side that compiles all the electrical contact pins and another side housing 26 other electrical contacts in a circular plate, which represents 26 letters from A-Z.

Inside the rotor 26 wire, connect each pin on one side to contact on opposite in a complex pattern

The Enigma machine mounted three such rotors side by side to each other, forming an electrical connection between them.

For example, the pin corresponding to the letter S might be wired in contact on another side to letter P and so on. Enigma’s security comes from using several rotors in series.

Enigma Reflector

The reflector is placed after the rotors, and it was unique to Enigma among the periods of various rotor machines.

The reflector could redirect the output from the last rotor through a different route and ensure that it reciprocates, which means you could decrypt the encrypted text using an identically configured same or different Enigma machine by simply typing the encrypted message.

Enigma Plugboard

Enigma Plugboard

It is the part of the device which takes the security of Enigma to a next level. It is more secure than having an extra rotor on the cipher machine.

It is a hidden selection of the machine that contains plugs that can be swapped by the operator.

Example: if you plug S with A, they simply connect i.e. S becomes A and A becomes S, and when you type S on the keyboard, the path of encryption follows A’s path, and when pressed A, it follows S’s path.

Without the Plugboard, it would have been quite elementary to break the codes.

Working of The Enigma

To define an Enigma machine is quite simple and straightforward. It simply gives out a different scrambled character for each key pressed on the machine, and this is how a message would be encrypted and sent.

The Enigma machine uses a basic principle of substitution encryption, which is nothing but a straightforward way of encoding a message and takes minimal time and energy to break the code.

There are different types of substitution techniques.

  • Caesar cipher
  • Monoalphabetic cipher
  • Fairplay cipher
  • Hill cipher

Let us take an example of a Monoalphabetic cipher

In this technique, every letter is assigned a different scrambled letter to it, which is not in a particular manner, the cipher could be completely random and shuffled.

Example:-
Plain: 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
Cipher: Q W E R T Y U I O P L K J H G F D S A Z X C V B N M

Now if you want to send a message- “Enigma”

You would have to compare it with the code provided and you get- “Thoujq”. This was just to give you a brief understanding of Enigma.

The actual Enigma was far more complex and complicated than the Monoalphabetic cipher. Enigma changed the whole coding scheme every time you pressed a letter!

A rotor moved a step ahead every time a key was pressed, the cipher machine had 3 such rotors built-in, and each rotor had 26 levels. So even if you pressed the same key twice, it would indicate a completely different letter on the lampboard

So to understand how an Enigma machine works there’s no better way than explaining it with an example.

Let’s say we want to send an encoded message- ENIGMA

We type this message on the keyboard and we get a ciphertext on the lapboard- SMPRQD.

This is our scrambled encrypted message for ENIGMAA. As we can see each letter is assigned with a significant jumbled letter, and we can also notice that the “AA” from ENIGMAA gives “QD” as an output.

So the question is what happens that the ‘E’ changes to ‘S’, ‘N’ changes to ‘M’, and so on.

So when we press the letter ‘E’ in the machine the signal travels to the rotor, and inside the rotor wiring are all crisscrossed with each other, the letter that went through the rotor can be connected to ‘P’ on the other side, and so on. There are typically three such rotors connected in an Enigma machine (In some cases there can be even more), so output ‘P’ from the first rotor can change to ‘Q’ for the second, and ‘S’ for the third.

Now this message passes through a reflector and lamps the letter ‘S’ on the lampboard.

Now the trick for getting ‘QD’ even after you press the same alphabet ‘AA’ is that every time you press a key, the first rotor moves one step ahead, and the parts inside the rotors shuffle too after the first rotor completes one full turn i.e. 26 steps the second rotor moves one step forward and when the second rotor completes a cycle it moves on to the third rotor.

Imagine the rotors as the second hand, minute hand and, hour hand, this is how an Enigma machine works

One can encode and decode on the same Enigma machine, with the help of a reflector which is placed right after the rotors and reflects the output through a different path so that the Enigma would be self-reciprocal;

The rotor dial should be aligned the same as when starting the encryption and the plugs on the plugboard should be connected in the exact pattern.

Hence one can decrypt a message on the same or a different Enigma machine if they are configured the same

But like every other thing in this world, Enigma had flaws too. One major flaw with the Enigma was a letter could never be encoded as itself.

In other words, an ‘S’ could be never encoded as an ‘S’.

This gave the codebreakers a vital piece of information about how they could decrypt messages


Posted

in

by