Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Regarding the German Enigma machines, if I recall correctly, the reason they were defeated was because the Allies were able to generate a massive database of possible rotor settings, and because the day key was encoded twice in the beginning of each message.

Given that computers of today can simulate an Enigma-ish machine with an arbitrary number and complexity of rotors (for example, a rotor that only shows up every tenth character, or one that goes forward a different number each time), transmission errors are low, and binary data (not plain-text, but gzipped or base64'ed text) tends to beat frequency analysis, would it be possible to use an Enigma style cipher to encrypt data today, or would it be susceptible to similar pitfalls as the original Enigma cipher?

As a more general question, can other older ciphers be "re-invented" for computers and be viable in today's world?

share|improve this question
Operational errors played a large part in breaking the enigma. – Roland Smith May 4 '13 at 13:05
up vote 14 down vote accepted

Yes, if you are willing to throw enough resources at it. Only the most fatally flawed schemes cannot be rescued (in practical terms) given enough additional computation. Since you are even willing to enhance the rotor complexity, you could actually use it to implement a modern algorithm exactly. The ability for a rotor to advance "forward a different number each time" makes it sound like quite a programmable architecture.

But why would you want to? (other than it being a cool project of course) What you would end up with would certainly be many times less efficient than a modern cipher running on modern hardware. Additionally, an attacker who was able to develop custom hardware (FPGAs or ASICs) would likely have access to a far more efficient implementation than the defender.

share|improve this answer

Your recall isn't entirely inaccurate, although it's not completely right. The Allies were able to generate a given day's settings because they both knew the methods used to compose the messages had pitfalls and, generally, there were flaws in the composition of messages themselves; mistakes (known at Bletchley Park as Cillies) were pounced on and used as the lever to prise open the lid. Messages were generally composed according to strict recipes - callsigns, often preceded by known setups, frequent redistribution of the same plaintext but on different days (e.g. "weather - all clear"), accidental transmission with old key, immediately resent with the new one, etc.

The codebreakers have all admitted that had the Axis users deployed Enigma with perfect usage patterns, they would never have broken it or, given that they knew some problems with the algorithm, e.g. Enigmas never encoded a letter to itself, it wouldn't have happened so frequently.

So the combinations available from even the basic 3-rotor or the naval 4-rotor (Shark) were quite large and they'd still be large enough to be hard to crack these days. Especially if your foe doesn't know how you're encoding your transmissions - Enigma's frequency distribution was pretty solid.

share|improve this answer

In a 1993 paper Ross Anderson proposed "A Modern Rotor Machine" that improves on the Enigma by utilizing a LFSR to produce random stepping. He believed it would resist all known attacks.

share|improve this answer

You ask:

As a more general question, can other older ciphers be "re-invented" for computers and be viable in today's world?

Yes, some can. Consider a Vigenère cipher where the key is as long as the plaintext, is generated using a TRNG and is only used once. That is a One Time Pad, and is very secure, though its viability will be as restricted as that of a OTP.

A more useful alternative might be to generate the Vigenère key using a modern stream cipher/PRNG engine to produce a keystream as long as the plaintext. For non-text data, the Vigenère grid could be expanded to a byte-based 256 x 256 grid.

share|improve this answer

An enigma machine is kind of like a physical-world one-time-pad -- the minutiae of the algorithm's physical construction are part of the algorithm itself, so the idea behind a system like that would be that Carol's knowledge of the algorithm in the abstract would not necessarily break the system for Alice and Bob -- Carol needs to get her hands the object itself to encypher and decypher.

That is a literal answer, I know; someone doubtlessly will fault my simplistic explanation w/r/t the actual Enigma cryptosystems' history.

(In some ways, the best cryptosystems are still like this: a bank's crypto standards and protocols are ideally robust enough that the nature of the implementation has to be kept secret... but the fact that you may have the key doesn't mean you can set your own balance arbitrarily -- for that you'd need a gigantic Flourinert-filled massive bank of vector units, or a tunnel-boring machine, or what have you.)

share|improve this answer
I don't think this is correct. The Enigma is keyed: that means its output depends upon the key. If the cryptanalyst steals an Enigma machine from Alice, then the thing that prevents the cryptanalyst from breaking Bob's traffic is lack of knowledge of the secret key Bob is using. It has nothing to do with the physical minutiae of Bob's machine. Every user gets an identical copy of the same machine; what differs is the secret key. – D.W. Aug 14 '11 at 2:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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