This is an amazing story, and I also love that one of the players in this drama is named "Bob Surprise".
The typewriter bugs marked a new level of sophistication because they were electromechanical. For the first time, the Soviets gathered information from a piece of equipment that held written plain text information. Prior to the discovery of these bugs, the U.S. believed that the Russians had only used room audio bugs with micro- phones or listening devices to eavesdrop on American embassy activities. [...]
A total of sixteen bugs were found in twelve IBM Selectric II typewriters and four IBM Selectric III typewriters. Common features were found in all sixteen typewriters: six ferromagnetic magnetizable balls were replaced with six nonferromagnetic nonmagnetizable balls with a very strong magnet in the tip; all the typewriters contained a modified comb support bar which housed the bug; all used burst transmissions at the 30, 60, or 90 MHz range via radio frequency. [...]
Each implant had a magnetometer that converted the mechanical energy of key strokes into local magnetic disturbances. The electronics package in the implant responded to these disturbances, categorized the underlying data, and transmitted the results to a nearby listening post. Data were transmitted via radio frequency. The implant was enabled by remote control. Another advantage of these bugs was easy installation. Engineers estimated that a skilled technician could install an implant in a typewriter in a half hour. The integrated circuits were very sophisticated for that time period. The circuits contained one bit core memory, an advancement that NSA engineers had never seen. [...]
In reality, the movement of the balls determined which character had been typed because each character had a unique binary movement corresponding to the balls. The magnetic energy picked up by the sensors in the bar was converted into a digital electrical signal. The signals were compressed into a four-bit frequency select word. The bug was able to store up to eight four-bit characters. When the buffer was full, a transmitter in the bar sent the information out to Soviet sensors.
There was some ambiguity in determining which characters had been typed. NSA analysts using the laws of probability were able to figure out how the Soviets probably recovered text. Other factors which made it difficult to recover text included the following: The implant could not detect characters that were typed without the ball moving. If the typist pressed space, tab shift, or backspace, these characters were invisible to the implant. Since the ball did not move or tilt when the typist pressed hyphen because it was located at the ball's home position, the bug could not read this character either.
If you enjoy this kind of thing, you should watch The Americans. It's a really fun show. There were times when I was watching Agent Carter and I forgot which show I was watching because they're basically both about the Hydra Black Widow Program, but one of them has more boning and the other has more kung fu.