Brother
Professional
- Messages
- 2,590
- Reaction score
- 533
- Points
- 113
And what role did this gadget play in the Rubicon spy operation?
Clickable: The HX-63 encryption machine is an electromechanical rotor system designed and built by Crypto AG. The machine uses nine rotors (center right) to encrypt messages. Top left is a dual ribbon printer.
I grew up in New York and dreamed of being a spy all my life. But when I graduated from college in January 1968, the Cold War and Vietnam War raged, and being a spy seemed pretty risky. So I became an electronics engineer and worked for a US Department of Defense contractor on real-time spectrum analyzers.
In 1976, while visiting the Museum of the Polish Army in Warsaw, I saw the Enigma, the famous German encryption machine from the Second World War. I was amazed. A few years later, I was lucky enough to find myself at the huge headquarters of the encryption machine developer Crypto AG (CAG), located in the Swiss commune of Steinhausen. There I became friends with a cryptographer in a fairly high position. And my friend gave me the internal history of the company, written by its founder, Boris Hagelin. It mentioned the 1963 HX-63 cipher machine.
Like the Enigma, the HX-63 was one of the electromechanical encryption machines, also called rotary ones. It was the only electromechanical rotary machine created by CAG, and it was much more complex and safer than even the famous Enigmas. It was perhaps the most advanced rotary machine ever built. I have long wanted to get one of them in my collection, but I doubted that it would ever be possible.
Fast forward to 2010. I am in a filthy basement on the third floor of a French communications base. Together with generals with two stars on their epaulets and signalmen, I enter a safe room filled with ancient military radio stations and encryption machines. Voila! I'm surprised to see the HX-63 from the CAG there, which no one noticed for decades - it was stuck on a dusty and poorly lit far shelf.
I carefully pull the 16 kg car off the shelf. On the right, it has a handle that allows the machine to work without being connected to electricity. I gently rotate the knob while typing on the mechanical keyboard. The nine rotors rotate and the embossed print wheels strike the paper belt lightly. I then immediately decided to do everything in my power to find an HX-63 that could be restored to working condition.
John Paul talks about the HX-63 encryption machine
If you didn't know anything about the HX-63 until now, don't be discouraged. Even most professional cryptographers have not heard of it. But it was also so reliable that its invention thrilled William Friedman - one of the greatest cryptanalysts, the first chief ransomware of the United States National Security Agency (NSA) in the 1950s. After reading Hagelin's 1957 patent, Friedman realized that the HX-63, then still in development, was even more reliable than the KL-7, which was used by the NSA - and then it was believed that its code could not be broken at all. During the Cold War, thousands of KL-7s were assembled for the NSA, which were then used by all US military, diplomatic and intelligence agencies from 1952 to 1968.
Friedman got excited for a good reason. The HX-63 had 10,600 possible key combinations - in modern terms, this is the equivalent of a 2,000-bit binary key. In comparison, the AES encryption standard adopted today, which is used to secure various sensitive information in government, banks and other sectors, usually uses keys of 128 or 256 bits.
At the center of the HX-63's aluminum housing is a high-precision Swiss DC motor. At the bottom left, you can see the power source, and on the left - the function switch, with which you can select the operating mode - for example, encryption or decryption.
The machine has 12 different rotors, 9 of them are used at the same time. The current is fed through one of the 41 gold-plated contacts on the side of the rotor with a smaller diameter through a wire inside the rotor, then exits through the gold-plated contact on the other side, and enters the next rotor. The gain on each successive rotor is programmed using the tuning pins that can be seen on the horizontal rotor.
It was also worrisome that CAG was privately owned and Swiss and was willing to sell its products to any government, business or individual. Friedman was in charge of the NSA to ensure that the United States always had access to sensitive encrypted communications from all governments and sources of threats. But communications using the HX-63 would not have been able to be hacked.
Friedman was friends with Hagelin. During World War II, Friedman helped Hagelin get rich by proposing changes to one of the latter's encryption machines, which allowed Hagelin to license his patents to the United States. The resulting M-209-B became a real workhorse during the war - in total, the military used about 140,000 copies of it. In the 1950s, the good relationship between Friedman and Hagelin led to certain "gentlemen's agreements" between US intelligence and a Swiss company. Hagelin agreed not to sell the safest cars to countries on the list drawn up by the Americans. In addition, US intelligence gained secret access to CAG vehicles, plans, sales reports and other data.
But in 1963, CAG began production of the HX-63, which worried Friedman even more. He convinced Hagelin not to produce these new devices, although the company spent more than 10 years on the development of the machine, and produced no more than 15 pieces, most of which were bought by the French army. However, 1963 was a very interesting year for encryption. Machine encryption was at a crossroads: it was becoming clear that the future belonged to electronic encryption. And even a great rotary machine like the HX-63 will soon be obsolete.
This was a problem for CAG, which had never built electronic encryption machines. Perhaps because of this, in 1966, the relationship between the CAG, the NSA and the CIA moved to the next level . The NSA handed over an electronic encryption system to a Swiss partner, which became the basis for the next machine from CAG, the H-460. It came out in 1970 and flopped. However, even more serious changes awaited CAG: in the same year, the CIA and German intelligence secretly bought CAG for $ 5.75 million. Also in 1970, Hagelin's son, Bo, who was engaged in sales for the Americans in the company, and the opponent of this deal, died in a car accident near Washington, DC
Although the H-460 failed, it was followed by a new model, the H-4605, which has already sold several thousand copies. It was developed with the support of the NSA. She generated random numbers using several shift registers, working on the then new CMOS technology. These numbers were not truly random and never repeated - they were pseudo-random numbers that the mathematical algorithm produced based on the original generating number ("seed").
The algorithm was invented by the NSA, so the agency could decrypt any message encrypted by the machine. In ransomware slang, this was called "backdoor". This marked the beginning of a new era for the CAG. Since then, all of its electronic machines, such as the HC-500 series, have been covertly developed at the NSA, sometimes with the help of corporate partners such as Motorola. This American-Swiss operation was named "Rubicon". Backdoors were built into all CAG cars until 2018, when the company was shut down.
William Friedman dominated American encryption for over 40 years, becoming the NSA's first chief encryption officer.
Boris Hagelin, Friedman's friend, a brilliant Swedish inventor and entrepreneur [in fact, he comes from the Russian Empire / approx. Per.], Who founded Crypto AG in Switzerland in 1952 and developed it to the largest manufacturer of encryption machines in the world.
In part, this story surfaced as a result of information leaks prior to 2018, which were the fault of CAG employees. Much has come to light as a result of journalistic research by the Washington Post and a couple of European broadcasters, Germany's Zweites Deutsches Fernsehen and Switzerland's Schweizer Radio und Fernsehen. Post article dated February 11, 2020 [ translation of the article / approx. per.] has created a storm in encryption, information security and intelligence.
All these revelations have significantly tarnished Switzerland's reputation as a reliable and cautious neutral country. They spawned civil and criminal lawsuits and investigations by the Swiss government. As a result, in May this year, the head of Swiss intelligence, Jean-Philippe Godin, resigned from his post, having disagreed with the Swiss defense minister about how to handle these revelations. Parallels to this story can be traced today - the FBI and other US agencies are trying to gain access to encrypted data from smartphones, pressuring electronics manufacturers for this.
But even before all these revelations were published, I was very much interested in the HX-63, the last of the greatest rotary machines. I could hardly believe my luck when, in 2020, after years of negotiations, I got my hands on one copy of the HX-63 for a study for the Parisian professional organization of encryption and information security specialists (Association des Réservistes du Chiffre et de la Sécurité de l'Information). This specimen was different from what I had seen ten years earlier and had not been touched by anyone since 1963. I immediately began planning the restoration of this historic car.
People have been using codes and ciphers to protect sensitive information for a couple of millennia. The first ciphers were based on manual calculations and tables. In 1467, a mechanical device appeared for the first time, which was later dubbed the "Alberti disk". Then, shortly after World War I, there was a huge breakthrough, one of the greatest in the history of encryption: Edward Hebern of the United States, Hugo Koch of the Netherlands, and Arthur Scherbius of Germany, a few months apart, independently patented electromechanical machines that used rotors to encrypt messages. This is how the era of rotary encryptors began. The Scherbius machine formed the basis of the famous "Enigma", which was used by German troops from the 1930s until the end of World War II.
To understand how a rotary machine works, let's recall the basic goal of cryptography: to replace each letter in a message, plain text, with other letters, in order to get an unreadable message - ciphertext. It is not enough to use the same substitution every time - for example, to replace every letter F with A, and every O with P. Such a mono-alphabetic cipher is too easy to break.
A simple encryption machine such as the Enigma used by German forces during World War II can have three rotors with 26 positions. Each position corresponds to a letter of the alphabet. The current enters the position from one side of the first rotor, and corresponds to one of the letters - let's say T. The current passes through the other two rotors and exits the third to the position corresponding to the other letter - let's say R. In this case, the letter T is encrypted with the letter R. The next time the operator presses a key, one or more rotors will rotate relative to each other, so the next letter will be encrypted with a completely different set of changes. Enigma added a patch panel, further complicating encryption by replacing up to 13 pairs of letters.
The rotary engine solves this problem, you guessed it right, with rotors. Let's start with a disc about the size of a hockey puck, only thinner. On both sides of the disc, 26 metal contacts evenly run along the edge according to the number of letters of the English alphabet. Inside the disk are wires that connect a pin on one side of the disk to the other pin on the other side. The disc is wired to the keyboard like a typewriter. When the user presses a letter on the keyboard, say W, the electric current flows to the W position on one side of the rotor. It passes through the wire inside the rotor and exits on the other side at a different position - for example, L. However, after this pressing, the rotor rotates one or more positions. Therefore, the next time the user presses W, the letter will no longer be encrypted as L,
Although such encryption would be more complex than simple substitution, such a single-rotor machine would be child's play for an experienced encryptor. Therefore, rotary machines use several rotors. In different versions of Enigma, from three to four were used. During operation, each rotor rotated by a different number of positions in relation to the others. One press could turn one or two rotors, or all at once. Operators made encryption more difficult by choosing from a range of rotors that could be replaced. The military versions of the Enigma had patch panels that swapped specific pairs of letters at the keyboard input and light bulb output.
The era of rotary machines ended in the 1970s with the advent of electronic and software types of encryption, although the Soviet rotary coding machine "Violet M-125" was used until the 1980s [according to information from Viki - until the 1990s / approx. per.].
The HX-63 has raised the encryption standards. For starters, she had a set of nine removable rotors. It had a "modifier", an array of 41 rotary switches, each with 41 positions - like the Enigma patchbay, it added another layer of encryption in the form of constant shuffling. The copy I got has an aluminum case, a power supply, an electric drive, a mechanical keyboard and a printer that prints on paper ribbons. It outputs the input text and either the encrypted or decrypted text at the same time. The function switch changes the operating modes between "off", "test", "encryption" and "decryption".
In encryption mode, the operator enters the plain text, and the encrypted message is displayed on paper tape. Each plaintext letter entered from the keyboard is encrypted through many substitutions in the rotors and modifier, yielding a letter of the ciphertext. In decryption mode, the process works in the opposite direction. The user enters an encrypted message, and the printer prints the original and decrypted message, letter by letter, on paper tape.
When encrypting or decrypting a message, the HX-63 prints the original and encrypted messages on tape. Blue wheels are made of absorbent foam that absorbs ink and applies it to embossed print wheels.
There are nine keys under the HX-63's nine rotors, each of which can be opened to rotate the rotors to their home position before entering a message. The initial position of the rotors is an important component of the cryptographic key.
To begin encrypting a message, you select nine rotors (out of 12) and set the rotor pins, which determine how the rotors move relative to each other. Then you insert the rotors into the machine in a specific order, from left to right, and assign each of them a specific starting position. Finally, you put 41 modifier switches in specific positions. To decrypt the message, you need to recreate all the same rotors and settings, as well as all the modifiers. All of these positions, wire locations, rotor and modifier settings, are collectively referred to as a key.
In addition to the manual grip, the HX-63 has a nickel-cadmium battery that can power the rotors and the printer without a centralized power supply. The 12 VDC power supply powers the motor and printer and also charges the battery. The high-precision 12 V motor runs continuously and turns the rotor axle through the gearbox and clutch. Pressing a button on the keyboard releases the mechanical shutter, the gears drive the machine through one cycle of operation, turning the axis that rotates the rotors and prints a symbol.
The printer has two embossed letter wheels that rotate with each press and stop at the desired letter using four solenoids and a ratchet. Mechanical encoders are powered by rotors and a keyboard, sense the position of the print wheels and stop their rotation at the desired letter. Each wheel has its own encoder. One set outputs the input text on the left side of the paper tape, the other outputs the output text on the right. After stopping the alphabet wheel, the cam releases the printing hammer, striking the tape opposite the embossed letter. Finally, the motor advances the belt, completing the cycle, and the machine is ready to enter a new letter.
When I started restoring the HX-63, I immediately understood the full scope of this task. The plastic gears and rubber parts of the machine are so worn out that any mechanical impact from the motor could simply destroy them. There are no spare parts for the car, so I had to make them myself.
After cleaning and lubricating the car, I pressed several buttons on the keyboard. I was delighted to see that all nine cipher rotors turned and the machine printed several characters on the tape. However, the letters often disappeared and became distorted. I replaced the rusted nickel-cadmium battery and re-soldered the transformer and then started to gradually increase the voltage. To my surprise, the motor, rotors, and printer worked a few clicks. But suddenly I heard the crackling of gears and pieces of broken plastic flew out of the car. The printing stopped - as did my heartbeat.
I decided to disassemble the HX-63 into modules - I took out a set of rotors, then a printer. The keyboard, power supply and controls remain in the case. Inside the printer there were four "dampers" that softened and guided the levers that stopped the wheels of the ratchets at the desired letter. The dampers shattered into pieces. The disks of foam that had smeared ink on the alphabet wheels were decomposing, and pieces of them stuck to the wheels.
I have been very lucky several times. I needed a thick rubber tube to repair broken parts. I found that the common neoprene printer hose was perfect for this. Using a drilling machine and a steel rod as a core, I cut the hose into even 10 mm pieces. However, the internals of the printer, where the dampers should be, are covered with many shafts and levers, and it was risky to remove and reinsert them. I used square nose pliers and dental instruments to slip the new dampers under the mechanism. After a skillful surgical operation lasting several hours, I was still able to install the dampers.
The HX-63 has nine rotors and uses a "reinjection" technique. Each rotor has a set of wires connecting each electrical contact on one side of the rotor to another contact on the other side. Each rotor has a unique connection scheme. When the operator presses a key on the keyboard representing one of the 26 letters, current flows through the entire set of rotors twice, once in each direction, and then through a separate set of 15 rotor contacts at least twice. The reinjection technique dramatically increases the complexity of the cipher.
The ink wheels were made from an unusual porous foam. I tried a lot of replacement materials and ended up with a heavy blue foam cylinder. Unfortunately, the surface was smooth and not porous, it did not absorb ink - so I had to go over it with coarse sandpaper.
After a couple of these tricks, I stumbled upon another problem: a jammed roll of paper tape. I put in a new roll, but did not notice that its center hole was slightly smaller. The paper got jammed, torn, and it got stuck under the alphabet wheels so that I couldn't reach it. I was stumped - but then I made a wonderful discovery. The HX-63 was supplied with thin strips of stainless steel with jagged edges, specially designed for removing jammed paper. I cleaned the car and the restoration was completed.
One of the reasons the HX-63 was so damn reliable was because of the reinjection technology that exponentially increased the security of the cipher. Usually rotors only have one location for each letter of the alphabet they encrypt. Therefore, a typical English rotor would have 26 positions. But the HX-63 rotor has 41 positions - re-injection, or re-entry, using additional circuits that go beyond the simple alphabet. The HX-63 has 15 such additional paths.
Here's how the re-injection worked on the HX-63. In encryption mode, current travels in one direction through all rotors, each of which performs a unique letter transformation. After exiting the last rotor, the contour unfolds, and goes back through the same rotor, and then through all the others in the opposite direction. But he goes back along a different path, through 15 additional tracks specially designed for this. In this case, the exact path depends not only on the location of the wires in the rotors, but also on the location of 41 modifiers. Therefore, the total number of wiring configurations is 26! x 15!, which is approximately 5.2 x 1038. And the circuitry of the conductors inside each of the nine rotors can also be reconfigured 26! ways. In addition, the rotation of the rotors is controlled by a sequence of 41 mechanical pins.
A cipher of such complexity was not only impossible to crack in the 1960s - it would still be difficult to decipher without a key today. Reinjection was first used in the NSA's KL-7. The technology was invented during World War II by Albert W. Small of the US Military Signal Intelligence Service. He applied for a secret patent in 1944 and received it finally in 1961 (number 2,984,700).
Meanwhile, in 1953, Hagelin applied for a patent for the technology he was going to use in the machine, later called the HX-63. Surprisingly, despite the fact that a patent for this technology was already pending, Hagelin's application was granted in 1957 (numbered 2,802,047). Friedman, on the other hand, worried that Hagelin would start using reinjection in his machines, because this technology was used in a large range of vital cipher machines for the United States, and because it posed a threat to the NSA's desire to eavesdrop on communications between governments and the military of different countries.
Friedman's 1977 biography, The Man Who Broke Purple by Ronald Clarke, mentions the cancellation of Project HX-63 following a series of meetings between Friedman and Hagelin. This case is described in more detail in the papers from the Friedman collection, declassified by the NSA in 2014.
After completing his career as an electronics engineer and inventor, article author John Paul is engaged in research, writing books and articles, and giving lectures on the history of technology, especially those related to encryption. In the 1970s, he began collecting vintage electronic instruments such as Tektronix oscilloscopes and Hewlett-Packard spectrum analyzers, which are visible in the photo.
The disclosure of CAG's secret deals with US intelligence led to an unpleasant scandal, but if you look at it from the other side, the Rubicon became one of the most successful operations in the history of intelligence - and also the forerunner of modern backdoor stories in technology. Today, it is not just intelligence that exploits backdoors, reads "secret" messages, and intercepts transactions. The "telemetry" feature in Windows 10 constantly monitors user activity and collects data about him. The Apple Mac does not behave any better. Malware periodically emerges to allow attackers to take control of Macs: 2016's Backdoor.MAC.Eleanor is a prime example. At the end of 2020, cybersecurity company FireEye disclosed information that malware has uncovered the back door of the SolarWinds Orion platform, which is used in the supply chain and on government servers. The SUNBURST malware was the first in a series of attacks against Orion. The extent of the damage has not yet been accurately assessed.
The HX-63 I rebuilt works almost as well as it did in 1963. I am still not tired of the sound of a motor, reminiscent of a teletypewriter, and the clacking of the keyboard. And although I never realized my teenage dream of becoming a secret agent, I admire this glimpse of a glamorous world long gone from us.
I even have a postscript. I recently learned that my contact at Crypto AG, whom I call "C", was also a security specialist in Swiss intelligence. And for many decades, serving in the highest echelons of the company, "C" was also its contact with the CIA and Swiss intelligence, and he even had a code name. So my old Swiss friend knew about all this from the very beginning!
Clickable: The HX-63 encryption machine is an electromechanical rotor system designed and built by Crypto AG. The machine uses nine rotors (center right) to encrypt messages. Top left is a dual ribbon printer.
I grew up in New York and dreamed of being a spy all my life. But when I graduated from college in January 1968, the Cold War and Vietnam War raged, and being a spy seemed pretty risky. So I became an electronics engineer and worked for a US Department of Defense contractor on real-time spectrum analyzers.
In 1976, while visiting the Museum of the Polish Army in Warsaw, I saw the Enigma, the famous German encryption machine from the Second World War. I was amazed. A few years later, I was lucky enough to find myself at the huge headquarters of the encryption machine developer Crypto AG (CAG), located in the Swiss commune of Steinhausen. There I became friends with a cryptographer in a fairly high position. And my friend gave me the internal history of the company, written by its founder, Boris Hagelin. It mentioned the 1963 HX-63 cipher machine.
Like the Enigma, the HX-63 was one of the electromechanical encryption machines, also called rotary ones. It was the only electromechanical rotary machine created by CAG, and it was much more complex and safer than even the famous Enigmas. It was perhaps the most advanced rotary machine ever built. I have long wanted to get one of them in my collection, but I doubted that it would ever be possible.
Fast forward to 2010. I am in a filthy basement on the third floor of a French communications base. Together with generals with two stars on their epaulets and signalmen, I enter a safe room filled with ancient military radio stations and encryption machines. Voila! I'm surprised to see the HX-63 from the CAG there, which no one noticed for decades - it was stuck on a dusty and poorly lit far shelf.
I carefully pull the 16 kg car off the shelf. On the right, it has a handle that allows the machine to work without being connected to electricity. I gently rotate the knob while typing on the mechanical keyboard. The nine rotors rotate and the embossed print wheels strike the paper belt lightly. I then immediately decided to do everything in my power to find an HX-63 that could be restored to working condition.
John Paul talks about the HX-63 encryption machine
If you didn't know anything about the HX-63 until now, don't be discouraged. Even most professional cryptographers have not heard of it. But it was also so reliable that its invention thrilled William Friedman - one of the greatest cryptanalysts, the first chief ransomware of the United States National Security Agency (NSA) in the 1950s. After reading Hagelin's 1957 patent, Friedman realized that the HX-63, then still in development, was even more reliable than the KL-7, which was used by the NSA - and then it was believed that its code could not be broken at all. During the Cold War, thousands of KL-7s were assembled for the NSA, which were then used by all US military, diplomatic and intelligence agencies from 1952 to 1968.
Friedman got excited for a good reason. The HX-63 had 10,600 possible key combinations - in modern terms, this is the equivalent of a 2,000-bit binary key. In comparison, the AES encryption standard adopted today, which is used to secure various sensitive information in government, banks and other sectors, usually uses keys of 128 or 256 bits.
At the center of the HX-63's aluminum housing is a high-precision Swiss DC motor. At the bottom left, you can see the power source, and on the left - the function switch, with which you can select the operating mode - for example, encryption or decryption.
The machine has 12 different rotors, 9 of them are used at the same time. The current is fed through one of the 41 gold-plated contacts on the side of the rotor with a smaller diameter through a wire inside the rotor, then exits through the gold-plated contact on the other side, and enters the next rotor. The gain on each successive rotor is programmed using the tuning pins that can be seen on the horizontal rotor.
It was also worrisome that CAG was privately owned and Swiss and was willing to sell its products to any government, business or individual. Friedman was in charge of the NSA to ensure that the United States always had access to sensitive encrypted communications from all governments and sources of threats. But communications using the HX-63 would not have been able to be hacked.
Friedman was friends with Hagelin. During World War II, Friedman helped Hagelin get rich by proposing changes to one of the latter's encryption machines, which allowed Hagelin to license his patents to the United States. The resulting M-209-B became a real workhorse during the war - in total, the military used about 140,000 copies of it. In the 1950s, the good relationship between Friedman and Hagelin led to certain "gentlemen's agreements" between US intelligence and a Swiss company. Hagelin agreed not to sell the safest cars to countries on the list drawn up by the Americans. In addition, US intelligence gained secret access to CAG vehicles, plans, sales reports and other data.
But in 1963, CAG began production of the HX-63, which worried Friedman even more. He convinced Hagelin not to produce these new devices, although the company spent more than 10 years on the development of the machine, and produced no more than 15 pieces, most of which were bought by the French army. However, 1963 was a very interesting year for encryption. Machine encryption was at a crossroads: it was becoming clear that the future belonged to electronic encryption. And even a great rotary machine like the HX-63 will soon be obsolete.
This was a problem for CAG, which had never built electronic encryption machines. Perhaps because of this, in 1966, the relationship between the CAG, the NSA and the CIA moved to the next level . The NSA handed over an electronic encryption system to a Swiss partner, which became the basis for the next machine from CAG, the H-460. It came out in 1970 and flopped. However, even more serious changes awaited CAG: in the same year, the CIA and German intelligence secretly bought CAG for $ 5.75 million. Also in 1970, Hagelin's son, Bo, who was engaged in sales for the Americans in the company, and the opponent of this deal, died in a car accident near Washington, DC
Although the H-460 failed, it was followed by a new model, the H-4605, which has already sold several thousand copies. It was developed with the support of the NSA. She generated random numbers using several shift registers, working on the then new CMOS technology. These numbers were not truly random and never repeated - they were pseudo-random numbers that the mathematical algorithm produced based on the original generating number ("seed").
The algorithm was invented by the NSA, so the agency could decrypt any message encrypted by the machine. In ransomware slang, this was called "backdoor". This marked the beginning of a new era for the CAG. Since then, all of its electronic machines, such as the HC-500 series, have been covertly developed at the NSA, sometimes with the help of corporate partners such as Motorola. This American-Swiss operation was named "Rubicon". Backdoors were built into all CAG cars until 2018, when the company was shut down.
William Friedman dominated American encryption for over 40 years, becoming the NSA's first chief encryption officer.
Boris Hagelin, Friedman's friend, a brilliant Swedish inventor and entrepreneur [in fact, he comes from the Russian Empire / approx. Per.], Who founded Crypto AG in Switzerland in 1952 and developed it to the largest manufacturer of encryption machines in the world.
In part, this story surfaced as a result of information leaks prior to 2018, which were the fault of CAG employees. Much has come to light as a result of journalistic research by the Washington Post and a couple of European broadcasters, Germany's Zweites Deutsches Fernsehen and Switzerland's Schweizer Radio und Fernsehen. Post article dated February 11, 2020 [ translation of the article / approx. per.] has created a storm in encryption, information security and intelligence.
All these revelations have significantly tarnished Switzerland's reputation as a reliable and cautious neutral country. They spawned civil and criminal lawsuits and investigations by the Swiss government. As a result, in May this year, the head of Swiss intelligence, Jean-Philippe Godin, resigned from his post, having disagreed with the Swiss defense minister about how to handle these revelations. Parallels to this story can be traced today - the FBI and other US agencies are trying to gain access to encrypted data from smartphones, pressuring electronics manufacturers for this.
But even before all these revelations were published, I was very much interested in the HX-63, the last of the greatest rotary machines. I could hardly believe my luck when, in 2020, after years of negotiations, I got my hands on one copy of the HX-63 for a study for the Parisian professional organization of encryption and information security specialists (Association des Réservistes du Chiffre et de la Sécurité de l'Information). This specimen was different from what I had seen ten years earlier and had not been touched by anyone since 1963. I immediately began planning the restoration of this historic car.
People have been using codes and ciphers to protect sensitive information for a couple of millennia. The first ciphers were based on manual calculations and tables. In 1467, a mechanical device appeared for the first time, which was later dubbed the "Alberti disk". Then, shortly after World War I, there was a huge breakthrough, one of the greatest in the history of encryption: Edward Hebern of the United States, Hugo Koch of the Netherlands, and Arthur Scherbius of Germany, a few months apart, independently patented electromechanical machines that used rotors to encrypt messages. This is how the era of rotary encryptors began. The Scherbius machine formed the basis of the famous "Enigma", which was used by German troops from the 1930s until the end of World War II.
To understand how a rotary machine works, let's recall the basic goal of cryptography: to replace each letter in a message, plain text, with other letters, in order to get an unreadable message - ciphertext. It is not enough to use the same substitution every time - for example, to replace every letter F with A, and every O with P. Such a mono-alphabetic cipher is too easy to break.
Penetrating into "Enigma" ["enigma" - a riddle / approx. per.]
A simple encryption machine such as the Enigma used by German forces during World War II can have three rotors with 26 positions. Each position corresponds to a letter of the alphabet. The current enters the position from one side of the first rotor, and corresponds to one of the letters - let's say T. The current passes through the other two rotors and exits the third to the position corresponding to the other letter - let's say R. In this case, the letter T is encrypted with the letter R. The next time the operator presses a key, one or more rotors will rotate relative to each other, so the next letter will be encrypted with a completely different set of changes. Enigma added a patch panel, further complicating encryption by replacing up to 13 pairs of letters.
The rotary engine solves this problem, you guessed it right, with rotors. Let's start with a disc about the size of a hockey puck, only thinner. On both sides of the disc, 26 metal contacts evenly run along the edge according to the number of letters of the English alphabet. Inside the disk are wires that connect a pin on one side of the disk to the other pin on the other side. The disc is wired to the keyboard like a typewriter. When the user presses a letter on the keyboard, say W, the electric current flows to the W position on one side of the rotor. It passes through the wire inside the rotor and exits on the other side at a different position - for example, L. However, after this pressing, the rotor rotates one or more positions. Therefore, the next time the user presses W, the letter will no longer be encrypted as L,
Although such encryption would be more complex than simple substitution, such a single-rotor machine would be child's play for an experienced encryptor. Therefore, rotary machines use several rotors. In different versions of Enigma, from three to four were used. During operation, each rotor rotated by a different number of positions in relation to the others. One press could turn one or two rotors, or all at once. Operators made encryption more difficult by choosing from a range of rotors that could be replaced. The military versions of the Enigma had patch panels that swapped specific pairs of letters at the keyboard input and light bulb output.
The era of rotary machines ended in the 1970s with the advent of electronic and software types of encryption, although the Soviet rotary coding machine "Violet M-125" was used until the 1980s [according to information from Viki - until the 1990s / approx. per.].
The HX-63 has raised the encryption standards. For starters, she had a set of nine removable rotors. It had a "modifier", an array of 41 rotary switches, each with 41 positions - like the Enigma patchbay, it added another layer of encryption in the form of constant shuffling. The copy I got has an aluminum case, a power supply, an electric drive, a mechanical keyboard and a printer that prints on paper ribbons. It outputs the input text and either the encrypted or decrypted text at the same time. The function switch changes the operating modes between "off", "test", "encryption" and "decryption".
In encryption mode, the operator enters the plain text, and the encrypted message is displayed on paper tape. Each plaintext letter entered from the keyboard is encrypted through many substitutions in the rotors and modifier, yielding a letter of the ciphertext. In decryption mode, the process works in the opposite direction. The user enters an encrypted message, and the printer prints the original and decrypted message, letter by letter, on paper tape.
When encrypting or decrypting a message, the HX-63 prints the original and encrypted messages on tape. Blue wheels are made of absorbent foam that absorbs ink and applies it to embossed print wheels.
There are nine keys under the HX-63's nine rotors, each of which can be opened to rotate the rotors to their home position before entering a message. The initial position of the rotors is an important component of the cryptographic key.
To begin encrypting a message, you select nine rotors (out of 12) and set the rotor pins, which determine how the rotors move relative to each other. Then you insert the rotors into the machine in a specific order, from left to right, and assign each of them a specific starting position. Finally, you put 41 modifier switches in specific positions. To decrypt the message, you need to recreate all the same rotors and settings, as well as all the modifiers. All of these positions, wire locations, rotor and modifier settings, are collectively referred to as a key.
In addition to the manual grip, the HX-63 has a nickel-cadmium battery that can power the rotors and the printer without a centralized power supply. The 12 VDC power supply powers the motor and printer and also charges the battery. The high-precision 12 V motor runs continuously and turns the rotor axle through the gearbox and clutch. Pressing a button on the keyboard releases the mechanical shutter, the gears drive the machine through one cycle of operation, turning the axis that rotates the rotors and prints a symbol.
The printer has two embossed letter wheels that rotate with each press and stop at the desired letter using four solenoids and a ratchet. Mechanical encoders are powered by rotors and a keyboard, sense the position of the print wheels and stop their rotation at the desired letter. Each wheel has its own encoder. One set outputs the input text on the left side of the paper tape, the other outputs the output text on the right. After stopping the alphabet wheel, the cam releases the printing hammer, striking the tape opposite the embossed letter. Finally, the motor advances the belt, completing the cycle, and the machine is ready to enter a new letter.
When I started restoring the HX-63, I immediately understood the full scope of this task. The plastic gears and rubber parts of the machine are so worn out that any mechanical impact from the motor could simply destroy them. There are no spare parts for the car, so I had to make them myself.
After cleaning and lubricating the car, I pressed several buttons on the keyboard. I was delighted to see that all nine cipher rotors turned and the machine printed several characters on the tape. However, the letters often disappeared and became distorted. I replaced the rusted nickel-cadmium battery and re-soldered the transformer and then started to gradually increase the voltage. To my surprise, the motor, rotors, and printer worked a few clicks. But suddenly I heard the crackling of gears and pieces of broken plastic flew out of the car. The printing stopped - as did my heartbeat.
I decided to disassemble the HX-63 into modules - I took out a set of rotors, then a printer. The keyboard, power supply and controls remain in the case. Inside the printer there were four "dampers" that softened and guided the levers that stopped the wheels of the ratchets at the desired letter. The dampers shattered into pieces. The disks of foam that had smeared ink on the alphabet wheels were decomposing, and pieces of them stuck to the wheels.
I have been very lucky several times. I needed a thick rubber tube to repair broken parts. I found that the common neoprene printer hose was perfect for this. Using a drilling machine and a steel rod as a core, I cut the hose into even 10 mm pieces. However, the internals of the printer, where the dampers should be, are covered with many shafts and levers, and it was risky to remove and reinsert them. I used square nose pliers and dental instruments to slip the new dampers under the mechanism. After a skillful surgical operation lasting several hours, I was still able to install the dampers.
Wheels within wheels: why the HX-63 is so reliable
The HX-63 has nine rotors and uses a "reinjection" technique. Each rotor has a set of wires connecting each electrical contact on one side of the rotor to another contact on the other side. Each rotor has a unique connection scheme. When the operator presses a key on the keyboard representing one of the 26 letters, current flows through the entire set of rotors twice, once in each direction, and then through a separate set of 15 rotor contacts at least twice. The reinjection technique dramatically increases the complexity of the cipher.
The ink wheels were made from an unusual porous foam. I tried a lot of replacement materials and ended up with a heavy blue foam cylinder. Unfortunately, the surface was smooth and not porous, it did not absorb ink - so I had to go over it with coarse sandpaper.
After a couple of these tricks, I stumbled upon another problem: a jammed roll of paper tape. I put in a new roll, but did not notice that its center hole was slightly smaller. The paper got jammed, torn, and it got stuck under the alphabet wheels so that I couldn't reach it. I was stumped - but then I made a wonderful discovery. The HX-63 was supplied with thin strips of stainless steel with jagged edges, specially designed for removing jammed paper. I cleaned the car and the restoration was completed.
One of the reasons the HX-63 was so damn reliable was because of the reinjection technology that exponentially increased the security of the cipher. Usually rotors only have one location for each letter of the alphabet they encrypt. Therefore, a typical English rotor would have 26 positions. But the HX-63 rotor has 41 positions - re-injection, or re-entry, using additional circuits that go beyond the simple alphabet. The HX-63 has 15 such additional paths.
Here's how the re-injection worked on the HX-63. In encryption mode, current travels in one direction through all rotors, each of which performs a unique letter transformation. After exiting the last rotor, the contour unfolds, and goes back through the same rotor, and then through all the others in the opposite direction. But he goes back along a different path, through 15 additional tracks specially designed for this. In this case, the exact path depends not only on the location of the wires in the rotors, but also on the location of 41 modifiers. Therefore, the total number of wiring configurations is 26! x 15!, which is approximately 5.2 x 1038. And the circuitry of the conductors inside each of the nine rotors can also be reconfigured 26! ways. In addition, the rotation of the rotors is controlled by a sequence of 41 mechanical pins.
A cipher of such complexity was not only impossible to crack in the 1960s - it would still be difficult to decipher without a key today. Reinjection was first used in the NSA's KL-7. The technology was invented during World War II by Albert W. Small of the US Military Signal Intelligence Service. He applied for a secret patent in 1944 and received it finally in 1961 (number 2,984,700).
Meanwhile, in 1953, Hagelin applied for a patent for the technology he was going to use in the machine, later called the HX-63. Surprisingly, despite the fact that a patent for this technology was already pending, Hagelin's application was granted in 1957 (numbered 2,802,047). Friedman, on the other hand, worried that Hagelin would start using reinjection in his machines, because this technology was used in a large range of vital cipher machines for the United States, and because it posed a threat to the NSA's desire to eavesdrop on communications between governments and the military of different countries.
Friedman's 1977 biography, The Man Who Broke Purple by Ronald Clarke, mentions the cancellation of Project HX-63 following a series of meetings between Friedman and Hagelin. This case is described in more detail in the papers from the Friedman collection, declassified by the NSA in 2014.
After completing his career as an electronics engineer and inventor, article author John Paul is engaged in research, writing books and articles, and giving lectures on the history of technology, especially those related to encryption. In the 1970s, he began collecting vintage electronic instruments such as Tektronix oscilloscopes and Hewlett-Packard spectrum analyzers, which are visible in the photo.
The disclosure of CAG's secret deals with US intelligence led to an unpleasant scandal, but if you look at it from the other side, the Rubicon became one of the most successful operations in the history of intelligence - and also the forerunner of modern backdoor stories in technology. Today, it is not just intelligence that exploits backdoors, reads "secret" messages, and intercepts transactions. The "telemetry" feature in Windows 10 constantly monitors user activity and collects data about him. The Apple Mac does not behave any better. Malware periodically emerges to allow attackers to take control of Macs: 2016's Backdoor.MAC.Eleanor is a prime example. At the end of 2020, cybersecurity company FireEye disclosed information that malware has uncovered the back door of the SolarWinds Orion platform, which is used in the supply chain and on government servers. The SUNBURST malware was the first in a series of attacks against Orion. The extent of the damage has not yet been accurately assessed.
The HX-63 I rebuilt works almost as well as it did in 1963. I am still not tired of the sound of a motor, reminiscent of a teletypewriter, and the clacking of the keyboard. And although I never realized my teenage dream of becoming a secret agent, I admire this glimpse of a glamorous world long gone from us.
I even have a postscript. I recently learned that my contact at Crypto AG, whom I call "C", was also a security specialist in Swiss intelligence. And for many decades, serving in the highest echelons of the company, "C" was also its contact with the CIA and Swiss intelligence, and he even had a code name. So my old Swiss friend knew about all this from the very beginning!
