The Enigma Machine: How Alan Turing Helped Break the Unbreakable Nazi Code

in History, Math | January 17th, 2013

In 2001, none other than Sir Mick Jagger bought the rights to a novel by Robert Harris called Enigma. The novel, a fictionalized account of WWII British codebreakers, then became a feature film, written by Tom Stoppard, produced by Sir Mick, and starring Mr. Dougray Scott and Ms. Kate Winslett as derring-do Bletchley Park mathematicians and cryptanalysts employed in a race against time and the Nazis to break the fabled Enigma code before all hell breaks loose. It all sounds very dramatic (and I’ve heard the film is entertaining), but things didn’t happen quite like that. Reality is never so formulaic or so good-looking. But the Enigma code was broken, and the story of the code machine and its eventual decryption is fascinating on its own terms. As University of Cambridge “Enigma Project Officer” Dr. James Grime says–in the series of videos above and below–it’s a story of “how mathematicians can save lives.” Still with me?

Okay, so in the first video above, Dr. Grime gives us a thorough tour of the Enigma machine (Sir Mick owns one, by the way… but back to the history…). Developed by the Germans, it’s a marvelous encryption method set into a small box that when opened resembles little more than a fancy WWII-era typewriter. Oh, but it’s clever, you see, because the Enigma machine (the one above belongs to science writer Simon Singh) translates ordinary messages into code through an ingenious method by which no letter in the code ever repeats, making it almost impossible to decode in the ordinary ways. The machine was quite complicated for its time; it works by sending the characters typed by the keys through a series of circuits—first through three rotors like those on a combination bike lock, but each with 26 places instead of ten.

Now at this point, the machine was nothing more than what was available to any bank or business wishing to transmit trade secrets. But the German military machines had an extra layer of encoding: at the front of their machines was a “plugboard,” something like a small switchboard. This allowed the coding coming through the rotors to be resequenced for an extra level of scrambling. In the German military machines, the total number of possible combinations for message encryptions comes to a staggering figure in the quadrillions. (The exact number? 158,962,555,217,826,360,000). There’s a little more to the machine than that, but Dr. Grime can explain it much better than I.

Of course, the Enigma Machine had to have a fatal flaw. Otherwise, no novel, no movie, no drama (and maybe no victory?). What was it, you ask? Amazingly, as you will learn above, the very thing that made the Enigma nearly impossible to break, its ability to encode messages without ever repeating a letter, also made the code decipherable. But first, Alan Turing had to step in. Sadly, Turing is missing from Enigma the film. (More sadly, he was disgraced by the country he served, which put him on trial for his sexuality and humiliated him to the point of suicide). But as Grime shows above, Turing is one of the real heroes of the Enigma code story. Cryptanalysts initially discovered that they could decipher ordinary words and phrases (like “Heil Hitler”) in the Enigma messages by matching them up with strings of random letters that never repeated.

But this was not enough. In order for the Enigma code to work for the Germans, each operator—sender and receiver—had to have exactly the same settings on their rotors and plugboards. (The messages were transmitted over radio via Morse code). Each month had its own settings, printed on code sheets in soluble ink that easily dissolved in water. If the Allied codebreakers deciphered the settings, their decryption would be useless weeks later. Furthermore, the German navy had a more complicated method of encoding than either the army or air force. The Polish had developed a machine called the Bombe, which could decipher army and air force codes, but not navy. What Turing did, along with Gordon Welchman, was develop his own version of the Bombe machine, which allowed him to break any version of the Enigma code in under 20 minutes since it bypassed most of the tedious guesswork and trial and error involved in earlier by-hand methods.

This is all very dramatic stuff, and we haven’t had one celebrity step in to dress it up. While I’m certain that Enigma the film is a treat, I’m grateful to Dr. Grime for his engagement with the actual codebreaking methods and real personalities involved.

A third video of extra footage and outtakes is available here if you’re still hungry for more WWII codebreaking secrets.

via Science Dump

Josh Jones is a writer and musician. He recently completed a dissertation on land, literature, and labor.

by | Make a Comment (30)

