CovertCouncil

Tradecraft

TRADECRAFT FILE

Cipher machines

From Hebern's rotor to Enigma, Purple, Lorenz and SIGABA, the electromechanical machines that carried the secrets of the Second World War, and the codebreakers who read most of them.

Cipher machines
An Enigma K cipher machine of the Swiss Army, from the Swiss Army's cryptography collection. Rama. Wikimedia Commons, CC BY-SA 2.0 fr.

For most of history, enciphering a message meant a clerk with a codebook and a pencil. In the first half of the twentieth century that work was mechanized. Typewriter-like machines with rotating wired wheels could produce ciphers far more complex than any clerk, at the speed of typing, and many governments came to believe that their machines were beyond attack. The history of these machines is mostly the history of how that belief failed, with one important exception.

The rotor

The key invention was the rotor: a disk with electrical contacts on each face, wired internally so that a current entering at one letter left at another. With several rotors moving as each letter was typed, the substitution changed continuously. An NSA history credits the American inventor Edward Hebern, of Madera, California, with a working rotor machine by the end of 1915; similar designs were patented around 1918–19 in Germany, the Netherlands and Sweden.1,4

Hebern's machine soon attracted the US Navy's interest, but it did not hold up. The Army cryptologist William Friedman was asked to test one, and in the NSA's account deciphered "every Hebern-enciphered message sent his way." The weakness, he saw, was the regular, odometer-like stepping of the rotors.1

Enigma

The German engineer Arthur Scherbius's firm patented a rotor machine in 1918 and marketed it commercially from 1923 as Enigma.4 According to the NSA, the German Army bought several commercial models in 1925 and, after modification, adopted the machine for widespread use; the standard military version used three rotors chosen from a set of five to eight.2 The navy, air force and intelligence services followed, including the Abwehr.

Polish mathematicians, led by Marian Rejewski, first broke it in December 1932, and in July 1939 Poland gave its methods to the British and French.2,4 Building on the Polish work, the codebreakers at Bletchley Park, among them Alan Turing, read Enigma traffic on a large scale for the rest of the war; the intelligence produced was called Ultra.

For its highest-level teleprinter traffic the German Army used a different machine, the Lorenz SZ40/42, which the British called TUNNY. An experimental link opened in June 1941. Bletchley Park reconstructed the machine's logic without ever seeing one, and attacked it first with hand methods and the Robinson machines, then with the Colossus electronic computers.2,5

Purple

Japan's Foreign Ministry used a series of machines that American analysts named by color. The cipher from a new machine introduced on 20 February 1939 was called PURPLE. It was harder than its predecessor partly because it was not a rotor machine at all but used telephone-exchange stepping switches, which the Army's analysts had not expected.3 According to the NSA's later reconstruction, the break came on 20 September 1940, and the first complete solution a week later, on 27 September, the day Japan signed the Tripartite Pact with Germany and Italy.3 The resulting diplomatic intelligence was code-named Magic.

The machine that was not broken

The exception was American. In the 1930s Friedman and his assistant Frank Rowlett conceived a machine that was easy to use, simple to rekey and avoided the regular rotor motion that had doomed Hebern's design; the Army called it SIGABA and the Navy ECM II.1 When production ended after the war, some 10,060 were in the inventory. The NSA's history calls it "the most secure cipher machine of World War II": Late in the war the Allies scrutinized intercepted enemy messages and questioned prisoners for signs of compromise; they found that the Germans had exploited some lower-level American systems, but "no evidence emerged that the Germans had made any headway against SIGABA." It was replaced only gradually during the 1950s.1 (On the postwar interrogation of German codebreakers, see TICOM.)

Britain's equivalent, Typex, was an enhanced Enigma derivative used from 1937 into the late 1950s.6 American field units below division level used the Hagelin-designed M-209, a mechanical pin-wheel device that the NSA notes was built under license from the Swedish inventor Boris Hagelin.2

After the war: Crypto AG

Hagelin's company moved to Switzerland and, as Crypto AG, sold cipher machines to dozens of governments. According to press reports in 2020 based on a classified CIA history, the CIA and West Germany's BND secretly bought the company in 1970 and arranged for some of its machines to be readable by Western codebreakers.7

The one cipher system no machine of the period could match, when used correctly, was the one-time pad; its weaknesses lay elsewhere.

Sources

  1. NSA The SIGABA / ECM II Cipher Machine: "A Beautiful Idea" (Timothy J. Mucklow), National Security Agency, Center for Cryptologic History (archived by the Internet Archive) (2015).
  2. NSA German Cipher Machines of World War II, National Security Agency, Center for Cryptologic History (archived by the Internet Archive).
  3. NSA Red and Purple: A Story Retold, Cryptologic Quarterly, National Security Agency (declassified 2012; archived by the Internet Archive).
  4. Wikipedia Enigma machine, Wikipedia.
  5. Wikipedia Lorenz cipher, Wikipedia.
  6. Wikipedia Typex, Wikipedia.
  7. Wikipedia Crypto AG, Wikipedia.

Elsewhere in the files