The Story Of Imitating The Game

Sometimes it is the people no one imagines anything of who do the things that no one can imagine.’

Let’s get back to where we started from, the whole idea of the Imitation Game. Most of us may surely appreciate the Benedict Cumberbatch starrer due to the intense mystery and thrill that the movie instills upon the viewers. The movie is set in a British institution Bletchley Park, the home of the British Code and Cypher School. It was chosen as it could harbor more staffs to get the code breaking thing work faster. Tasks were distributed to the staffs and each task was carried in buildings called the huts. During the autumn of 1939, the scientists and mathematicians at Bletchley learned the intricacies of the Enigma cipher and rapidly mastered the Polish techniques. The new changes in the Enigma made it ten times harder to break. At midnight, German Enigma operators would change to a new day key, at which point whatever breakthroughs Bletchley had achieved the previous day could no longer be used to decipher messages. Time was the crucial element.

The New Face

1st

Alan Turing was conceived in Madras in Sothern India where his father Julius was a member of the Indian Civil Service. Julius and his wife Ethel were determined that their son should be born in Britain, and returned to London, where Alan was born on June 23, 1912. Alan Turing had a deep love for Science and he discussed most of his thoughts with his friend Christopher who he truly admired. It was a deep sense of love that he felt with Christopher, unfortunately his death had a devastating effect on Turing. His focus on scientific study grew as an attempt to fulfill his friend’s potential.Turing imagined a whole series of so-called Turing machines, each specially designed to tackle a particular task, such as dividing, squaring or factoring.Then, in 1939, Turing’s academic career was brought to an abrupt halt. The Government Code and Cypher School invited him to become a cryptanalyst at Bletchley.

Turing’s Methods

We may recall that Rejewski’s work relied on the fact that Enigma operators encrypted each message twice. Turing feared that this would not continue long as the Germans may see through the loophole and rectify it. He thus had to find an alternative technique.

Turing noticed that many of the confronted messages in the library were based on the time of the day when it was sent. For example a morning message would most probably contain the term wetter, the German word for weather. This protocol meant that the ciphertext mostly  had many clues which could be most of the time, deciphered as a message, these pieces of ciphertext that could be deciphered were called cribs.

Turing was sure that he could exploit the cribs to crack Enigma. If he had a ciphertext and he knew that a specific section of it, say ETJWPX, represented wetter, then the challenge was to identify the settings of the Enigma machine that would transform wetter into ETJWPX. The straightforward, but impractical, way to do this would be for the cryptanalyst to take an Enigma machine, type in wetter and see if the correct ciphertext emerged. If not, then the cryptanalyst would change the settings of the machine, by swapping plugboard cables, and swapping or reorienting scramblers, and then type in wetter again. If the correct ciphertext did not emerge, the cryptanalyst would change the settings again, and again, and again, until he found the right one. The only problem with this trial and error approach was the fact that there were 159,000,000,000,000,000,000 possible settings to check, so finding the one that transformed wetter into ETJWPX was a seemingly impossible task.

Turing here used Rejewski’s strategy, he ignored the plugboard settings and concentrated on scrambler arrangement. For example, if he could find something in the crib that had nothing to do with the plugboard cablings, then he could feasibly check each of the remaining 1,054,560 possible scrambler combinations (60 arrangements × 17,576 orientations). Having found the correct scrambler settings, he could then deduce the plugboard cablings.

Eventually, his mind settled on a particular type of crib which contained internal loops, similar to the chains exploited by Rejewski. Rejewski’s chains linked letters within the repeated message key. However, Turing’s loops had nothing to do with the message key, as he was working on the assumption that soon the Germans would stop sending repeated message keys. Instead, Turing’s loops connected plaintext and ciphertext letters within a crib. An example is shown below:

2nd

Remember, cribs are only guesses, but if we assume that this crib is correct, we can link the letters W→E, e→T, t→W as part of a loop. Although we know none of the Enigma machine settings, we can label the first setting, whatever it is, S. In this first setting we know that w is encrypted as E. After this encryption, the first scrambler clicks around one place to setting S+1, and the letter e is enciphered as T. The scrambler clicks forward another place and encrypts a letter that is not part of the loop, so we ignore this encryption. The scrambler clicks forward one more place and, once again, we reach a letter that is part of the loop. In setting S+3, we know that the letter t is enciphered as W. He divided the arrangements in three scramblers with settings S, S+1, S+3.

