MovieChat Forums > The Imitation Game (2014) Discussion > Could anyone explain to me the cryptogra...

Could anyone explain to me the cryptography as displayed in the film?


I don't understand most of the cryptography in the film.

At the beginning, Hugh says they're making some progress and were in fact able to decode some messages based on frequency analysis. But frequency analysis only works for very simple cryptographic schemes like substitution cipher, I'm pretty sure Enigma was far more elaborate than that.

I also don't get how the bombe in the film is supposed to work at the beginning. It looks like brute force, just going through every single Enigma configuration.

But how does it know when to stop? Every configuration transforms the encoded message into a new sequence of letters, and as far as I can see the only way to know if it's the decrypted message is to check if it's a meaningful German text or just gibberish. However I highly doubt that the bombe was able to detect German.

Also, shouldn't the big "a-ha moment" idea, looking for cribs, be one of the first ideas of any cryptographer? Also, that's the only way I could imagine Enigma knowing when to stop, when it's found the encryption of a pre-programmed word in the message.

Am I wrong about this or is the movie just highly inaccurate about the maths and technology?

reply

[deleted]

It didn't have to, that was the beauty of it. It worked on heuristic princples, and figured out mathematically from the cribs which settings were impossibilities, which were thus ignored, and possibles were then checked.

Yes, but in the film the idea of using cribs only crossed their minds about half way through, long after the Bombe had been built and been let run every day (with no results so far). That's what I referred to as the "big a-ha moment".

As far as I understand the movie plot, before that moment they just let the Bombe check every possible Enigma setting without feeding it any guesses of plaintext information.

This is almost like trying to break a one-time-pad-encrypted message by checking every possible key. In the end you'd have every possible message of that length, but you wouldn't know which is the correct one.
I said almost because unlike one-time pads, Enigma of course used keys (i.e. settings) much shorter than the message. If you apply every possible setting to the ciphertext, it's highly unlikely that more than one gives you a meaningful message (i.e. German words in a meaningful order). That's how I figured one could spot the correct Enigma settings if no part of the plaintext is known or can be guessed beforehand. But as I said, I'm pretty sure no machine was able to tell actual words or sentences from random letter strings at that time.

reply

[deleted]

Those are great questions and comments.

At the beginning, Hugh says they're making some progress and were in fact able to decode some messages based on frequency analysis. But frequency analysis only works for very simple cryptographic schemes like substitution cipher, I'm pretty sure Enigma was far more elaborate than that.


Enigma was a very elaborate substitution cipher, using multiple alphabets, a different one for each letter of the incoming message. Traditional frequency analysis would have been inadequate to break Enigma. I think Hugh's comments about the success he was achieving in the beginning are mostly dramatic effect.

I also don't get how the bombe in the film is supposed to work at the beginning. It looks like brute force, just going through every single Enigma configuration.


Turing's bombe always worked using cribs and menus. I'd say it was a plot hole, seeing the bombe running and running and running and never finding the correct setting, as portrayed prior to the "aha" moment. The bombe, as designed by Turing and Welchman, always required good cribs and menus which included those cribs. Bad cribs would result, of course, in the machine never stopping.

But how does it know when to stop? Every configuration transforms the encoded message into a new sequence of letters, and as far as I can see the only way to know if it's the decrypted message is to check if it's a meaningful German text or just gibberish. However I highly doubt that the bombe was able to detect German.


The bombe stops when an initial setting is detected that results in the specified crib being found. But many initial settings might result in that, so when the bombe stopped the operator would have to use those settings on a Typex machine (which could simulate an Enigma machine) and see if that setting correctly translated the entire message. Most often it would not, and they would then have to restart the bombe from that point and keep going. The longer the crib, of course, the fewer stops would probably be required to find the true magic key used to create the message. Accurate cribs were required to find the key.

The crib text was entered in German, not English.

Also, shouldn't the big "a-ha moment" idea, looking for cribs, be one of the first ideas of any cryptographer? Also, that's the only way I could imagine Enigma knowing when to stop, when it's found the encryption of a pre-programmed word in the message.


