Siemens and Halske T52

The Siemens & Halske T52, also known as the Geheimfernschreiber ("secret teleprinter"), or Schlüsselfernschreibmaschine (SFM), was a World War II German cipher machine and teleprinter produced by the electrical engineering firm Siemens & Halske. The instrument and its traffic were codenamed Sturgeon by British cryptanalysts.

While the Enigma machine was generally used by field units, the T52 was an online machine used by Luftwaffe and German Navy units, which could support the heavy machine, teletypewriter and attendant fixed circuits. It fulfilled a similar role to the Lorenz cipher machines in the German Army.

The British cryptanalysts of Bletchley Park codenamed the German teleprinter ciphers Fish, with individual cipher-systems being given further codenames: just as the T52 was called Sturgeon, the Lorenz machine was codenamed Tunny.

Operation
The teleprinters of the day emitted each character as five parallel bits on five lines, typically encoded in the Baudot code or something similar. The T52 had ten pinwheels, which were stepped in a complex nonlinear way, based in later models on their positions from various delays in the past, but in such a way that they could never stall. Each of the five plaintext bits was then XORed with the XOR sum of 3 taps from the pinwheels, and then cyclically adjacent pairs of plaintext bits were swapped or not, according to XOR sums of three (different) output bits. The numbers of pins on all the wheels were coprime, and the triplets of bits that controlled each XOR or swap were selectable through a plugboard.

This produced a much more complex cipher than the Lorenz machine, and also means that the T52 is not just a pseudorandom number generator-and-XOR cipher. For example, if a cipher clerk erred and sent two different messages using exactly the same settings &mdash; a depth of two in Bletchley jargon &mdash; this could be detected statistically but was not immediately and trivially solvable as it would be with the Lorenz.

Models
Siemens produced several and mostly incompatible versions of the T52: the T52a and T52b, which differed only in their electrical noise suppression, and the T52c, T52d and T52e. While the T52a/b and T52c were cryptologically weak, the last two were more advanced devices; the movement of the wheels was intermittent, the decision on whether or not to advance them being controlled by logic circuits which took as input data from the wheels themselves.

In addition, a number of conceptual flaws, including very subtle ones, had been eliminated. One such flaw was the ability to reset the keystream to a fixed point, which led to key reuse by undisciplined machine operators.

Cryptanalysis
Following the occupation of Denmark and Norway the Germans started to use a teleprinter circuit which ran through Sweden. The Swedes immediately tapped the line, in May 1940, and the mathematician and cryptographer Arne Beurling cracked the two earliest models in two weeks, using just pen and paper. The telephone company Ericsson manufactured a number of T52 analogue machines that could decode the messages once the key settings had been found by hand. The Swedes then read traffic in the system for three years, not only between Berlin and Oslo, but also between Germany and the German forces in Finland, and of course the German embassy in Stockholm. In total, the Swedes intercepted 500,000 German messages and decrypted 350,000. However, poor security meant the Germans eventually became aware of this. An improvement in T52 security in 1942 was defeated by the Swedes. However, a second upgrade in mid-1943 was not, and the flow of decrypted messages came to an end.

The British at Bletchley Park later also broke into Sturgeon, although they did not break it as regularly as they broke Enigma or Tunny. This was partly because the T52 was by far the most complex cipher of the three, but also because the Luftwaffe very often retransmitted Sturgeon messages using easier-to-attack (or already broken) ciphers; thus, attacking Sturgeon was not the most economical way to get the plaintext.

The British first detected T52 traffic in summer and autumn of 1942. One link was between Sicily and Libya, codenamed "Sturgeon", and another from the Aegean to Sicily, codenamed "Mackerel". Operators of both links were in the habit of enciphering several messages with the same machine settings, producing large numbers of depths. These depths were analysed by Michael Crum.