He imagined connecting the three machines by running electrical wires between the inputs and the outputs of each machine. In effect, the loop in the crib is paralleled by the loop of the electrical circuit.

3rd

Turing pictured the machines changing their plugboard and scrambler settings, as described above, but only when all the settings are correct for all three machines would the circuit be completed, allowing a current to flow through all three machines. Turing incorporated a lightbulb within the circuit when the current would illuminate it would signal that the correct settings had been found. At this point, the three machines still have to check up to 159,000,000,000,000,000,000 possible settings in order to illuminate the bulb. However, everything done so far has merely been preparation for Turing’s final logical leap, which would make the task over a hundred million million times easier in one fell swoop.

Turing had constructed his electrical circuit in such a way as to nullify the effect of the plugboard, thereby allowing him to ignore the billions of plugboard settings. In the figure we see that the first Enigma has the electric current entering the scramblers and emerging at some unknown letter, which we shall call L1. The current then flows through the plugboard, which transforms L1 into E. This letter E is connected via a wire to the letter e in the second Enigma, and as the current flows through the second plugboard it is transformed back to L1. In other words, the two plugboards cancel each other out. Similarly, the current emerging from the scramblers in the second Enigma enters the plugboard at L2 before being transformed into T. This letter T is connected via a wire to the letter t in the third Enigma, and as the current flows through the third plugboard it is transformed back to L2. In short, the plugboards cancel themselves out throughout the whole circuit, so Turing could ignore them completely!

Turing needed only to connect the output of the first set of scramblers, L1, directly to the input of the second set of scramblers, also L1, and so on. Unfortunately, he did not know the value of the letter L1, so he had to connect all 26 outputs of the first set of scramblers to all 26 corresponding inputs in the second set of scramblers, and so on. In effect, there were now 26 electrical loops, and each one would have a lightbulb to signal the completion of an electrical circuit. The three sets of scramblers could then simply check each of the 17,576 orientations, with the second set of scramblers always one step ahead of the first set, and the third set of scramblers two steps ahead of the second set. Eventually, when the correct scrambler orientations had been found, one of the circuits would be completed and the bulb would be illuminated. If the scramblers changed orientation every second, it would take just five hours to check all the orientations.

The problem that remained was involved in finding the plugboard cablings, once the scrambler arrangement and orientations had been established. This is relatively simple. Using an Enigma machine with the correct scrambler arrangement and orientations, the cryptanalyst types in the ciphertext and looks at the emerging plaintext. If the result is tewwer rather than wetter, then it is clear that plugboard cables should be inserted so as to swap w and t. Typing in other bits of ciphertext would reveal other plugboard cablings.

These concepts were included in the movie, the word wetter was replaced by Heil Hitler. Turing was finally able to come up with a plan. He designed a new bombe which was two meters tall, two meters long the machine shown in the movie.If everything went well, a bombe might find an Enigma key within an hour. Once the plugboard cablings and the scrambler settings (the message key) had been established for a particular message, it was easy to deduce the day key. All the other messages sent that same day could then be deciphered.

4th

Aftermath

The allies were initially reluctant to disclose that they had cracked the Enigma, every single hint of the cracking was erased.In the movie you may see that the Britishers save a ship after they knew that it would be under attack if they didn’t do anything 50,000 crew men and the battle of Atlantic would be lost this was the time that the truth got revealed. But soon the allies won and Germany didn’t get another chance of improvising the Enigma.

Sadly as Turing was homosexual, he was confronted by the Britishers as homosexuality was banned then. It’s sad to know that the man didn’t even credits for his work. But nonetheless he proved that no problem is hard to solve, all it takes is a little determination and risk.

With this I come to the end of my series of blogs. Hope you enjoyed the journey. Links to my previous blogs:

https://theqriusrhino.wordpress.com/2018/07/09/the-making-of-the-enigma-machine/

https://theqriusrhino.wordpress.com/2018/07/12/cracking-the-enigmai/

https://theqriusrhino.wordpress.com/2018/07/20/cracking-the-enigma-ii/

Thank you,

Shoubhik Banerjee

IISER Bhopal

Leave a Reply

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