You are right. The "aha" moment couldn't have happened as portrayed. But it was great drama!

Am I wrong about this or is the movie just highly inaccurate about the maths and technology?


The maths behind the operation of the bombe is extremely complex. I've been trying to understand it for a few years now and haven't quite got it yet. The average movie-goer wouldn't begin to understand the specifics of what Turing and company did. I think the producers probably did the best they could. It was a riveting movie, even if not logically accurate.

reply

Another major plot hole is this. Alan Turing is told by Helen that the German Enigma operator who she gets intercepts from always uses the same letters "CILLY" at the beginning of every message. From this fact, Turing now knows to have the bombe check messages for words that might be in the message, like "heil hitler".

How did he get that from CILLY?

It makes no sense.

But it's still a good movie!

reply

The letters CILLY are irrelevant, it's just the fact that they appear in every message. Turing realizes that some words might be in most messages and runs off to the hut to look for the decrypted message they somehow got their hands on (the same one he brought to Joan's room at night earlier in the film). Then they check it for words that might likely appear in every message.
Wikipedia agrees that the word WETTER (weather) often worked as a crib, but I have my doubts that the Germans really used to close their messages with HEIL HITLER. I guess that's just for drama as well.

I'm also confused about the CILLY part, but for a different reason. If Helen was intercepting encrypted messages, then there's no way the first letters could always have been the same, at least not for different days.

So did Helen intercept a radio tower that broadcast cleartext? If yes, what's CILLY supposed to mean? It is not a German word, and no common German name as well. It's also highly doubtable that a German soldier in WWII would abbreviate something using the suffix -LY, which is very uncommon in German.

reply

Turing realizes that some words might be in most messages and runs off to the hut to look for the decrypted message they somehow got their hands on (the same one he brought to Joan's room at night earlier in the film). Then they check it for words that might likely appear in every message.


But that is the plot hole. You raised this question yourself, I think: what was the bombe doing before the "aha" scene? The bombe couldn't possibly know it had the right key unless it had something specific to look for. It did that from day one, not just after Turing met Helen in the bar. Incidentally, it is completely unbelievable that Helen would confide to a total stranger what she did in her job; she would have been fired, or worse.

I have my doubts that the Germans really used to close their messages with HEIL HITLER


It probably wasn't widespread, but I don't doubt that it happened with certain people who felt the need to stroke the fuhrer (not that Adolf would ever see the messages). If the allies found a German operator who used that closing all the time, it would have been a great crib.

If Helen was intercepting encrypted messages, then there's no way the first letters could always have been the same, at least not for different days.


You need to understand the format and content of an actual intercept. It begins with plaintext stuff, like the station id, message length, message part number, and KEY. The key is made up by the German Enigma operator, and he could use "CIL" every day for every message if he had a mind to, although that would have been against procedures. Operators were supposed to use random letters, but being human they didn't do that all the time. They might use "QWE" or "QAY" (adjacent letters on the Enigma keyboard). When they did this, the codebreakers called them "cillies" or "sillies", silly mistakes that Germans made that made the codebreakers job easier. These letters were transmitted as plaintext, so Helen might see "CIL" every day in the preamble of messages she received.

So did Helen intercept a radio tower that broadcast cleartext? If yes, what's CILLY supposed to mean? It is not a German word, and no common German name as well. It's also highly doubtable that a German soldier in WWII would abbreviate something using the suffix -LY, which is very uncommon in German.


The first part of every message was cleartext, and the key wouldn't have been CILLY, but it might have been CIL. And that might have been part of a girlfriend's name.

If you want to understand more about Enigma messages and the bombe operations, I would recommend David Kahn's book "Seizing the Enigma". It is one of many great books on the subject.

Here is a link that describes how the operator set the message key, and it shows the format of an Enigma message, with the preamble (line starting with 1230) and the encrypted text.

http://users.telenet.be/d.rijmenants/en/enigmaproc.htm

reply

[deleted]

[deleted]