The Lorenz cipher was a German encryption system used during World War II for high‑level communications between the German High Command (Oberkommando der Wehrmacht) and army group commanders. It employed a teleprinter‑based stream cipher, generating pseudo‑random key streams to encipher teleprinter characters. Unlike the better‑known Enigma machine, the Lorenz cipher was a more complex, non‑Morse system. Its cryptanalysis by British codebreakers at Bletchley Park—spearheaded by figures such as Bill Tutte and Tommy Flowers—led to the development of the Colossus computer, one of the first programmable electronic digital computers. The Lorenz cipher stands as a milestone in both cryptographic history and early computing.

1 History and development

1.1 German wartime communications requirements

As World War II progressed, the German military needed a secure method for high‑command communications that could handle large volumes of teleprinter traffic. The existing Enigma machine, while effective for tactical messages, was slower and required manual operation. The German High Command required an automated system that could transmit strategic orders and intelligence reports quickly and securely over long‑distance radio or landline links.

1.2 Design and production by C. Lorenz AG

The C. Lorenz AG company in Berlin was contracted to develop a cipher attachment for standard teleprinters. Engineers designed a machine that used a set of rotating wheels to generate a key stream. The resulting device was known as the *Schlüsselzusatz* (cipher attachment) and was designated SZ40, later evolving into SZ42 models. Lorenz produced these machines in limited quantities, primarily for high‑level command links.

1.3 Operational deployment

The Lorenz cipher was deployed from 1941 onwards on radio‑teleprinter links connecting Berlin with major army group headquarters across occupied Europe and North Africa. The system was used exclusively for top‑secret strategic messages, often carrying operational orders, situation reports, and intelligence summaries. The Germans considered it unbreakable due to its complex wheel‑based key generation.

2 Technical description

2.1 Teleprinter encoding and Baudot code

The Lorenz cipher operated on the standard 5‑bit International Telegraph Alphabet No. 2 (ITA2), also known as Baudot code. Each character was represented by a combination of five binary impulses (current on/off). The cipher machine XORed the plaintext bits with a pseudo‑random key stream of the same length, producing ciphertext bits. At the receiving end, the identical key stream was XORed again to recover the plaintext.

2.2 Key generation: the 12‑wheel cipher machine

The Lorenz SZ40/42 used a set of twelve rotating wheels that generated the key stream. Each wheel had a fixed number of cams or pins that could be set to active or inactive positions, producing a repeating binary sequence. The wheels were grouped into two banks, each with five wheels, plus two additional motor wheels.

2.2.1 Psi wheels and chi wheels

The ten main wheels were divided into five χ (chi) wheels and five ψ (psi) wheels. The chi wheels (with pin counts 41, 31, 29, 26, and 23) stepped regularly after each character, while the psi wheels (with pin counts 43, 47, 51, 53, and 59) stepped irregularly under the control of the motor wheels. The key stream was formed by XORing the outputs of the chi and psi wheels.

2.2.2 Motor wheels and movement patterns

Two additional motor wheels (µ, with pin counts 61 and 37) controlled the movement of the psi wheels. The motor wheels stepped after each character, and their active pins determined whether the psi wheels would advance or remain stationary. This irregular stepping created a non‑trivial periodicity that made the cipher significantly harder to break than a simple repeating key.

2.3 Encryption and decryption process

The plaintext, in Baudot code, was XORed first with the chi‑wheel output, then with the psi‑wheel output, to produce the ciphertext. Decryption required an identical Lorenz machine at the receiving end, with the same initial wheel‑pin settings. The operator set the starting positions (rotational offsets) of all twelve wheels according to a daily key list, then transmitted or received the encrypted teleprinter signal.

3 Cryptanalysis at Bletchley Park

3.1 Initial intercepts and the "Tunny" designation

British intercept stations in 1941 began picking up non‑Morse radio transmissions that sounded like a teleprinter signal. Bletchley Park codenamed the link "Tunny" (after the fish). Analysts quickly realized that the traffic was encrypted, but the system’s structure was unknown. Intercepts were recorded on punched paper tape for analysis.

3.2 Bill Tutte's reverse engineering of the key schedule

In 1942, mathematician Bill Tutte was given a sample of intercepted Tunny traffic. By studying the statistical properties of the ciphertext and exploiting a known plaintext attack (when two messages had the same key due to operator error), Tutte deduced the number of wheels and their pin‑counts. In a remarkable feat, he reverse‑engineered the entire logical structure of the Lorenz cipher without ever seeing a physical machine.

3.3 Statistical methods and the "Turingery" approach

Alan Turing developed a manual cryptanalytic technique he called "Turingery." It involved aligning two messages that had been sent with the same wheel‑settings and using differences between the ciphertexts to isolate the psi‑wheel contributions. This method required large amounts of manual calculation but proved the theoretical basis for automated attacks.

3.4 Development of Colossus

3.4.1 Tommy Flowers and the Mark I Colossus

Engineer Tommy Flowers proposed building an electronic machine to automate the statistical analysis needed to break Lorenz. The first Colossus Mark I was built at the Post Office Research Station at Dollis Hill and became operational at Bletchley Park in December 1943. It used over 1,500 vacuum tubes and could process 5,000 characters per second, reading the ciphertext from a paper tape loop.

3.4.2 Mark II Colossus and operational use

The Mark II Colossus, completed in June 1944, incorporated improvements including parallel processing and a larger number of logic units. Ten Colossus machines were eventually built. They were used to find the chi‑wheel settings and the motor‑wheel patterns for daily keys, enabling decryption of significant Tunny traffic from mid‑1944 until the end of the war.

3.5 Decryption procedures and traffic analysis

The decryption process typically involved two stages: first, using Colossus to determine the chi‑wheel starting positions; second, setting up a replica Lorenz machine (or a software emulation on Colossus) to read the plaintext. Bletchley Park’s "Testery" (under Ralph Tester) undertook the final manual steps. The intelligence gained from Tunny decrypts—known as "Ultra" material—provided crucial insights into German strategy, including army deployment and the V‑1 and V‑2 programs.

4 Impact and legacy

4.1 Contribution to the Allied victory

Lorenz decrypts provided high‑level strategic intelligence, particularly during the Normandy landings and the subsequent campaign in northwest Europe. Knowledge of German order‑of‑battle and reinforcement plans helped Allied commanders make informed decisions. While the exact tactical impact is debated, the intelligence is considered to have shortened the war.

4.2 Influence on postwar cryptography

The Lorenz cipher demonstrated the vulnerability of mechanical stream ciphers to statistical attacks. Postwar cryptographic systems, such as the Hagelin CX‑52 and the SIGABA family, incorporated irregular stepping mechanisms influenced by the lessons of Lorenz. The concept of a pseudo‑random key stream generated by combinatory logic became a foundation for modern stream ciphers.

4.3 Colossus and the birth of electronic computing

Colossus was one of the first programmable electronic digital computers. It used a stored program on plugboards and could be reconfigured to solve different cryptanalytic problems. Its development directly influenced the work of Alan Turing and others on the ACE and Manchester computers. Because Colossus remained secret until the 1970s, its impact on mainstream computing history was initially overshadowed, but it is now recognized as a crucial step in the evolution of electronic computing.

5 Survivors and museum exhibits

No original Lorenz cipher machine was known to survive immediately after the war; all units were believed destroyed by the Germans or scrapped by the Allies. In the 1990s, a Lorenz SZ42 was discovered in a museum store in Norway, and another was found in Germany. These are now displayed at the Bletchley Park Museum (UK) and the Heinz Nixdorf MuseumsForum (Germany). A fully functional replica was built by a team of volunteers and is demonstrated at Bletchley Park. The Colossus computers were dismantled in 1945, but a working replica of Colossus Mark II was completed in 2007 at Bletchley Park and is open to the public.