Comments (30)

  1. Patryk says . . .
    January 17, 2013 / 8:47 am

    It was Poles who cracked Enigma, learn some history here:

    “In December 1932, the Polish Cipher Bureau first broke Germany’s military Enigma ciphers. Five weeks before the outbreak of World War II, on 25 July 1939, in Warsaw, they presented their Enigma-decryption techniques and equipment to French and British military intelligence.”

  2. Seba says . . .
    January 17, 2013 / 11:29 am

    As far as I know Polish scientists cracked Enigma. :)

  3. Ning says . . .
    January 17, 2013 / 3:46 pm

    Maybe actually watch the videos ???
    He says the polish cracked the army and airforce enigma machines – but not the naval ones.

  4. Ning says . . .
    January 17, 2013 / 3:49 pm

    so if we are going to quote wikipedia – maybe use the right article

    “Alan Turing, a Cambridge University mathematician and logician, provided much of the original thinking that led to the design of the cryptanalytical Bombe machines (an improvement of the Polish Bomba), and the eventual breaking of naval Enigma.”

  5. Piotr says . . .
    January 17, 2013 / 11:41 pm

    Właśnie, koledzy, obejrzyjcie najpierw filmy :)

  6. Int says . . .
    January 18, 2013 / 2:19 am

    angielskie buraki

  7. Chris says . . .
    January 18, 2013 / 6:06 am

    I wrote a small book about the breaking of the enigma code, if someone wants to know more about this topic:

    (ebook, pdf and audiobook are free!)

  8. Dee says . . .
    January 18, 2013 / 6:48 am

    It was Poles who cracked Enigma!!! British liers!

  9. f0ak says . . .
    January 18, 2013 / 9:35 am

    Może najpierw przeczytajcie artykuł, a nie robicie naszemu krajowi wstyd, potem się dziwicie, że reszta świata ma nas za idiotów. Tutaj cytat:
    “The Polish had developed a machine called the Bombe, which could decipher army and air force codes, but not navy.”

  10. Pawel says . . .
    January 18, 2013 / 10:12 am

    Please don’t mind comments made by some, who had been brought here because of false information posted on another website. Sadly they care not to read actual article, thus lacking basic knowledge and understanding.

  11. robert says . . .
    February 8, 2013 / 9:36 am

    To everyone who says that the Poles cracked the code.
    The Polish did crack a type of the Engima Code, but, it was at the start of the war. Even before that. The Germans learned of them breaking the code. So, they changed it. So in fact, both the British and the Polish cracked the enigma code.

  12. Jacob says . . .
    April 29, 2013 / 4:51 pm

    Dr. Miller at the NSA says the number of combinations was much bigger than the number stated in this article (3 X 10^114). Also, Mariam Rejewski (Polish mathematician) broke the first versions of enigma. Believe it or not, the Germans kept changing the machines to make it more difficult to crack. Both the Poles and the Brits put some great efforts in cracking enigma. Unfortunately, the Brits get most of the credit since the last bombes were made by them and they could crack all enigma codes.

  13. wolfy says . . .
    November 13, 2013 / 11:09 pm


  14. Karenji Ramsuer says . . .
    February 12, 2014 / 12:36 pm

    I think everyone interested in cryptology must see the “mind of code breakers ” to understand in detail the impact of the ENIGMA machine

  15. Raf says . . .
    March 10, 2014 / 8:22 am

    Beautiful machine,

    As far as I know the Enigma machine is stronger than current Credit Card, because in Enigma machine occur more possibility to encryption than in CC.

    PS. Great article about Enigma, I was finding some article about this machine everywhere, and I think that this article is one of the best!


  16. Amanda Barr says . . .
    May 12, 2014 / 7:43 pm

    My grandfather, Alexander Barr, was also very involved in the work with enigma, I believe he was on the decoding team. Can anyone give me any details?

  17. Mary T says . . .
    June 10, 2014 / 8:25 am

    Wonderful videos about breaking the Enigma code. Dr. Grime makes a complicated subject accessible and exciting.

  18. David says . . .
    December 2, 2014 / 8:46 am


  19. Kaitain says . . .
    December 22, 2014 / 11:52 pm

    It’s a bit of tired trope to claim that “the Poles cracked Enigma”. They cracked an earlier, much easier version of Enigma. The one used by the Kriegsmarine during the war had a state space that was orders of magnitude larger. All the breakthroughs at Bletchley Park were specifically to address this vastly larger state space. This required both new computing machines and the invention of ingenious new heuristics for reducing the size of the state space.

    The Polish work was just the starting point for ULTRA. By their own admission, the Poles did not have the resources to solve the later incarnations of Enigma.

  20. David says . . .
    February 12, 2015 / 8:04 pm

    I understood that partial knowledge of the encryption potential result is used to find the machine settings for the day. Is this a deductive or inductive process? Dr. Grime states that it is deductive.

  21. Jess says . . .
    April 1, 2015 / 12:38 pm

    The article states “its ability to encode messages without ever repeating a letter”… this is a complete misunderstanding of the functionality.

    The machine was built in a way so that a letter could never be encoded as itself. That was the flaw… it allowed cribbing of common words like Heil Hitler to rule out the impossible decryptions that had letters encoded as themselves.

    Perhaps read a book before you write an article.

  22. Jai says . . .
    May 25, 2015 / 3:44 am

    Yes, but the German military invented their own version of the enigma machine. Alan Turing also developed a machine that could decipher the code in under 20 minutes, which helped the British enormously when the Germans changed the settings everyday towards the end of the war.

  23. bonnie says . . .
    July 14, 2015 / 3:11 pm

    Thank you for these two fascinating videos! Especially loved the calculations as to how they derived the 159 quintillion (or a little less) possible combinations.

  24. Sneha Anthony says . . .
    October 8, 2015 / 10:16 am

    This information really helped my research project. It’s very interesting how Turing contributed to the war. I think it’s amazing idea and I’m glad I got to learn about it.

  25. Sneha Anthony says . . .
    October 8, 2015 / 10:17 am


  26. Ian says . . .
    October 9, 2015 / 7:31 pm

    There is a different between an “improvement” and a new invention. What Turing did was an improvement. The Polish already made machines that can crack the Enigma code. What the navy uses is just a little different from the army and air forces. It’s unfair to give Turing too much credit because he got too much inspiration from others.

  27. wade says . . .
    November 19, 2015 / 3:19 am


  28. Samantha says . . .
    January 7, 2016 / 11:44 am

    They did but the British made a much more advanced and quicker way to break it.

  29. john lee says . . .
    May 31, 2016 / 12:20 pm

    Interesting article. The English did a great job at overcoming the German Enigma machine. The Polish did a great job at overcoming the German Enigma machine too. Each country did what they needed to do without regard to credit. The entire world dynamic was at stake during WWII. We can all hope history does not repeat itself, but alas we have already forgotten the horrors of war. The middle east is ablaze and everyone has their hands on the “fire” button.
    Stay thristy my friends!


  30. John says . . .
    June 17, 2016 / 5:23 am

    The people at Bletchley Park recognise the fact that the Poles broke Enigma using mathematicians. They emphasise the point that they showed the way forward to breaking the Engima and Lorentz codes. Without the Poles, the British may have not had the head start they did.

    Don’t think it really matters who did what – the result is the same

    What is more interesting is what happened to Rejewski – you would have thought the British might have made more use of him when he arrived in England – but he was given some minor code breaking role.

Add A Comment