Lably
Skip to content

Cryptanalysis of the Lorenz cipher

Aspect of WWII Allied intelligence gathering

  • 30 min read
  • 11 chapters

Related on Lably

Through World War II and Character (computing)

For its high-level secret messages, the German armed services enciphered each character using various online Geheimschreiber (secret writer) stream cipher machines at both ends of a telegraph link using the 5-bit International Telegraphy Alphabet No. 2 (ITA2). These machines were subsequently discovered to be the Lorenz SZ (SZ for Schlüssel-Zusatz, meaning "cipher attachment") for the army, the Siemens and Halske T52 for the air force and the Siemens T43, which was little used and never broken by the Allies.

Bletchley Park decrypts of messages enciphered with the Enigma machines revealed that the Germans called one of their wireless teleprinter transmission systems "Sägefisch" (sawfish), which led British cryptographers to refer to encrypted German radiotelegraphic traffic as "Fish". "Tunny" (tunafish) was the name given to the first non-Morse link, and it was subsequently used for the cipher machines and their traffic.

As with the entirely separate cryptanalysis of the Enigma, it was German operational shortcomings that allowed the initial diagnosis of the system, and a way into decryption. Unlike Enigma, no physical machine reached allied hands until the very end of the war in Europe, long after wholesale decryption had been established. The problems of decrypting Tunny messages led to the development of "Colossus", the world's first electronic, programmable digital computer, ten of which were in use by the end of the war, by which time some 90% of selected Tunny messages were being decrypted at Bletchley Park.

Albert W. Small, a cryptanalyst from the US Army Signal Corps who was seconded to Bletchley Park and worked on Tunny, said in his December 1944 report back to Arlington Hall that:

Daily solutions of Fish messages at GC&CS reflect a background of British mathematical genius, superb engineering ability, and solid common sense. Each of these has been a necessary factor. Each could have been overemphasised or underemphasised to the detriment of the solutions; a remarkable fact is that the fusion of the elements has been apparently in perfect proportion. The result is an outstanding contribution to cryptanalytic science.

German Tunny machines

The Lorenz SZ cipher attachments implemented a Vernam stream cipher (using the exclusive or (XOR) function) to encrypt the plaintext bits by combining them with the key bits to produce the ciphertext at the transmitting end. At the receiving end, an identically configured machine produced the same key stream which was combined with the ciphertext to produce the plaintext, i.e. the system implemented a symmetric-key algorithm.

The key stream was generated by a complex array of twelve wheels, ten of which delivered what should have been a cryptographically secure pseudorandom number stream. This stream was a product of XOR-ing the bits of the 5-bit character generated by the right hand five wheels (the chi (χ) wheels) with the bits from the left hand five (the psi (ψ) wheels). The chi wheels always moved on one position for every incoming plaintext or ciphertext character, but the psi wheels' movement was determined by the central two mu (μ) or "motor" wheels.

The μ61 wheel moved on after each character and its cams determined the μ37 wheel movement, whose cams in turn controlled the psi wheels' movement. On all but the earliest machines, there was an additional factor that played into the moving on or not of the psi wheels. These were of four different types and were called "Limitations" at Bletchley Park. All involved some aspect of the previous positions of the machine's wheels.

The numbers of cams on the set of twelve wheels of the SZ42 machines totalled 501 and were co-prime with each other, giving an extremely long period before the key sequence repeated. Each cam could either be in a raised position, in which case it generated x (as written at Bletchley Park) and equivalent to a binary digit 1 to the logic of the system, or in the lowered position when it generated • equivalent to a binary digit 0. The total possible number of patterns of raised cams was 2501 which is an astronomically large number. In practice about half of the cams on each wheel were in the raised position as the Germans realized that otherwise there would be runs of x's and •'s, a cryptographic weakness.

The process of working out the wheel cam patterns was called "wheel breaking" at Bletchley Park. Deriving the start positions of the wheels for a particular transmission was termed "wheel setting" or simply "setting". The fact that the psi wheels all moved together, but not with every input character, was a major weakness of the machines that contributed to British cryptanalytical success.

Sign in to keep reading

10 more chapters are free with a Lably account.

More in Computing and communication