Wednesday, January 26, 2011

The KL-7

This post is not about a beer.

It is about a machine, a machine that for something around two decades helped preserve the operational secrets of the United States.

This post is about a beer in as much as I brew a porter named after the KL-7.

And since porters are a cryptic, contrary, and ill defined style, what better name for a house porter than for the pinnacle of electromechanical cipher development?

Most people have heard of the German Enigma machine, that journeyman cipher machine of the various Nazi military and state agencies. The Enigma, as is pretty well known in popular culture, used a system of wheels with wires running through them to encipher messages. The wheels could rotate, and this changed the relationships among the different wired rotors. As the cipher clerk typed his message, each key press sent an electric current in through, and then back out of the "maze" of wires created by the rotors, eventually lighting a light bulb corresponding to the enciphered character. Each key press also stepped the rotors in different ways, changing the effective maze of wiring for every letter in a message.

In effect, the Enigma suffered from a very simple stepping mechanism - it was a realization of the great American cryptographer William Friedman that the complexity of the stepping (e.g. change in effective substitution as realized by the shifting rotors) was more important than the complexity of the wiring.

Anyway, I digress. This isn't about the Enigma. It is about the KL-7, and if I actually expect homebrewers to read about a cipher machine, I'd better get to the damn point.

The KL-7 was about the penultimate point of this chain of development. The American SIGABA was a marvel of mechanical complexity, and easily the best (and believed to be unbroken) cipher of the 2nd World War.

The KL-7 was the post-war follow on, using more sophisticated electronics and simpler mechanicals partially inspired by the British Typex. These machines both used a cam on the edge of the rotor that controlled the stepping. Each rotor provided two functions - a core of scrambled wiring that effected the message encryption and a notched circumferential ring that effected a complex algorithm to determine which rotors in the system stepped and which didn't.

The Typex just had each rotor's ring control the stepping of the next rotor in sequence (notch on ring = adjacent rotor steps, no notch = rotor doesn't step). The KL-7 made use of a sophisticated system that compared pairs of notch rings to determine if any particular rotor would step.

Some of this, by the way, is speculation. Much of the KL-7 remains secret. A good overview of what is know about the machine and the actual protocols for using it can be found here, on the site of the incomparable Jerry Proc. There is also an excellent conjectural simulator available as well as the "manual" (a pdf download) for that simulator that contains the best description of the concordance ideas about the actual wiring of the machine.

The KL-7 served, protecting the message traffic of the US Military and other services from sometime around the middle 1950's through the mid 1980's. By the early 1970's however, it was largely replaced by (fully) electronic devices that worked with baudot codes and teletypes. And a good thing too, since during the late 1960's the famous Walker family started selling, among other things, KL-7 key lists and rotor wirings to the Soviet Union.

The exact damage caused by this portion of the Walkers' treachery will probably be known. For most of the time they were selling details the KL-7 was working in a backup role, and it is likely that even then they didn't have access to all of the keys and rotors in use at any time (that is an element of security that the various US agencies have always had an excellent grasp of - don't use the same settings/keys/wirings in all areas at once and change all-of-the-above as often as possible). None the less, once the Walkers were found out, the last of the KL-7's went out of service, in 1983, after having put in at least two and a half decades of service - an eternity in cipher years.

And so my house porter (bringing it back around to beer) is named to commemorate this machine. Many remember it as a player in one of the most notorious spy stories of our time. But to remain secure and unbroken - save for the frailties of humans - and to embody the pinnacle of a particular arm of technology is an exceptional achievement.

So I raise a glass to you, KL-7, to the engineers who created you, to those who served with you, and to those you protected.

No comments:

Post a Comment