Sunday 31 January 2016



BREAKING THE ENIGMA
The word ’Enigma’ means something or someone that is mysterious, inexplicable and difficult to understand. If you go by etymology, you will see that the words had travelled from Latin (meaning riddle) to Greek to English. 

Many things have been name Enigma and the thing I shall be writing about is a machine called Enigma that was uses to encrypt and decrypt German messages during World War 2.


The Machine called ENIGMA

The Enigma was an electro-mechanical machine that looked somewhat like a typewriter. It was invented by Arthur Scherbius a German engineer at the end of World War I and was used by the Germans from 1920. During World War II the machines were used by the Germans military to encrypt messages that were sent to their armed forces. The messages contained important information like the next Allies’ convoy or location that was to be attacked.

The English would intercept the messages and try to decrypt them by finding a key in them. But decryption was difficult as the machine was reset every day. Cryptologists struggled to decrypt messages of the day, and the next day they had to start all over again making the previous day’s work totally useless.

The machine consisted of a set of 3-5 rotors (also called scrambler) but only 3 of the rotors were used from the set at any given time. Additional rotors were used to make the Enigma more secure and ever more difficult to decrypt. Each of the rotors could be set in 26 different positions. The machine also had a lamp board, a keyboard and plug board. There were 10 cables which linked up pairs of letters on the plug board. When a key was pressed on the keyboard, one key on the lamp board lit up. The sequence or the ‘wheel-order’ of the rotors could be changed at any time and this could give rise to a large number of combinations of letters.

The Polish had earlier broken the Enigma code in 1932 and had even made replicas of the machine. However at that time, the settings were changed after many months. However during World War II, the Germans changed the settings daily at midnight making the decryption process very tedious.

Radio messages were intercepted and written down every day by a host of young ladies working at wireless machines in Bletchley Park. These messages were then sent to be deciphered by cryptanalysts but they did not make any headway till Alan Turing, a brilliant mathematician and cryptologist was inducted into the team.

With such a setup, there could be around 150 million million possible combinations of 10 pairs of 26 letters on the plug board each day. If 10 men worked on the code 24/7, it would take them 20 million years to decipher.  However, Alan Turing and his team had around 18 hours each day to try and crack the code before it was changed again the next day! It took them 2 years of hard work before they finally cracked it using another machine – the Bombe. To understand the Bombe, you have to first understand the Enigma!

Procedure for encoding and decoding messages on an Enigma machine

1 1. The person sending the plaintext message would type each letter of the message onto the keyboard.
  2. The signal would then pass though the plug-board and it would switch the letters.
  3. The 3 rotors which were internally wired and would change each output letter before a reflector could send the signal back to the system. 
  4.  After each key was pressed, the first rotor would move one step forward and after moving 26 positions, the second rotor would begin to turn.
  5. The reflected signal would pass for a second time through the plug-board and a letter would light up on the lamp-board.
  6. The letters that lit up on the lamp-board were copied down and they formed the encrypted message which was transmitted using Morse code.
  7. When the receiver received the message which was pretty much gibberish, he would type the letters on the keyboard of the Enigma machine at his end and get the decrypted text letters would light up on the lamp board of that machine. After writing down all the letters, the receiver would get the original message.

Most importantly operators at both ends i.e. encryption end and decryption end had to know the starting position and the order of the rotors as well as the position of the plugs on the plug board. Because of the reflector in the machine encrypting messages was the same as decrypting message - though in reverse. Also a letter (alphabet) could never be encoded as itself and this turned out to be a flaw in the machine.

The Enigma working was based on a polyalphabetic substitution cipher that could turn plain text into cipher-based text and vice-versa. This meant if a letter was repeated in the cipher text letter, every occurrence of that letter would get substituted to a different letter when deciphered and converted to plain text.

The Bombe

Alan Turing reasoned that it would take a machine to beat another machine so he designed the Bombe, also an electromechanical machine.  This machine would replicate many Enigma machines wired together. A regular Enigma machine had 3 rotors which could be set in 26 different positions and a Bombe machine had the layout of about 36 Enigma machines wired together. It was designed in a way that it could break any cipher text which had been encrypted by an Enigma machine. The only requisite was a plain-text 'crib' of about 20 letters could be predicted correctly and fed to the machine.

The drums of the Bombe were arranged in a way where the topmost drum represented the left-hand rotor of the Enigma, the middle drum represented the middle rotor and the last one represented the right-hand rotor. For each rotation of the top drum, the middle drum was incremented by 1 position and for each rotation of the middle drum; the last one was incremented by 1 position giving a total of 26 x 26 x 26 positions. The drums were coloured differently to show which rotor they imitated.


How the Bombe functioned – Imitating the Enigma to crack the Enigma!

The job of the cryptanalysts at Bletchley Park was to find the Enigma key for the day. Then only they would be able to decipher the coded messages. The Bombe made their work a lot easier than manual cryptology. Also the cryptanalysts realized that did not need to look at all the intercepted messages but only at those which had predictable text or the ‘crib’. For instance the weather reports came in everyday at 6 am. So the word ‘wether’ (German for weather) was predictable. Also the Germans were accustomed to typing in ‘Heil Hitler’ so that too was predictable text.  It was later said that ‘Heil Hitler’ was the reason Germany lost World War II!

Based on the crib and the fact that no letter in the encoded message would line up with itself in the decoded message, the cryptanalysts could decipher the messages much quicker and with greater accurately than was possible manually.

The Bombe was a combination of 36 Enigma machines. Being an electro-mechanical machine, the Bombe had to be powered on electrically.  Next, each of the Enigmas replicates was fed with a set of letters from the crib. The rotors would then begin rotating and going through all possibilities and would stop only when they found the presumably correct set of letters. The letters were taken down after the machine stopped and a manual check was done to confirm the key for the day.  Sometimes the correct key was produced but often, the process had to be restarted as the key produced was wrong. Operators would then setup a separate (standalone) Enigma machine with that key and decode the messages for that day.

Using the Bombe to win the war

During the war, over 200 Bombe machines were built. However all of them were not installed at Bletchley Park for fear that if Bletchley was bombed, all the machines would be destroyed. Besides the Bombe machines, the operators also needed the standalone Enigma machines to decode the messages but since smuggling actual Enigma machines was risky, English cipher machines – Typex were transformed into Enigma machines.

Before the Bombe, cryptanalysts worked manually for long hours to decrypt messages often with little or no success, but the machine made cryptology a lot easier and quicker.

On good days up to 3000 messages could be decoded and by the end of the war around 2.5 million messages had been decoded. These messages gave the English information about the German’s positions of attack on the English well in advance. As it is said – forewarned is forearmed. Once the English got all this vital information, they were able to avert disasters or plan counter attacks. This shortened the war by 2 years and saved over 14 million lives.

The initial machine designed by Alan Turing was manufactured in 1939 at GCCS (Govt. Code & Cypher School in Bletchley Park. The machine was improved upon by Gordon Welchman in 1940.

The breaking of the Enigma was kept a secret because if the Germans found out, they would redesign the Enigma and work would have to begin all over again on how to decode it not to mention that the war would have dragged on and millions of lives would be lost.

What an ‘enigma’ the Enigma machine was despite it simplistic look! It lived up to its literal meaning of being a mysterious, unsolvable riddle. But that was only till a simple-looking man just as enigmatic as the Enigma machine itself, broke the unbreakable code and ended World War 2 prematurely.

No comments:

Post a Comment