eli5: Why could the Enigma Machine not map a letter onto itself?

368 viewsMathematicsOther

I know that that was why the codebreakers could break Enigma, but why?

In: Mathematics

7 Answers

Anonymous 0 Comments

The enigma machine had a series of rotors that each connect a letter on one side to a letter on the other side. So if you put in ‘A’, the first rotor would transform ‘A’ to ‘B’, the second would transform ‘B’ to ‘C’, and so on. (not necessarily that pattern). After the letter was changed by a number of rotors, it was then fed into an electrical system where the letters were paired up and switched (so ‘A’ becomes ‘B’, ‘B’ becomes ‘A’, ‘C’ becomes ‘D’, ‘D’ becomes ‘C’, etc.). Finally, the letter was sent back through the rotors in reverse.

If the rotors turned ‘F’ into ‘Q’, then going in reverse would turn ‘Q’ into ‘F’, but because of the switching no letter could come out of the switchboard the same as it went in, so ultimately the output of the Enigma machine would not be the same as the input.

Anonymous 0 Comments

Because of a bit at the end called the “reflector”. The machine has a bunch of rotors which substitute letters with other letters. The input goes through the rotors, eventually reaching the reflector. The reflector would send the input back through the rotors in reverse order, but through a different path. The advantage of this was that there’s no difference between encryption and decryption (if A goes to, say, Q, then Q goes to A).

However, because the reflector always send the input back through a different path, it means that a letter can never be substituted with itself.

Anonymous 0 Comments

The Enigma’s reflector made it so that a letter could never map to itself. This quirk, while seemingly a security feature, ended up being a critical flaw that Bletchley Park exploited. By knowing a letter could never be itself, they could immediately rule out many possible configurations. Kind of ironic if you think about it—if it was just a tad less “secure,” it might’ve been unbreakable for much longer.

Anonymous 0 Comments

It was just a byproduct of how it was designed, and the circuitry does not allow for that. There are two areas of note for the design, and you can examine [this diagram from Wikipedia](https://en.wikipedia.org/wiki/Enigma_machine#Electrical_pathway) to take a look at the internal workings.

There was a reflector in the mechanism, which connected to the last rotor and paired up the outputs (crucially, **all 13 pairs of them**, as will be explained in the next paragraph) before connecting back to the rotors, in reverse order, (and plugboard, etc.) again. This makes the code a self-inverse, so as long as you have the same settings, typing one of the plaintext or encrypted messages will give the other.

**The presence of the reflector itself does not inherently prevent mapping a letter to itself** (as you could pair only some letters and still preserve the self-inverse property). However, *the resulting simplification of the design that it permitted did*, as this simplification also meant that **all 13 pairs had to be made** in the reflector. The internal mechanism of the keys is such that that the operate a switch. When not pressed, the switch of a key connects the circuit from the encryption output to that letter’s lightbulb. When pressed, it instead connects from the battery to the start of the encryption process. (The wise among you may note that a letter cannot be both pressed and not pressed simultaneously, which is precisely the issue here.)

The simplification means that the resulting electrical pathway is always in the order: battery, depressed switch of pressed key, plugboard, rotors, reflector, rotors in reverse order, plugboard, switch of output letter, lightbulb. The fact that the switch cannot be in both positions – connecting to the battery, and connecting to the lightbulb, a design choice made with the reflector in mind, is the physical reason why a letter cannot map to itself. If pairing a letter with itself was allowed, then the circuit here would need to be redesigned.

Edit: It’s worth noting that it’s in theory this flaw could be fixed by having the switch connect both to the battery and lightbulb when pressed (using the other lit lightbulb as the encrypted letter and the pressed letter when no other bulb is lit), but even this could introduce issues such as with wire resistance.

Anonymous 0 Comments

The Enigma machine had a design rule where no letter could encrypt to itself because of the internal mechanics of the rotors and the plugboard. It actually messed with the pattern predictability, which ironically helped in codebreaking. It’s one of those quirks that was both a strength and a weakness.

Anonymous 0 Comments

The Engima machine is one giant, very complicated circuit, which “ticks” around in complicated ways. However, its one crucial flaw was in its *Umkehrwalze,* “reversing rotor,” aka “reflector” in English. This device, at the “end” of the Enigma machine, simplified the process of using the machine: it meant that (for example) if E maps to Q, then *Q also maps to E* for the same settings on the rotors. As a result of it being a complete circuit, however, it physically *couldn’t* map the same letter to itself–that would mean sending the signal back along the exact same wire, and that’s not how circuits work, you have to have a *loop,* not a single line of wire.

(The reason this simplifies the decoding process is that it means you just have to type out the enciphered message, with the right rotor settings, and you’ll instantly get the original message back out.)

The reason that this key weakness helped the UK’s Government Code & Cipher School crack the Enigma code is that it gave them a key weapon for testing any given plaintext against a given cipher text. That is, let’s say you have a guess about a phrase that might appear in the original German message. If you write out that phrase, and run it along the bottom, you can know with 100% certainty that that is NOT the message if even a *single* letter is the same in both the cipher text and your guess. With a LOT of very hard work and experts on German language and other such things, you can use this to slowly whittle down the possible combinations. GC&CS were enormously helped by also having received the original cipher work done by the Polish cryptographers, which they managed to send to the United Kingdom before Germany could stop them.

Alan Turing’s brilliant idea to help crack the settings was to use an electromechanical device, the Bombe machine (a reference to the smaller, purely-mechanical “Bomba” machines the Poles had designed for weaker versions of Enigma), which could check for errors in the chosen wheel settings at (for the time) lightning speed. A few hundred of these machines were built, both in the UK and the US, and collectively, they were able to crack *just* enough Nazi transmissions to be one step ahead.

Anonymous 0 Comments

The Enigma machine was basically just a mechanism that changed circuitry in real time with each key press. It did this by moving rotors around, and those rotors had sets of inputs that mapped to an arbitrary different set of outputs. After the rotors, it went through a reflector, which mapped every output on the last rotor back through a output, putting the whole thing in reverse.

The same wiring was used for the return path, but because it had no key press, the circuit instead turned on a light. This is the crucial piece here — they reused the same wiring for compactness and production cost reasons. Nobody realized it was such a huge flaw.

If they made enigma machines with *separate* paths for the forward path and reverse path through the rotors, they could have potentially created some paths in the reflector that mapped letters back onto themselves.

And because letters couldn’t map onto themselves, the team deciphering the messages could look for messages that fit certain patterns, and immediately discard them if they had matching letters. For example, the Germans sent out daily weather reports using a specific format with 22 specific leading characters (something like WEUBYYNULLSEQSNULLNULL for “Weather 0600”). If you were to take an arbitrary message with random characters, there’s about a 60% chance that it will have one character in common with that pattern, which lets you immediately throw away so many messages to try and run through the deciphering mechanism.