What was the Lorenz SZ?
The Lorenz SZ40, SZ42A and SZ42B were a range of teleprinter cipher attachments developed by C. Lorenz AG in Berlin during World War II, the first being made in 1940 (hence the name). SZ stands for the German “Schlüssel-Zusatz”, meaning cipher attachment.
The Enigma cipher machine was portable enough for front-line troops, but enciphering a long message took time, and it needed at least two operators at each end of the link: one to encipher the message one letter at a time and another to send it in Morse code. The German High Command needed something faster and even more secure to send messages directly between Berlin and the generals at the front, and this is what Lorenz built.
Dr James Grime introduces the Lorenz.
Rare footage of a Lorenz SZ42 running at the Heinz Nixdorf Computer Museum in Paderborn, Germany, during the Cipher Event in 2007, when a message was sent for the rebuilt Colossus at The National Museum of Computing to break.
To understand what the Lorenz machine did, we first need to understand how a teleprinter works.
Teleprinters and the Baudot code
The teleprinter was already in use before the war. It used the Baudot code (also called the Baudot–Murray code), invented by Émile Baudot in 1870 and altered by Donald Murray in 1901 for use with teleprinters. This was a way of sending electrical impulses to represent the letters of the alphabet. Each letter is represented by a 5-bit code of impulses or their absence. The signal can be punched onto paper tape as a pattern of holes and no-holes. At Bletchley Park they recorded these impulses as either an x for a hole or a • for no hole.
This gave 32 symbols, which is not enough for the alphabet and numbers together, so there were a number of control codes. Two special control codes switched between letter and figure modes, so depending on the last control code sent, the signal x•••• could be either E or 3.
The Vernam cipher
In 1918, Gilbert Vernam in America invented a way of encoding teleprinter information by adding a random string of letters to the text using modulo-2 addition (the same as XOR). Adding the same set of letters a second time returns the cipher string to its original form.
To add two characters in modulo-2, take each of the 5 impulses for that character and use these rules: if the symbols are the same, the result is •; if they are different, the result is x.
| x | + x | = | • |
| • | + • | = | • |
| x | + • | = | x |
| • | + x | = | x |
For example, enciphering the letter C with the key M gives the result L:
| Letter | Impulses | ||||
|---|---|---|---|---|---|
| C | • | x | x | x | • |
| M | • | • | x | x | x |
| L | • | x | • | • | x |
The clever part is that the method is reciprocal: if you take the resulting cipher text and add the key back, you get the original plain text letter again.
| Letter | Impulses | ||||
|---|---|---|---|---|---|
| L | • | x | • | • | x |
| M | • | • | x | x | x |
| C | • | x | x | x | • |
Vernam proposed having pre-prepared random strings of characters, each used once and discarded as the message was encoded. The receiving party would have the same set of characters, and adding them to the enciphered message would give back the original plain text. Used correctly in this way (a one-time pad system), the message would be unbreakable.
The Lorenz method
Lorenz decided to use the Vernam method to encode their teleprinter signals. But, especially in wartime, making sure each end of the link had the same set of random tapes would have been practically impossible. So they built a machine that generated a random sequence of characters and added it to the message being sent. As long as the receiving end had a similar machine set to the same start point, the same characters would be added to the message, revealing it.
Each obscuring character was generated by a set of five rotating wheels, each adding a • or x to one of the 5 impulses. Each letter of plain text entered moved the five wheels on by one position, changing the next obscuring character.
To make sure the generated string of characters did not repeat too often, there were two sets of wheels, so in effect two separate letters were added to each letter of plain text to get the final cipher character. Finally, to mix things up even more, two motor wheels were added which changed how often the second set of wheels turned.
At Bletchley Park, one set of 5 wheels was called the Chi (χ) wheels, which all moved together for each character. The other set was called the Psi (ψ) wheels, which moved in a staggered way depending on the two motor (Mu, μ) wheels. One motor wheel turned with each character (like the Chi wheels), the second moved only when the first had an x, and the result of this told the Psi wheels when to turn.
This means the number of ways of setting the wheels, without even touching the pins, is the product of the number of positions on all the wheels: 43 × 47 × 51 × 53 × 59 × 37 × 61 × 41 × 31 × 29 × 26 × 23 = 1.6034 × 1019. Taking the pin settings into account too gives a total of 1.0 × 10170, more combinations than there are particles in the universe.
The Lorenz models
The Lorenz Schlüsselzusatz 40/42 went through a few changes during its lifetime, each designed to add extra security to the encryption.
The Lorenz SZ40
The Lorenz SZ40, first built in 1940, had two stages. The initial pre-production SZ40 had 10 wheels, but it was decided to add the two extra motor wheels to try to stop a repetitive pattern.
The first transmissions were intercepted in early 1940 by a group of policemen on the south coast who were listening out for possible German spy transmissions from inside the UK, and an experimental link using SZ40 machines was recorded in June 1941.
The regular SZ40 has five “Spaltencaesar” (Chi) wheels, which all step together for each character enciphered. These drive two “Vorgelege” (control, or Mu) wheels, which then step the five “Springcaesar” (Psi) wheels irregularly.
The Lorenz SZ42A
The SZ42 was brought into use from 1942 to improve on the security of the SZ40. The 12 wheels are exactly the same as on the original model, but an extra limitation was added to change the pattern of the Psi wheels.
Instead of using only the 37-pin motor wheel to decide when the Psi wheels should turn, the setting of the second Chi wheel (no. 9) from one position back was also checked. If the 37-pin wheel’s setting was off and the limitation value from Chi 2 (one back) was on, the Psi wheels would not move; any other combination moved all the Psi wheels on one position together.
A further optional limitation, based on the fifth impulse of the plain text character two back, could also be added. This plain text limitation (Klartextfunktion) was an additional security measure. It could be turned on or off by a switch under the hood, in a box at the top right of the Lorenz, with a screwed-on lid marked “KT-Schalter” (KT switch).
This adds the fifth impulse of the plain text from two characters back to the limitation affecting the Psi wheels (1–5). It was used on the SZ42A and SZ42B later in the war, but caused problems because radio interference would garble the message on reception. Bletchley Park called this the P5 limitation.
Also in 1942, the Germans switched from the Ablesetafel 40 to a QEP book of codes, to remove the limits of the fixed number of options in the original method and to stop giving away extra information by sending the full set of twelve indicator letters with each message. Fortunately for the Allies and Bletchley Park, Bill Tutte had already worked out ways of calculating the pin settings without relying on the indicators.
The Lorenz SZ42B
The SZ42B was almost identical to the SZ42A, with another wheel added to the limitation. The limitation value was now set using both Chi 2, one back (wheel 9), and Psi 1, one back (wheel 1). These affected the movement of the Psi wheels as on the SZ42A. The optional P5 (KT switch) limitation was also available, as before.
The Lorenz SZ42C
The simulation also includes the Lorenz SZ42C (also known as the SK-44). It never went into production; it was being built to replace the SZ42A and B but was not finished by the end of the war. The information comes from sparse TICOM reports. I am not aware of any photos or models of this version running, so this could be the first time it has been shown working since 1945. There were to be 10 wheels, which moved constantly unless interrupted. Wheels 1–5, which move together, were interrupted by the settings of wheels 9 and 10; wheel 6 by 8 and 2, 7 by 9 and 3, 8 by 10 and 4, 9 by 6 and 5, and 10 by 7 and 1. If all the wheels became locked together, the machine would count to 3 and then step wheels 1 to 5.
Another feature was that the sending Lorenz would keep running, sending a pseudo-random string of characters between messages, kept in step with the receiving machine by a crystal-controlled teleprinter. This was to hide exactly where the real message was, making it much harder to search for cribs in the text. There were plans for a further machine (the SK-45), with an eleventh wheel to step the machine past dead spots, so the count-to-three device would not be needed.
How did Bletchley Park break this cipher?
The story of how Bletchley Park broke this hugely complex cipher machine is a fascinating one. Find out in the brief video overview below, or, to find out more about the story and about Colossus, the first electronic computer, built to break this machine, visit Virtual Colossus.
Next: technical information on the Lorenz.