Skip to Content

How long would it take a modern computer to break Enigma?

The Enigma Machine

The Enigma machine was an encryption device used by the German military to protect sensitive communications during World War II. It was invented in 1918 by German engineer Arthur Scherbius and patented in 1923. The Enigma machine implemented a complex electro-mechanical polyalphabetic substitution cipher to encrypt messages.

The most commonly used Enigma machines had a keyboard and display board, three rotors that implemented the substitution cipher, a plugboard that added an additional layer of encryption, and a lampboard to show the output. The rotors each had 26 electrical contacts on each side, one for each letter. The position of the rotors determined how the plaintext letter was encrypted. The rotors advanced with each keypress, constantly changing the encryption.

The plugboard allowed pairs of letters to be swapped before encryption, making the cipher even harder to break. There were 10 plugboard cables on the three-rotor Enigma and up to 13 on the four-rotor naval Enigma variant. The lampboard simply lit up each letter as it was encrypted.

Breaking Enigma

The Poles were the first to break into Enigma in the early 1930s, thanks to some weaknesses in how the Germans were using the machine. The French and British built on the Polish work through the 1930s.

At the start of WWII, breaking Enigma messages involved three main challenges:

Determining the Wiring of the Plugboard

The plugboard had up to 13 cables that swapped pairs of letters before encryption. Trying all the possible combinations would take too long to be practical. Cryptanalysts developed techniques to deduce likely plugboard settings based on analyzing probable plaintext messages.

Determining the Rotor Order and Positions

The military Enigma had 3 or 4 rotors from a set of 5 or 8. The order of the rotors and their starting positions changed daily. Cryptanalysts had to figure out that day’s settings before they could decrypt messages. They would make educated guesses based on cribs – probable plaintext snippets that could reveal the settings.

Determining the Rotor Wirings

Each rotor performed a substitution cipher determined by its internal wiring between the input and output contacts. The wirings were complex and changed with each rotor. Cryptanalysts had to determine the wirings by analyzing large numbers of messages.

Polish, British, and American codebreakers developed innovative techniques to determine the settings and break into Enigma. This included electromechanical “bombes” that rapidly tested settings.

Breaking Enigma on a Modern Computer

How long would it take a modern computer to determine the Enigma settings and decrypt messages? Here are some estimates:

Brute Force Search

A basic approach is to try all possible settings for the rotors, plugboard, and starting positions. For the standard 3-rotor Enigma with 10 plugboard cables:

– Rotors: 3 rotors chosen from 5 options = 60 combinations
– Starting positions: 26 x 26 x 26 = 17,576
– Plugboard cables: Approximately 100 billion combinations

That’s a total search space of about 10^14, or 100 trillion settings to try.

If we make some assumptions:

– Computer can test 1 billion settings per second
– Optimized brute force implementation
– No shortcuts or cryptoanalysis, just try all settings

Then it would take a modern computer about 1-2 minutes to search the entire space and find the correct settings by brute force.

This brute force approach ignores any weaknesses in how Enigma was used that cryptanalysts exploited. It also assumes modern computing power – in the 1940s the brute force approach was completely impractical.

Simulating Cryptanalysis

To better simulate how long it took codebreakers during WWII, we have to model the cryptanalytic techniques they used. Some estimates based on that:

– Determining plugboard wiring – 1-2 hours with some cribs
– Determining rotor order – 5 minutes to a few hours depending on cribs
– Determining rotor positions – 5-30 minutes with good cribs

So under ideal conditions, the full determination of the settings for a single day could take 1-3 hours given good cribs and using techniques like banana peels.

But it usually took longer in practice – more like 6-48 hours typically. Codebreakers would work on the settings for multiple days at once. And lack of cribs or unexpected settings would slow things down.

So a single message could be broken in under an hour given good cribs. But breaking daily settings without cribs could take 1-2 days in some cases.

Conclusion

A modern computer could brute force break Enigma by trying all possible settings in just minutes. But that ignores the challenges faced by WWII codebreakers.

Using the cryptanalytic techniques developed to exploit weaknesses in Enigma, breaking a day’s settings on 1940s electromechanical computers took around 6-48 hours typically. With cribs and some luck, a single message could sometimes be broken in under an hour.

But Enigma was still a formidable encryption device for much of the war, requiring extensive effort by highly skilled analysts to continue breaking it. The work done at Bletchley Park and other Allied codebreaking centers was extremely impressive given the limited technology available at the time.