OUR EXPERT
Mike Bedford
was predated by the Enigma by quite some time, unlike several of the machines we’ve emulated, so seeing it in operation through emulation was quite an eye-opener.
OUR EXPERT
Mike Bedford was predated by the Enigma by quite some time, unlike several of the machines we’ve emulated, so seeing it in operation through emulation was quite an eye-opener.
The concept of the key length of a cryptographic system is familiar. A 128-bit key T is commonly used today in a symmetrical cipher, because it’s considered that a brute force attack – trying out all possible keys – is not feasible. Given that there are two to the power of 128 possible keys– that’s 340,282,366,920,938,463,463,374,607, 431,768,211,456 – this seems quite likely. Indeed, it’s been said that if every person on Earth had a computer capable of checking a billion keys per second, all those machines working together would take billions of years to crack a message encrypted with a 128-bit cipher.
And so we come to the Enigma machine, the electromechanical contrivance used for encrypting and decrypting German military communications during WW2. We’ll look at how the number was derived later, but for now let’s say that the key length was around 77 bits. Admittedly, that gives 2,251,799,813,685,248 (around 2.25e+15) times fewer keys than today’s 128-bit ciphers, but we mustn’t forget that computing equipment was almost non-existent in the 1940s. And to illustrate how keys substantially shorter than today’s norm were previously adequate, a 56-bit key length was considered secure throughout the ’70s. We might be tempted to assume, therefore, that Enigma would have been uncrackable in its heyday.
An Enigma machine with its top cover opened, as necessary to swap the rotors.
CREDIT: Alessandro Nassiri, CC BY-SA 4.0,
https://it.m.wikipedia.org/wiki/
However, this ignores one very important fact. The security of a cipher doesn’t depend only on its key length. To give a trivial example, let’s think about the mono substitution cipher in which each letter of the alphabet is transformed into another. The number of possible keys is 26 factorial, which equates to about 4.0e+26, or around 88 bits. However, given a moderately long encrypted message, with a bit of patience you could decipher it by hand. The secret is that some letters are found in the English language more commonly than others. So, for example, knowing that E and T are the most commonly encountered, that TH is by far the most common two-letter pair, and various other statistics, messages could be cracked in a reasonable timescale, even without computing assistance. As we’re about to see, Enigma eliminated this massive weakness of the mono substitution cipher by changing the mapping between an unencrypted letter and the encrypted version after every letter. And the mapping only repeated every 16,900 letters.