10

Perhaps this would fit the History SE or another, but I'm asking here because I don't know how historically accurate the film is.

In the film The Imitation Game, Alan Turing's team has created a machine (a primitive computer) to automatically crack the Nazis' Enigma codes. Initially it takes too long for the results to be useful, but eventually Turing realises that

if they make it only accept codes that produce "Heil Hitler" as part of the message, they can disregard ones that are definitely wrong.

However, I can't imagine how the machine determined a correct "answer" before this change. As a primitive computer,

there's no way the machine would be able to understand natural language, and therefore "We will attack at 8am" would be just as meaningful to it as "Xkgr wpmnwqw enjmbjg hglaaa".

Before Turing's realisation, how was the machine supposed to know when it had found the answer and stop testing different combinations?

5
  • 1
    Also don't forget that they used the fact that no letter ever maps to itself. Dec 5, 2014 at 11:38
  • @AndrewMartin: Did the imitation-game tag exist or did you add it? I couldn't find one.
    – George T
    Dec 5, 2014 at 11:40
  • 1
    I created it. You need a certain amount of rep to do it Dec 5, 2014 at 11:49
  • This requires too much research for me to look at now, but I think they took the fact no letter maps to itself from the work done previously by Polish enigma crackers. They then developed this further to look for certain phrases, e.g. "weather". Finally, they scanned for phrases always existing. Dec 5, 2014 at 12:21
  • 1
    I haven't seen the movie yet but that sounds like just artistic liberty to me, or as a change of Turing's and the other's work for the story's sake. The Turing Bomb always worked that way, Turing's improvements were much more mathematical (and the result of the "calculation" ("computer"? ha!) was not the plain text or the key but a manageable number of key candidates). Also the plain text phrase that you mention wasn't exactly part of military status messages but probably is more impressive to a general audience than "weather" or coordinates without the digits 0,2 and 5.
    – his
    Dec 5, 2014 at 14:41

2 Answers 2

11

Basically, it wouldn't.

The original Turing Machine (Or Christopher as it was named) was never programmed to identify words: it was programmed to identify consistencies.

The enigma code wasn't deciphered through letters, it was deciphered through a tape displacement procedure known as its 'primitive operation' that's chosen signifiers are still honored today in the form of binary.

The code was 'imprinted' by enigma machines in the form of coded tapes or film, on which would read numbers, like thus:

10 001 00111 110 111000 00111 100 11

Now those numbers each represented a command to shift a letter a certain number of characters in a certain direction, either left or right and sometimes back and forth within the same command string. Each night at midnight, the meaning of these commands would change, meaning it was seemingly impossible to decipher.

Until Turing, linguists and cryptologists were employed to crack the codes: but Turing realized it was impossible for them to consider every code in under 24 hours: there is a line in the Movie that reflects this:

"If we had ten men, decoding one code a minute, 24 hours a day 7 days a week, can you imagine how many hours it would take to run every possibility? Well it isn't hours, it's years. 20 Million years..."

Turing's goal wasn't necessarily to make a machine that would crack the code, but a machine that would drastically reduce the workload for the cryptologists to work through.

Turing's machine was created to process thousands of different codes a second, and simply regurgitate the results. The idea was, it is easier for a cryptologist (or even a typing pool clerk) to look through the attempted decodes and spot something written in identifiable German than if it was pure gibberish: it removed the requirement for those reading the work to be trained cryptologists, which was in itself a great boon.

As the film identifies, however, this wasn't enough. Processing power, whilst advantageous, is not as good as a machine that can identify codes itself (which is the very dilemma you state in your question).

When Turing realized there was at least one message per day that held consistencies (in the film adaptation the 3 words Weather, Heil and Hitler), he understood that he could feed this consistency back into the machine and reprogram it to look for those consistencies. In being able to break those words, he was able to break the code itself.

The machine breaking the code and 'stopping' itself is almost certainly a visual metaphor for the film: the noisy gears suddenly, jarringly stopping is akin to a Eureka moment. In reality, What this machine would have done is, using these integers, produced a manageable candidacy of possibilities, which would then be scrutinised by a human until the correct combination is spotted. After this, the programmers would reset the machine to the combination it used during that specific decoding, and voila.

5
  • Thanks for the information, that's very interesting. I guess, then, that there's no "canon" explanation for the way things were shown in the film.
    – George T
    Dec 5, 2014 at 20:03
  • 1
    Nice answer John!! I'm a programmer by day, and I appreciate your logical explanation of the process. Dec 5, 2014 at 22:01
  • 1
    I haven't seen the movie myself yet, but one on the key things Turning machine did was exploit the famous flaw in the Engima machines to quickly reject possible settings for the decoder for that day. This is where the "known words" came into play -- we knew that Engima never encoded a letter to itself so if we knew a word probably existed near the start of the message we could find it by eliminating places where it would require a letter to encode itself. Because of how the enigma code worked this could eliminate thousands of cipher settings at a time.
    – KutuluMike
    Jan 25, 2015 at 12:46
  • 1
    Your assumptions about the real machine are wrong. Cryptographers would work on the messages first, using the "no letter is itself" and other methods to find a likely "Heil Hitler" for the message. The bombe would then run until it found an Enigma combination that gave that output, then it would literally stop. The operators then make a note of the combination, then start it again to find another one, while the cryptographers check whether the found combination actually decodes the rest of the message(s) into something intelligible.
    – OrangeDog
    Jan 22, 2017 at 10:08
  • 1
    This answer is completely incorrect. The machines used to find Enigma settings were never called Turing machines, they were called Bombes. The item called 'Turing machine' was a theoretical concept Turing worked on, which had no relation to Enigma. Enigma did not encode messages to binary code. It did not use a tape displacement operation. The bombe did physically stop when it found a possible solution. Operators would copy the settings and start trying to decrypt messages, but the bombe would be restarted to find more possible combinations.
    – Hobbes
    Mar 12, 2019 at 14:40
2

As per my theory which is based on this answer, this link and this video

For the sake of entertainment, the makers of the movie clubbed together two different epiphanies to make the story more thrilling. There is a possibility that John's answer is correct and this is what (consistencies) the machine really tried to find out before the moment of realization(s). In reality, this might have happened.

When Miss Clarke pointed out that No letter can be encoded as itself (Epiphany I), with this information Turing successfully decrypted the enigma. As the above mentioned video states after this realization the complexity (possible number of combinations the machine had to check) of the procedure became less than 264 but the machine was still taking too much time. Now the task was to make it more efficient.

When Turing met Helen in the bar and got to know that there is a German interceptor whose messages begin with the same five letters C-I-L-L-Y he deduced that instead of using random letters for the encryption of the day key, some people uses the letters which they like and these letters are predictable like QWE,ABC.ASD etc (Epiphany II). And hence the enigma was successfully broken.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .