How the Enigma code-machines worked


I recently hear that one of the ways the enigma code was cracked was thanks to some German in a particularly remote post whose weekly report said “situation unchanged.”


And the allies no doubt ensured that nothing ever happened to him. Poor guy he had a boring war.

1 Like

Situation unchanged? Let me know.

1 Like

No news is good news. (for cryptanalysts)


I suppose ENIAC was still years in the future, but this still seems unnecessarily complicated to me. For example, the plugboards for input and output are simple substitution ciphers, and make the whole thing no harder to break - but one more part that can break.Also, that fourth rotor would do nothing unless the message was over 17,000 characters long. With a blinky light for output, I doubt their messages ever even topped 676.

They may be substitution ciphers, but they’re shifting substitution ciphers that vary depending on how many prior key presses have been entered.

An example.

“Hello” with each letter shifted one letter forward becomes “Ifmmp”, and you can easily figure out the nature of the cipher. But if we change how we shift it based on the number of keys pressed, things get complicated quickly.

Let’s say that the number of letters you shift increments after each key press. “Hello” becomes “Igopt”, which is a lot less recognizeable, particularly because the double letter is eliminated.

Now add in word order. “Hello world” is “Ifmmp xpsme” with a single letter shift. With incrementing shifting per letter, you get “Igopt cvzwn”. But if you reverse the word order to “World hello”, you get “xqupi nvztuy”, which is completely different. The same word has entirely different representations depending where it falls in a sentence.

Already, with just two words, the code is very complex and hard to decipher purely from the outputs. Apply it on the scale of entire paragraphs of text, and it’s no wonder we never broke the code until we captured an actual enigma machine.


This is an excellent video detailing and explaining the workings of the Enigma machine, using an actual machine from the war:


I really don’t know why everyone is focussing on Enigma in regard to Turing. While he was involved with that, most of the work had already been done by the Polish. Instead, his greatest work was in the analysis of the far more complicated Lorenz (Tunny) cipher – that had 12 rotors as opposed to the 3 to 8 present in Enigma.


Another great show involving codebreakers is The Bletchley Circle. Four women who worked as codebreakers during the war stumble across a serial killer 10+ years later. They’re all brilliant and they can’t explain how they know the things they do, because their work was all top secret.


In the online “A.I.” MMP ARG mystery game “The Beast”, one of the clues depended on an Enigma machine decoding, and sure enough, online Enigma simulators were found and the clue solved in a rather short period of time due to the huge number of players.

Thanks for posting that.

That video (and the following two) were very interesting :smiley:

Oh, I know. But the first and last stages never shift. They add zero complexity.

My pleasure.

If you liked those videos, and want your mind numerically blown, check out this one for Graham’s Number.

1 Like

That video confused me a bit. I think i was following well enough until they were getting onto the stupendously large ‘gⁿ’ numbers, then lost me when they decided why g64 was the highest you could go., why not gⁿ where the power is also gⁿ?
If that makes sense, or i’ve just misunderstood things :smile:

(NB. i should note here i wasn’t brilliant at maths at school, and did well to scrape an average ‘C’ grade at the UK GCSE exams we took at 16) They never showed us maths things remotely this interesting at school :slight_smile:

Zero complexity, but another thing that any codebreakers need to figure out


That video… IT’S NUMBERWANG!


That’s merely translating from English to Qwghlmian, isn’t it?

1 Like

I am not sure. The Germans used one key (rotor setting per day) and no doubt sent many messages to remote sites. If they reset the rotors between recipients, you could do difference analysis between messages to derive the key. But if you broadcast a stream of messages and didn’t reset the rotors (assuming that each recipient could work out the starting point by context) then it would be harder to extract the key.

1 Like

Either way it will get you a date in Brisbane :wink: