4
$\begingroup$

The Enigma algorithm is a encryption method that was developed (I believe) by the Germans in WWII. It went a little something like this:

When a letter was typed on the keyboard of the Enigma machine, it was first sent through the first rotor, which would shift the letter according to its present setting. The new letter would then pass through the second rotor, where it would be replaced by a substitution according to the present setting of the second rotor. This new letter would in turn pass through the third rotor, again being substituted accordingly. Next, this new letter would be bounced off of a reflector, and back through the three rotors in reverse order. The trick that made Enigma so powerful for its time though, was the spinning of the rotors. As the plain text letter passed through the first rotor, the first rotor would rotate one position. The other two rotors would remain stationary until the first rotor had rotated 26 times (the number of letters in the alphabet and therefore, one full rotation). Then the second rotor would rotate one position. After the second rotor had rotated 26 times (26X26 letters, since the first rotor has to rotate 26 times for every time the second rotor rotates), the third rotor would rotate one position. The cycle would continue like this for the entire length of the message. The result was a shifting shift. In other words, an s could be encoded as a b in the first part of the message, and then as an m later in the message. This principle of the shifting rotors allowed for 26X26X26 = 17576 possible positions of the rotors.

In order for the recipient to decode the message, they would need to know the initial settings of the rotors, and then put the cipher text through the machine to find the plain text. The Germans devised a system by which all of the recipients would set their rotors to predetermined settings according to the date. Each clerk had a book detailing the settings for each day.

Although (I believe) a true Feistel involves splitting into two halves (which doesn't happen here) and where one old half == other new half after a round of encryption, could this algorithm be classified as a Feistel network?

$\endgroup$
4
  • 1
    $\begingroup$ FYI Actually it was built before the war for commercial businesses and then adopted by the army. Very cool story on how it was developed :) $\endgroup$ Oct 2, 2012 at 15:07
  • $\begingroup$ Also FYI The trick that made enigma so powerful was not the rotators changing position (since that was common of rotor machines of that time period hence the term rotor), it was the reflector that reflected the character back through the rotors. see en.wikipedia.org/wiki/Enigma_machine#Reflector The reflector also introduced a weakness into enigma. Namely that a character could never be encoded by itself. $\endgroup$ Oct 2, 2012 at 20:15
  • 1
    $\begingroup$ @Ethan Heilman: Even the Kriegsmarine's Enigma with four rotors was poor encryption without the Stecker-board. What made it powerful was adding the Stecker-board's configuration to the initial state of the machine. $\endgroup$
    – bob
    Oct 12, 2012 at 12:17
  • $\begingroup$ @bob - Yep you are correct. I had always heard that the reflector was unique to enigma (since the germans patented it) and assumed the plugboard while necessary to security was a rather common feature on rotor machines at that time. Researching this further I realize I was wrong, reflectors were quite common (for example the M-325 had a reflector) but I can find no mention of plug boards prior to the enigma (although that doesn't mean there were none). quadibloc.com/crypto/ro020404.htm $\endgroup$ Oct 12, 2012 at 20:06

3 Answers 3

14
$\begingroup$

Enigma is not a Feistel cipher. A "Feistel cipher" is a block cipher with a specific structure, namely the whole business with the two halves, the combination of one half with a (one-way) function of the other half and a reversible operation (e.g. XOR), and the swap. See the Wikipedia page which has nice schematics.

So considering Enigma as a kind of Feistel cipher is like considering a salmon as a kind of chicken: yeah, it has no beak, no feathers, no legs and no wings, but could it be a called a chicken ? Strangely enough, I tend to answer no to that. Even though both the salmon and the chicken are edible. But being edible is not sufficient to grant chickenness. Similarly, being a symmetric cipher is not sufficient to grant Feistelness.

$\endgroup$
2
  • $\begingroup$ What about something such as MD5 or the TwoFish algorithm? $\endgroup$ Oct 2, 2012 at 15:29
  • 1
    $\begingroup$ Twofish is a Feistel variant (it has a few extra elements such as word rotations, but the basic Feistel structure is there). MD5 is not even a symmetric cipher; however, it is possible to say that the core of the "compression function" in MD5 is akin to a generalized Feistel structure, albeit with the message and key swapping their roles. This kind of stretches the limits of the terminology. $\endgroup$ Oct 2, 2012 at 15:39
12
$\begingroup$

No, it's a rotor machine and more importantly, a stream cipher that operates on a character-by-character basis.

Block ciphers operate on a chunk at a time. Feistel ciphers are a way to construct block ciphers. We could talk more about Feistel ciphers or more basically block ciphers, but that's not your question.

At its most basic, Enigma is a stream cipher as opposed to a block cipher.

$\endgroup$
6
  • 1
    $\begingroup$ Every position of the wheels (plus the Stecker-board) defines a unique mono-alphabetic substitution, that has no fixed points and is self-inverse. It's applied to one letter and then one wheel moves, sometimes triggering another wheel movement as well. We then get the next monoalphabetic etc. After all wheels have gone full circle, the cipher returns to the initial state (but this never happened in practice, as messages were shorter than the cycle length). Indeed a very different structure. $\endgroup$ Oct 2, 2012 at 20:40
  • $\begingroup$ @Jon Callas: It's not really a stream cipher (although there is no perfect definition for it, the vast majority of stream ciphers produce a key stream symbols and then combine then with plaintext symbols). The Enigma rather embodies a polyalphabetic cipher with a very large period (as described by Henno Brandsma). $\endgroup$
    – bob
    Oct 12, 2012 at 12:14
  • $\begingroup$ @bob, I would disagree. Ciphers are classified as being either stream or block and I think we all agree that it's not a block cipher. Even a simple substitution cipher is a stream cipher - just not a very secure one. $\endgroup$ Oct 22, 2012 at 19:51
  • $\begingroup$ @JohnDeters: I'd be interested in your definition of a stream cipher and a block cipher then. (You might have noted the caveat in my previous comment that the view I have of a stream cipher might not be universally recognized; but at least I gave one.) $\endgroup$
    – bob
    Oct 22, 2012 at 20:01
  • 1
    $\begingroup$ Stream ciphers operate on characters, or arguably even bits in a stream. For Enigma, it's characters. Binary ones like Lorentz or RC4 can be thought to work on bits. Engima takes a character, rattles it around a path and it goes to another character map. (And the wheels ratchet one place.) Computer stream ciphers are a PRNG that is XORed onto the plaintext to yield ciphertext. Block ciphers take a binary block and the key giving another block. That's it. We use chaining modes to encrypt more than one block, but it works on blocks. It is a mapping of input blocks of bits to output blocks. $\endgroup$
    – Jon Callas
    Oct 24, 2012 at 1:01
-2
$\begingroup$

It seems to me the Enigma could have been made a Good Deal more Secure (if not unbreakable) by a few basic modifications.

  • They could have used irrational numbers (eg Pi-although nobody should even THINK of using That one-Too Obvious) for the changing of the wheels.

  • Or-they could have used public key encryption based on prime factoring for the initial positioning of the rotors.

  • Heck-they could even have used a Block Cipher Stecker Board, with words instead of letters (although that would have been Cumbersome.)
$\endgroup$
1
  • 2
    $\begingroup$ How does this answer the question if Enigma could be classified as a Feistel network? Note that the question wasn not about the security of Enigma — we've got other Q&As already covering the security part and this question definitely isn't one of them. $\endgroup$
    – e-sushi
    May 24, 2017 at 15:12

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.