3
$\begingroup$

I have a question regarding the internal wiring of the rotors of the Enigma machine.

I'm trying to understand some details about the original Enigma machine. To the best of my understanding, each rotor is nothing but a monoalphabetic substitution cipher - except that the rotors can rotate. Yeah. But the rotation is just an additional offset. The actual substitution table is encoded by the internal wiring of the rotor. And, for a specific rotor, that is completely fixed.

Now, according to Wikipedia, there were three (later five) different rotors to choose from, each one with a distinct internal wiring. We can find the substitution tables for the various different rotors (for the various Enigma models) in this article. But how have these substitution tables been chosen?

Has the internal wiring (substitution tables) of the rotors been generated according to some rules, i.e. do they need to fulfill specific requirements to ensure a "good" encryption (as good as Enigma-style encryption can be that is), or have they been chosen completely at random and one possible "randomized" wiring essentially is as good as any other? Is it known how they were chosen?

Most important: If we were to implement a "modern" Enigma machine, could we simply generate the internal wiring (substitution tables) of the rotors by using a PRNG (pseudorandom number generator) and some "key" to seed that PRNG - instead of relying on a set of pre-defined rotors?

$\endgroup$
5
  • $\begingroup$ I guess the distribution of the internal wiring of a rotor is at random, just like eight S-boxes in the DES algorithm, there are not any explainations on how to decide them. $\endgroup$
    – ming alex
    Nov 15, 2021 at 1:39
  • $\begingroup$ To the best of my knowledge, the choice of the S-boxes in DES or AES are not random at all, but instead need to have very specific properties to be resistant against differential cryptanalysis. $\endgroup$
    – toni995
    Nov 15, 2021 at 1:53
  • $\begingroup$ Some wirings of rotor would be worse than others, e.g. wirings that implement a circular permutation would commute, wirings near a circular permutation would nearly commute. At least when we consider the rotor wirings not part of the key (that is, known to cryptanalyst), it would I guess be a good idea to avoid such rotor wirings. I have no idea if that, or other rules, was applied by whoever defined the rotors. $\endgroup$
    – fgrieu
    Nov 15, 2021 at 8:01
  • 1
    $\begingroup$ What exactly is a "circular" permutation? Haven't heard that before. $\endgroup$
    – toni995
    Nov 15, 2021 at 20:16
  • $\begingroup$ if you choose a permutation uniformly at random from $S_{26}$ there's (roughly) a 64% chance it has a fixed point. The 10 examples of real wwii rotor cycle types here show only 3 with fixed points. There's about a 3% probability of getting 3 or fewer fixed points in 10 rotors if you choose uniformly at random, so this is some evidence that rotor designers didn't do that. $\endgroup$ Apr 25 at 11:34

2 Answers 2

1
$\begingroup$

I had this same question and reached out to Dan Perera the Director of the Enigma Museum and EnigmaMuseum.com

We had some back and forth and his last letter sent was this:

Yes. Enigma rotors can be wired any way a user would like. Post war, the Norwegians and others used Enigma machines with rewired rotors. Any wire scheme could be used. There are no "patterns" or "rules" or physical restrictions on how a rotor can be wired so long as the current is transferred from a contact on one side of the rotor to a contact on the other side of the rotor.

$\endgroup$
1
$\begingroup$

One other point, rotor wiring was not fixed. I'm not sure when they change the rotor, but they had ring settings. This changed the offset of the output side of the rotor. For a rotor where A translate to F at ring setting 0. Setting the ring to 2, would shift the output by two, so A will not translate to F. I have read that there was some limits, like one could only moved 5 positions, while others say that all 26 positions could be offset.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.