CNET también está disponible en español.

Ir a español

Don't show this again


Enigma: Up close with a Nazi cipher machine

It wasn't a computer, but it created encryption so advanced that humans needed machines to crack the code. CNET takes a look inside.

Mark Baldwin demonstrates the Enigma cipher machine, which he says "just changes one letter into another." The way it does that is much more complicated than you might imagine.

Mark Baldwin demonstrates the Enigma cipher machine, which he says "just changes one letter into another." The way it does that is much more complicated than you might imagine.

James Martin/CNET

A black metal mechanical device resembling a typewriter sits in a wooden box. It could be just an oddity in an antique store. It's the black elliptical logo engraved in the wood that sets it apart. 

"Enigma," it reads.

That marks it as a Nazi cipher machine, used in World War II to encrypt messages sent over radio waves by the German military. It was then cutting-edge, creating one of the world's strongest encryption keys. That gave Germany's lethal U-boats the power to communicate with each other about attacks on merchant ships, which devastated the UK throughout the war, taking thousands of lives and cutting off vital supplies and troops en route from North America. 

The power of this machine prompted the Allied forces to launch an effort that used machines, mathematicians sworn to secrecy and some Naval derring-do to crack the code and read Germany's messages.

It isn't even a computer. As Enigma expert Mark Baldwin demonstrated on Wednesday to a crowd of employees at CBS Interactive, CNET's parent company, "it just changes one letter into another."

If you press one key on the stripped-down keyboard, a different letter lights up in the lamp board, an array of light-up letters arranged just above the keyboard. Users would type their messages into the machine and write down each replacement letter as it lit up. Then they would tap out the encrypted message in Morse code over the radio, sure in the knowledge that only someone with their own Enigma machine with the same exact settings could decipher it.

Looking at the machine, it's hard to believe it confounded some of the world's best technical experts, who spent years at places like the UK's secret code-breaking compound at Bletchley Park working on ways to crack it.

"It does look rather old-fashioned, does it not, enclosed as it is in an oak case?" Baldwin said.

In fact, the Enigma is even older than World War II. One hundred years ago this week, Baldwin told us, German inventor Arthur Scherbius took out a patent for the Enigma machine. Designed to obscure messages sent over wireless, Scherbius tried, more or less unsuccessfully, to sell the machines to businesses and anyone else who might have a need for it until he died in an accident in 1929.

At that point, the company "is just swallowed up by the German government," Baldwin said, because it needed the technology to help hide its efforts to rearm its military in potential violation of the Treaty of Versailles.

Mechanical complexity

Don't be fooled by Baldwin's understated description of the Enigma's function. Take a hint from his orange tie, which is decorated with schematics of an Enigma's workings. The machine's innards created an exponentially eye-popping number of possible solutions to a given cipher. The number of solutions would take a whole paragraph to write out fully but can be expressed as about 3.3 x 10^114. That's more than the total estimated number of atoms in the observable universe, Baldwin points out.

Here's the full number of possible solutions to a 3-rotor Enigma cipher. The short version is 3.3 x 10^114.

Laura Hautala / CNET

Enigma enthusiast Ralph Simpson told me last year that if you gave 100,000 operators each their own Enigma machine, and they spent 24 hours a day, seven days a week testing a new setting every second, "it would take twice the age of the universe to break the code" by hand. And oh yeah, Baldwin reminded us, the Nazis changed the settings on the Enigma every night. Also, different divisions of the German military each used their own settings, creating around 30 different Enigma ciphers every day.

For potential code breakers, "It's not 'Break Enigma once at Bletchley and read everything'," Baldwin said. "It's a battle which you have to enter every night of the war."

A photograph of Bletchley Park, a mansion with large grounds purchased by the British Government to house its codebreaking operation during WWII. The house is made mostly of red brick and combines several architectural styles.

Bletchley Park, a mansion with large grounds purchased by the British Government to house its codebreaking operation during WWII.

Geoffrey Morrison

The Enigma accomplishes its complexity with three rotors and a plug board. When you press the letter P on the keyboard, for example, an electrical current passes through the three rotors, each containing a jumble of 26 wires, and then back again to the lamp board, where the letter J might light up. If you press P again, the first rotor will turn, rearranging the wires so that the electrical path from the letter P on the keyboard now causes a new letter, such as F, to light up. 

Having three rotors, all of which can rotate, means that if the user pressed P over and over again, the machine would put out a random string of letters that wouldn't repeat itself for more than 19,500 keystrokes. When the German Navy added a fourth rotor to its U-boat Enigma machines in 1941, that increased to nearly 457,000 keystrokes.

Then there's the plug board, located on the front of the Enigma as the operator looked at it. This introduced even more randomness to the machine and took care of a logistical problem for the Germans. A given Enigma rotor was wired in one of only eight configurations, even though 403 septillion (or million billion billion) configurations were possible. Rewiring the rotors in the field was more than the German military could ask of its rank and file, Baldwin said. So the plug board let them change the output of the rotor for specific letters, essentially rewiring the rotors from the outside.

Hacking the cipher

To crack a cipher machine that complex without computers, Polish, British and American mathematicians came up with their own machines to simulate the Enigma and run through possible solutions much faster than a human could. These were the Bombes, developed first in the UK's Bletchley Park based on the Polish "Bomba," an early effort to crack the Enigma. They were then made faster and more powerful at a facility in Dayton, Ohio.

Photograph of a U.S. Navy cryptanalytic bombe, the size of about three large refrigerators side by side, in a glass case. The machines "worked primarily against the German Navy's four-rotor Enigmas.

This is a US Navy cryptanalytic bombe. The machines worked primarily against the German Navy's four-rotor Enigmas.

Daniel Terdiman/CNET

And repeatedly, with some interruptions and false starts, the Allied forces did break Enigma codes. Germans didn't expect this to be possible, perhaps because they had too much faith in the number of possible solutions to a given Enigma cipher. "They were blinded by this large number," Baldwin said.

Alan Turing, the UK code breaker who's become one of the most well-known contributors to the efforts at Bletchley, was one of the chief architects of the British Bombe. An eccentric thinker and skilled mathematician, he later turned his talents to the development of early computers, at Manchester University. 

Like the work of everyone at Bletchley, Turing's participation remained secret until after his death, and documents created by the code breakers were destroyed. But notes, recently discovered in the walls of the uninsulated huts the code breakers worked in, shed some light on their process. This included a Banbury Sheet used to figure out an Enigma machine's settings.

News that the UK and US could reliably break Enigma codes didn't become widely known until the 1970s. The first book that revealed the Bombe in English, "The Ultra Secret," was published by F. W. Winterbotham in 1974. In its review, the New York Times said the book "reveals the greatest secret of World War II after the atom bomb." The following year the British government began declassifying information about the project, Baldwin said.

Still not a computer

After his presentation, I pressed Baldwin on his insistence that the Enigma and the Bombe weren't computers, or even proto-computers. Despite his obvious appreciation for the machines, he repeated that they were single-purpose, electromechanical devices. And even though it was an innovative solution to cracking ciphers, the Bombe was simply several Enigmas running at once.

"It can't even add two to two," he said.

Well, then, what's even the point?

Blockchain Decoded:  CNET looks at the tech powering bitcoin -- and soon, too, a myriad of services that will change your life.

'Alexa, be more human': Inside Amazon's effort to make its voice assistant smarter, chattier and more like you.