# Was the alphabet scrambled on Enigma rotors?

**URL:** <https://boards.straightdope.com/t/was-the-alphabet-scrambled-on-enigma-rotors/683125>\
**Category:** Factual Questions\
**Created:** [March 7, 2014, 4:54pm UTC](https://boards.straightdope.com/t/was-the-alphabet-scrambled-on-enigma-rotors/683125 "2014-03-07T16:54:37Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Earl\_Snake-Hips\_Tucker](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/earl_snake-hips_tucker/32/3269_2.png) [@Earl\_Snake-Hips\_Tucker](https://boards.straightdope.com/u/Earl_Snake-Hips_Tucker)\
**Post date:** [March 7, 2014, 4:54pm UTC](https://boards.straightdope.com/t/was-the-alphabet-scrambled-on-enigma-rotors/683125/1 "2014-03-07T16:54:37Z")

</div>

[This is a pretty good video on the operation of the Enigma machine](http://www.youtube.com/watch?v=G2_Q9FoD-oQ), but I think I missed one part:

He mentions that they would select three out of five possible rotors containing 26 letters. So there had to be some difference in the rotors, or else it wouldn’t matter which three were selected. How did the rotors differ while there just sitting in a box waiting to be selected?

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [March 7, 2014, 4:59pm UTC](https://boards.straightdope.com/t/was-the-alphabet-scrambled-on-enigma-rotors/683125/2 "2014-03-07T16:59:59Z")

</div>

Each rotor input could be wired to one of 26 rotor outputs. The different rotors had different arrangements of wiring inside.

---

<div class="post-metadata">

**Author:** ![Quercus](https://avatars.discourse-cdn.com/v4/letter/q/7ab992/32.png) [@Quercus](https://boards.straightdope.com/u/Quercus)\
**Post date:** [March 7, 2014, 5:14pm UTC](https://boards.straightdope.com/t/was-the-alphabet-scrambled-on-enigma-rotors/683125/3 "2014-03-07T17:14:08Z")

</div>

> [@friedo](#):
>
> Each rotor input could be wired to one of 26 rotor outputs. The different rotors had different arrangements of wiring inside.

Can’t remember the details, but was it really only 25 different possible outputs? I know that no letter could be finally encoded as itself, but not sure if this applied to individual rotors.

---

<div class="post-metadata">

**Author:** ![friedo](https://avatars.discourse-cdn.com/v4/letter/f/8edcca/32.png) [@friedo](https://boards.straightdope.com/u/friedo)\
**Post date:** [March 7, 2014, 5:20pm UTC](https://boards.straightdope.com/t/was-the-alphabet-scrambled-on-enigma-rotors/683125/4 "2014-03-07T17:20:20Z")

</div>

> [@Quercus](#):
>
> Can’t remember the details, but was it really only 25 different possible outputs? I know that no letter could be finally encoded as itself, but not sure if this applied to individual rotors.

The reason that a letter could not be encoded as itself is because the circuit path actually went back and forth through the set of three rotors. So you’d type a letter and it would go through the first, second, and third rotor, then through a “reflector” disc which IIRC did not move, and back through a different route through the third, second, and first rotor. Therefore a given input letter would necessarily appear as a different output letter on the first rotor.

[Here](http://upload.wikimedia.org/wikipedia/commons/6/6c/Enigma-action.svg) is a nice diagram from Wikipedia.

---

<div class="post-metadata">

**Author:** ![Amateur\_Barbarian](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@Amateur\_Barbarian](https://boards.straightdope.com/u/Amateur_Barbarian)\
**Post date:** [March 7, 2014, 5:44pm UTC](https://boards.straightdope.com/t/was-the-alphabet-scrambled-on-enigma-rotors/683125/5 "2014-03-07T17:44:40Z")

</div>

So Enigma is nothing more than an elaborate substitution cipher? I thought it used a more complex principle than that.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [March 7, 2014, 5:47pm UTC](https://boards.straightdope.com/t/was-the-alphabet-scrambled-on-enigma-rotors/683125/6 "2014-03-07T17:47:57Z")

</div>

> [@Amateur\_Barbarian](#):
>
> So Enigma is nothing more than an elaborate substitution cipher? I thought it used a more complex principle than that.

Yes, it’s basically a polyalphabetic substitution cipher.

---

<div class="post-metadata">

**Author:** ![Colophon](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@Colophon](https://boards.straightdope.com/u/Colophon)\
**Post date:** [March 7, 2014, 5:50pm UTC](https://boards.straightdope.com/t/was-the-alphabet-scrambled-on-enigma-rotors/683125/7 "2014-03-07T17:50:18Z")

</div>

> [@Amateur\_Barbarian](#):
>
> So Enigma is nothing more than an elaborate substitution cipher? I thought it used a more complex principle than that.

The point is, though, that the substitution code changes after each letter (as the rotor advances), which gets round the obvious flaw in substitution ciphers: letter frequency analysis.

---

<div class="post-metadata">

**Author:** ![Amateur\_Barbarian](https://avatars.discourse-cdn.com/v4/letter/a/59ef9b/32.png) [@Amateur\_Barbarian](https://boards.straightdope.com/u/Amateur_Barbarian)\
**Post date:** [March 7, 2014, 5:51pm UTC](https://boards.straightdope.com/t/was-the-alphabet-scrambled-on-enigma-rotors/683125/8 "2014-03-07T17:51:46Z")

</div>

Right. I recall the operation now.

---

<div class="post-metadata">

**Author:** ![gazpacho](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@gazpacho](https://boards.straightdope.com/u/gazpacho)\
**Post date:** [March 7, 2014, 5:53pm UTC](https://boards.straightdope.com/t/was-the-alphabet-scrambled-on-enigma-rotors/683125/9 "2014-03-07T17:53:04Z")

</div>

> [@Amateur\_Barbarian](#):
>
> So Enigma is nothing more than an elaborate substitution cipher? I thought it used a more complex principle than that.

The mapping from one letter to another letter changed each letter as the rotors advanced. So it was not really a substitution chiper.

Some good videos about the enigma machine

About how the machine works.

[![](https://img.youtube.com/vi/G2_Q9FoD-oQ/maxresdefault.jpg "158,962,555,217,826,360,000 (Enigma Machine) - Numberphile") ](https://www.youtube.com/watch?v=G2_Q9FoD-oQ)

How the flaw that a letter could not be encoded as itself enabled the allies decode enigma transmissions.

[![](https://img.youtube.com/vi/V4V2bpZlqx8/maxresdefault.jpg "Flaw in the Enigma Code - Numberphile") ](https://www.youtube.com/watch?v=V4V2bpZlqx8)

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [March 7, 2014, 5:58pm UTC](https://boards.straightdope.com/t/was-the-alphabet-scrambled-on-enigma-rotors/683125/10 "2014-03-07T17:58:59Z")

</div>

> [@gazpacho](#):
>
> The mapping from one letter to another letter changed each letter as the rotors advanced. So it was not really a substitution chiper.]

It was, just not a simplistic mono-alphabetic one. Another, much simpler, polyalphabetic substitution cipher is the Vigenere cipher, in which you choose a keyword and basically repeat it over and over and "add " the plaintext with the keyword text to get the cipher text. It’s actually not all that difficult to crack, given a long enough message (although it was considered impossible to crack for a few hundred years), even though it seems like it should be.

---

<div class="post-metadata">

**Author:** ![gazpacho](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@gazpacho](https://boards.straightdope.com/u/gazpacho)\
**Post date:** [March 7, 2014, 6:20pm UTC](https://boards.straightdope.com/t/was-the-alphabet-scrambled-on-enigma-rotors/683125/11 "2014-03-07T18:20:31Z")

</div>

> [@pulykamell](#):
>
> It was, just not a simplistic mono-alphabetic one. Another polyalphabetic substitution ciphers is the Vigenere cipher, in which you choose a keyword and basically repeat it over and over and "add " the plaintext with the keyword text to get the cipher text. It’s actually not all that difficult to crack, given a long enough message, even though it seems like it should be.

There were rotors with 26 positions so the length of the key phrase was 26_26_26 or 17576 characters before things started to repeat. So the keywords were pretty long but there were not 26^17576 possible keywords. There were 5 possible rotors that you could put into the three positions. You could choose 26 starting positions for each rotor. So I think that works out to 1054560 possible keywords.

Additionally there was a plugboard in the front that acted like a substitution cipher on top of the changing one from the rotors. This stayed constant for the message.

---

<div class="post-metadata">

**Author:** ![pulykamell](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/pulykamell/32/3166_2.png) [@pulykamell](https://boards.straightdope.com/u/pulykamell)\
**Post date:** [March 7, 2014, 6:30pm UTC](https://boards.straightdope.com/t/was-the-alphabet-scrambled-on-enigma-rotors/683125/12 "2014-03-07T18:30:23Z")

</div>

> [@gazpacho](#):
>
> There were rotors with 26 positions so the length of the key phrase was 26_26_26 or 17576 characters before things started to repeat. So the keywords were pretty long but there were not 26^17576 possible keywords. There were 5 possible rotors that you could put into the three positions. You could choose 26 starting positions for each rotor. So I think that works out to 1054560 possible keywords.
> 
> Additionally there was a plugboard in the front that acted like a substitution cipher on top of the changing one from the rotors. This stayed constant for the message.

Yes. That’s what I would call a type of polyalphabetic substitution cipher. It’s complex, yes, but it’s one for one letter substitution using a different “alphabet” for each letter.
