Score:2

Enigma machine rotor internal wiring question

de flag

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?

Best regards.

ming alex avatar
in flag
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.
de flag
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.
fgrieu avatar
ng flag
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.
de flag
What exactly is a "circular" permutation? Haven't heard that before.
Matthew Towers avatar
es flag
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](https://www.codesandciphers.org.uk/enigma/rotorspec.htm) 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.
Score:1
cf flag

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.

Score:1
kz flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.