# What was the key length of the Enigma? [closed]

When I type in any plaintext to an Enigma machine (Enigma machine emulator) the substitution does not seem to follow any pattern. In other words, there is no cycle in the use of enciphering alphabets (defined as the number of switches done when turning a plaintext letter to a ciphertext letter - which can vary from 0 to 26).

But since the key is the alignment of the rotors, there must be a finite key length even though it probably is longer than any plaintext ever would be. I imagine if you keep writing long enough, the rotors will eventually align in a way they already were. If I'm right - how long is the key?

And if the key is much longer than any plaintext, wouldn't that mean the Enimga is a one-time pad? From what I can read, the OTP is defined as an algorithm with a key longer than the plaintext. Is this wrong?

• Are you asking about: A) the key length of Enigma? The key length (measured in bits) is the base-2 logarithm of the number of settings. Therefore the question reduces to counting the number of settings, which is asked and answered there, then taking a base-2 logarithm, which leads to about 67.1 bits for the Enigma M3 and the basic setup procedure. Or B) after how many encrypted letters the Enigma returns to its initial state, which is a different question?
– fgrieu
Mar 11, 2020 at 14:45
• @Kristian Francisco Milla Niels The OTP must have a key that is at least as long as the plaintext. It might be much longer than the plaintext. Mar 11, 2020 at 15:13
• If I'm not mistaken the Enigma never encrypts a character onto itself. That means it directly leaks data (even if that's not anywhere near the plaintext message), and therefore it cannot be an OTP. Just having a long key doesn't make an OTP, it depends on the scheme. Mar 14, 2020 at 21:37

Enigma works with the idea of one time pad, it's a machine that automates key generation. In the one time pad, we have to generate a random key with the same length as plaintext but in Engima we make few setups, and the machine creates a that random key.

## Here is the enigma procedure

1. A day key has the form
• Plugboard setting: A/L–P/R–T/D–B/W–K/F–O/Y
• Scrambler arrangement: 2-3-1
• Scrambler starting position: Q-C-W
1. Sender and receiver set up the machine the same way for each message
2. Use of message key: a new scrambler starting position, e.g., PGH
• first, encrypt and send the message key, then set the machine to the new position and encrypt the message
• initially, the message key is encrypted twice 