Numberphile - The Fatal Flaw of the Enigma Code Machine

Prof. James Grime explains how Turing and the British defeated the Enigma machine with a machine of their own that exploited the fatal flaw.
radxsays...

Well, they wanted to use a single machine for both encoding and decoding of messages, so the use of a reflector to channel the signal right back through the rotors strikes me as rather pragmatic.

What bothers me is that they relied on "security through obscurity".

The sheer number of possible settings with 3 (4) rotors of a random configuration, each with adjustable rings, plus a plugboard with a variable number of connections -- that's a metric fuck-ton of permutations. But the rotors had fixed wiring and were limited in number. As soon as the Allies got their hands on a set of rotors, the possible number of settings was reduced radically. And the number of connections on the plugboard was standardized to 10 in '41.

Now, what if they had replaced one of the fixed-wiring rotors with a sort of pluggable rotor disc, a rotor that could be reconfigured on site within a minute? That would have screwed the boys at Bletchley Park, wouldn't it? Instead of 60 combinations for 3 out of 5, you'd have 20*26! (2 out of 5 and one random). Have it reconfigured daily, just like the starting positions, and brute force would have required much more effort.

It would still have been vulnerable, given the reflector issues, the nonsensical guidelines for the plugboard, the need to transmit settings, the vast numbers of codebooks, etc. But the numbers would have been more to their favor.

siftbotsays...

Tags for this video have been changed from 'Brady, Haran, James, Grime, WWII, Nazi, code, codebreaker, codebreaking' to 'Brady Haran, James Grime, WWII, Nazi, code, enigma, encryption, alan turing' - edited by xxovercastxx

rychansays...

I do not understand at all why finding one contradictory plug setting, e.g. (t a) and (t g), means that every other plug setting you found during that trial was wrong. That cannot possibly be true. The space of possible plug connections (on the order of 26*25) is too small. You've probably got millions of trials that end in conflicting plug settings. You would end up invalidating all of them. I must be misunderstanding what he was trying to say.

radxsays...

Edit: Oh boy, wall of text crits for 10k.

His explanation was rather short and somewhat misleading. Maybe they thought a proper explanation would have been too dry or too lengthy to be of any interest for a sufficient number of their viewers.

tl:dr

If all rotor settings are indicated to be correct, a feedback loop within the circuit indicated a subset of correct connections on the plugboard, even if the initially assumed connection turned out to be wrong. It didn't show all connections, but enough to run it through a modified Enigma to determine if it's a false positive or in fact the correct setting. If it was correct, the rest could be done by hand.

----------------------- Long version -----------------------

Apologies in advance. We had to recreate parts of the Bombe as a simulation, but a) it's been a while and b) it was in German. I'll try to explain the concept behind it, hopefully without screwing it up entirely.

The combination of clear message and code snippet (2:25) is called a crib. This can be used to create a graph, wherein letters are the vertices and connections together with their numerical positions are the edges.

For example, at position 1, "A" corresponds to "W". So you'd create an edge between "A" and "W" and mark that edge as "1". At position 4, "B" corresponds to "T", so there's the edge marked as "4". All edges are bidirectional, the transformation at a specific position can go either way.

Once your graph is finished, you check for loops. These are essential. Without loops, you're boned. In this case, one loop can be found at positions 2,3,5 in form of "T->E->Q->T".

Here the Bombe comes into play. It uses scramblers, each combining all three rotors plus reflector of an enigma into one segment. This way, one Enigma setting is functionally equal to a single scrambler.

Now you can use those scramblers to create an electrical circuit that corresponds to your graph -- scrambler = edge. All scramblers are set to the same initial configuration. The first scramber remains at in the inital configuration, while the second and third get configurations in relation to their edge's numerical value. Configuration in this case means the value of their internal three rotors, so there are 26*26*26 possible settings within each scrambler.

It's basically a sequence of three encryptions.

