# How does the Enigma machine ensure that no letter is substituted for itself?

In Alan Turing: The Enigma Andrew Hodges describes how the letter encodings performed by a German Enigma machine "would always be swappings" (original emphasis). And goes on to say that

There was a practical advantage to this Enigma property. It meant that the deciphering operation was identical with the enciphering operation. (In group-theory terms, the cipher was self-inverse). ... But it was associated with a grave weakness, in that the substitutions thus performed were always of this very special kind, with the particular feature that no letter could ever be enciphered into itself.

This passage suggests that any encoding that performs swappings, and is thus self-inverse, must have the property that no letter is "enciphered into itself". However this isn't the case, is it? Isn't this only a property of "swappings" in which all letters are swapped for a different letter. That is, doesn't he mean to say that the Enigma substitutions "would always be swappings of every letter for a different one" so that the non-substitution of the same letter is enforced by the specific swappings preformed by the machine?

If so, how is the property of "non-self-substitution" achieved by the machine as a whole? I can see that at the reflector is physically constrained to have this property, but the plugboard clearly lacks it, as does at least one rotor (Rotor III substitutes N for N). And in any case, it isn't clear to me how self-substituted in guaranteed to be avoided in all possible configurations and rotor positions.

What specific properties of the components and configuration of the Enigma machine ensure that no letter is substituted for itself? Does it follow from some basic property of permutations, or is it the result of specific wiring configurations, deliberately made to avoid self-substitution?

• Why do you believe the passage suggests what you say it suggests? – whacka Mar 27 '15 at 22:31
• @whacka: "This" refers to property that whatever substitutions were performed would be swapping, but not (as written) that all letters are swapped. "Associated" is a bit less direct, but suggests that the fact that " no letter could ever be enciphered into itself" is a consequence of "this". – orome Mar 27 '15 at 22:34
• I'm not quite sure what the passage is trying to say, but it sounds like if you treat the Enigma machine as a function $f$ taking plaintext and outputting cipertext, then it is an involution - i.e. $f(f(x))=x$. This doesn't imply that $f$ has no fixed points (since the identity function is an involution, for instance) - but it could be that the Enigma machine specified so as an additional requirement. – Milo Brandt Mar 27 '15 at 22:41
• @Meelo: Correct, and, I think that highlights the question then: what properties of the Enigma (e.g. physical constraints or deliberate design) ensure that no letter is substituted for itself (i.e. that there are no fixed points). – orome Mar 27 '15 at 22:47
• I don't read that text as implying what you say it implies. Obviously, he is implying that, by a swapping, he means a complete swapping - no fixed letters. He never says any self-inverse cipher must not have a fixed point. – Thomas Andrews Mar 27 '15 at 22:50

• @raxacoricofallapatorius: I am not sure I would use must that way. It did always swap/pair different letters, but it could have been designed differently. It had $26$ keys/letters - if it had had a $27$th and a single reflection back down the incoming route, it would have been more secure. – Henry Mar 27 '15 at 23:18