Cipher Machines


CHM logo

Hagelin Ciphers

Click here to download a Powerpoint presentation, "Hagelin Cipher Machines: the world's most successful and controversial."

Arvid Gerhard Damm of Sweden was the last of the four cipher machine inventors at the end of WW1 to file for a patent on his rotor based cipher machine. His was the only rotor machine to have irregular stepping, but his machines performed erratically, so he was only able to sell some test units. Two investors were K.W. Hagelin and Emanuel Nobel (nephew of Alfred, famous for his dynamite and Prize). Hagelin had his son, Boris, join the firm in 1922 in order to protect his investment.

Boris Hagelin
Boris Hagelin

Boris Hagelin (1892-1983) was a Swedish engineer, born in Russia, who took over management of Damm's company in 1925. The Swedish army made the first large purchase in 1926 and Damm died early the following year. Hagelin bought the firm and went on to have the most successful and controversial cipher machine company in history.

Hagelin B-21
B-21 Cipher Machine

Hagelin C-35
C-35 Cipher Machine

The first cipher machine produced was the B-21, which had two rotors and two pairs of pinwheels to produce an irregular stepping action for the two rotors. This mechanism will continue to play a key role in all the future mechanical cipher machines from Hagelin's firms and also for the later derivative cipher machine from the Swedish company Transvertex. The B-21 had a light panel like the Enigma machine. In 1932 the French Army wanted a smaller version of the B-21 with printing capability, so Hagelin produced the B-211, which was successful and helped to fund further development.

In 1934 Hagelin got the idea to adapt the calculating function from a money changer into a new cipher machine. He also altered the pinwheel to make his famous pin and lug mechanism. This machine was called the C-35, the model number designating the year it was first produced. This design is a completely different cryptological technology from the earlier B model cipher machines or any of the other electro-mechanical rotor based ciphers. Instead of an electrical signal mixing the alphabet inside each rotor, the rotors mechanically select a reciprocal alphabet. This cipher has the convenience of a ribbon printer. Later, small enhancements were made for the C-36 and C-38 cipher machines.

In 1940, Hagelin took his C-38 to the US and sold his design to the US government. This machine was manufactured by the L.C. Smith-Corona Typewriter Company under license from Hagelin's firm. 140,000 M-209s were made during WW2, making Hagelin the first and possibly only millionaire from selling cipher technology.

After the war, Sweden passed laws classifying cipher machines as munitions which could not be exported. Hagelin moved his company to Zug, Switzerland in 1952. His technical director, Vigo Lindstein, along with 3 others set up a new company, AB Transvertex, to manufacture cipher machines for the Swedish military. This first cipher machine, the HC-9, also had a pin and lug mechanism but it was controlled by a punch card for ease of operations. It is curious that later Hagelin machines would be denoted with the "HC" and a number, but the HC-9 from Transvertex was the first "HC" model produced. The HC, at least in the case of the Hagelin machines, stands for "Hagelin Cipher".

In 1952 Hagelin's new company, Crypto AG, introduced the wildly popular C-52 and the CX-52, with a stronger encipherment than the previous models. The handheld CD-57 was added in 1957 for clandestine operations and was compatible with the CX-52. These machines would go on to be the most successful cipher machines ever produced, selling to 120 countries around the world. These were used for the most sensitive military, diplomatic and financial messages with complete confidence of the users based on the trust of a Swiss bank and the precision engineering of a Swiss watch.

William F. Friedman
William F. Friedman

What the users of these Hagelin machines did not know was the single greatest coup in the history of military intelligence. In 1957, William Friedman was called out of retirement by the US NSA to make a secret deal with Boris Hagelin, giving the US access into all the secret communications using the Hagelin machines. The US shared this information with England. Later, as the cipher technology advanced from mechanical devices to electronics, the new Hagelin machines installed a back door written by the NSA. Dictators and madmen, such as the Iranian Islamic regime, Saddam Hussein, Moammar Gadhafi, Ferdinand Marcos, Idi Amin, as well as friendly nations and the Vatican all had their most secret communications read instantly by Washington and London. This unfettered access would continue for decades.