Example: in our little TEQ triangle, the first scrambler (TE, 2) gets a random starting position. The second scrambler (QE, 5) gets turned three notches, the third scrambler (QT, 3) gets turned one notch. The initial configuration might be wrong, but only the relation between the scramblers matters. A wrong result simply tells you to turn all scramblers another notch, until you get it right.

You have a possibly correct setting when the output matches the input. Specifically, a voltage is applied to the wire of letter "T", leading into the first scrambler. And on a test register attached to the last scrambler, the wire of letter "T" should have a voltage on it as well. If the setting is incorrect, a different letter will light up. Similarly, all incorrect inputs for this particular setup will always light up a different letter at the the end, never the same (thanks to the reflector). If output equals input, you're golden. And if several loops are used, all with the same input/output letter, each of their outputs must equal the input.

To reduce the number of false positives, you need as many connected loops within the crib as possible.

So far, that's an Enigma without a plugboard. To account for that, they introduced feedback loops into the circuit. In our small scale case, the output of the third scrambler would be coupled back into the input of the first scrambler. The number of loops determines the number of possible outcomes with each specific setting. All of these are fed back into the first scrambler of each loop.

The plugboard, however, changed the input into the system of rotors. Instead of a "T" in our example, it might be a "Z", if those two letters were connected on the board.

A random hypothesis is made and fed into the machine. If the scramblers are set incorrectly, a different letter comes out at the end of each loop and is in return fed back into the first scramblers. Result: (almost) everything lights up. If you start with a good graph, everything will light up.

-----
A key element for this was the "diagonal board", which represented a) all possible connections on the plugboard and b) the bidirectional nature of those connections (AB = BA). Maybe it can be explained without pictures, but I sure as hell can't, so "a grid of all possible connections between scramblers and letters + forced reciprocity" will have to suffice.
-----

If, however, the setting was correct, a wrong hypothesis for the input connection merely meant that everything except the right connections was lit up.

Let's say the fix point of the loops in our graph is the letter "T". We assume that it's connected to the letter "Z" on the plugboard. A voltage is applied to "Z" on the test register, and thereby inserted into the circuit at the first scrambler. Loop #1 applies voltage to the letter "A" on the test register, #2 lights up "B", #3 lights up "F". These three outputs are now fed back into the first scrambler, so now the scrambler has voltage on ZABF, which in return lights up ZABF+GEK on the test register.
This goes on until everything except "U" is lit up on the test register. That means three things: a) the settings are correct, b) the hypothesis is wrong, c) "T" is connected to "U".

Reasons:
a) if the settings were incorrect, the entire register would be alive
b) if the hypothesis was correct, only the letter "Z" would be alive on the register
c) due to the feedback loop, the only way for the output to be "U" is if the input was also "U", and the reciprocity within the system makes it impossible for any other input to generate the output "U". Since "T" was the fix point for our loops, "T" is connected to "U".

Similarly, if the initial hypothesis is correct, everything on the test register except "U" stays dead.

The diagonal board provides registers for every single letter and allows the user to pick one as a test register. During operation, all the other registers serve as visual representations of the deductions based on the initial hypothesis. So you actually get to see more than just the initial connection, all based on the same concept.

rychansaid:

I do not understand at all why finding one contradictory plug setting, e.g. (t a) and (t g), means that every other plug setting you found during that trial was wrong. That cannot possibly be true. The space of possible plug connections (on the order of 26*25) is too small. You've probably got millions of trials that end in conflicting plug settings. You would end up invalidating all of them. I must be misunderstanding what he was trying to say.

messengersays...

Wow. I would have gone with, "From any of those positions, you can derive the others and vice-versa, therefore if one is proven false by simultaneously having two contradictory values, then all of them are proven false, and all but the true path would prove false."

But what you said works too...

Send this Article to a Friend



Separate multiple emails with a comma (,); limit 5 recipients






Your email has been sent successfully!

Manage this Video in Your Playlists




notify when someone comments
X

This website uses cookies.

This website uses cookies to improve user experience. By using this website you consent to all cookies in accordance with our Privacy Policy.

I agree
  
Learn More