This open book into the world's secrets would start to unravel in 1983. A US Naval Intelligence officer, Jonathan Pollard, acting as an Israeli spy sold this highly classified information (well above top secret) to Israel. This sensitive information was then traded to the Soviet Union in return for them allowing more Soviet Jews to emigrate to Israel. The rest of the world remained oblivious to the espionage battles over the Hagelin cipher machines and continued to use them. It turns out the Russians probably already knew this secret from two other US spies, Aldrich Ames and Robert Hanssen.

Hans Buehler
Hans Buehler

The lid was blown off this greatest of secrets in a very public way in March 1992. Hans Buehler, the top salesman for Crypto AG was arrested in Iran and charged with spying for the US and Germany, by selling cipher machines with the hidden back door. Buehler was not aware of the secret deal between Hagelin and the NSA, so he maintained his innocence and Crypto AG's integrity for 9 months. He was finally released after Crypto AG and, curiously, Siemens agreed to pay a million dollar ransom. Siemen's role in the ransom furthered speculation that Crypto AG was secretly partnered with that German company, with close ties to German intelligence.

Within weeks of his return to Switzerland, Buehler was fired by Crypto AG and was billed for his million dollar ransom. He went on to discover the truth of the secret NSA deal from previously tight-lipped employees and wrote a book about his ordeal and discoveries. Crypto AG went on to sue Buehler but settled out of court before the Crypto AG engineers could testify about their knowledge of the NSA deal. Buehler was released in January 1993 and despite claims of innocence from Crypto AG, sales plummeted. The three and a half decades of NSA access to the world's secrets came to a grinding halt as more countries understood the scope of the deception.

It was also at this time in early 1993 that strong encryption algorithms and the AT&T voice encryption product came to market. This was the backdrop to the NSA attempt to require a public back door access for all communication devices sold in the US, through a Presidential Directive mandating the use of the Clipper chip. This attempt to trample the first amendment rights of US citizens was narrowly averted at the last minute by some serendipitous developments and a flaw in the NSA designed Clipper chip.

Zug Switzerland
Zug, Switzerland
Marc Rich
Marc Rich

In the high stakes spy vs. spy world, this is not the end of the incredible Hagelin story. With Crypto AG sales and stock price in free-fall, the Swiss fugitive billionaire and Mossad agent, Marc Rich came into the picture as an angel investor. So the back door lost by the NSA was soon to be reprogrammed for Marc Rich and his Israeli contacts. This was an important deal for Rich, this billionaire jet set investor happened to live in or near Zug for the previous 20 years, a town of about 25,000 in central Switzerland and the headquarters of Crypto AG.

After the disclosure of the Hagelin/NSA deal and the Crypto AG bailout from the likes of Marc Rich, it is truly astonishing that many countries continue to this day to use Crypto AG products. Rich and Israeli intelligence have used the secrets gained from the Crypto AG back door for financial and political gain. For instance, Israel purportedly made hundreds of millions of dollars in trading United and American Airlines put options just prior to the September 11, 2001 terrorist attack.

In the hours before Clinton left office on January 20, 2001, a deal was struck granting a pardon for Rich. This pardon was controvertial for several reasons. Marc's then wife, Denise Rich, spent the night in the White House during Clinton's last night in office. She contributed a total of $1.3 million to the Democratic Party and the Clinton Library.

The deal for Rich's pardon was made by Rich's attorney and the future Chief of Staff for Vice President Dick Cheney, "Scooter" Libby. Libby would go on to be convicted of four felonies and disbarred for leaking CIA agent Valerie Plame's name, ruining her career and jeopardizing secret US operations for strictly political purposes. Plame's husband, ambassador Joe Wilson, was openly critical of the Bush administration claims of weapons of mass destruction as the reason to attack Iraq and Saddam Hussein the second time. After serving one month of a 30 month sentence, Libby's sentence was commuted by President George W. Bush. This would be a source of friction between Cheney and Bush, as Cheney wanted Libby to be pardoned. Many believe Libby took the fall for his boss, Vice President Cheney.

See the Entire Collection of Cipher Machines

Hagelin Ciphers
See detailed pictures of the Hagelin CX-52 and handheld CD-57 ciphers.

Pictured above are the Hagelin designed CX-52 and handheld CD-57 cipher machines which were the first machines introduced by Boris Hagelin after moving his company to Switzerland in 1952.