The Lorenz Cipher is a machine-based stream cipher developed by the German Army during World War II, primarily for high-level communications such as messages between headquarters. Unlike the Enigma Cipher, which was used for tactical messages, the Lorenz system encrypted teleprinter (teletype) transmissions and relied on a series of twelve rotors to generate pseudo-random key streams for each character.
The cipher operates on a bitwise basis, combining the plaintext characters with a generated key stream using modulo-2 addition (essentially an XOR operation). This design made the cipher extremely complex and challenging for cryptanalysts. The Lorenz machine produced a teleprinter ciphertext consisting of standard 5-bit Baudot code characters, which were then transmitted over communication lines.
Lorenz Cipher: Encoding
To encode a message, each character is first represented in 5-bit Baudot code. A key stream from the Lorenz machine is generated using the rotors' initial settings. Each plaintext bit is combined with the corresponding key bit using modulo-2 addition. For example, encoding the message “HELLO”:
Plaintext (Baudot): H E L L O
Bits: 01000 00101 01100 01100 01111
Key Stream: 10110 11001 10101 10011 01100
Modulo-2 Addition: 11110 11100 11001 11111 00011
Ciphertext (Baudot): 11110 11100 11001 11111 00011The result is a series of bits representing the encrypted message. Each time the key stream advances, the encryption changes, creating a polyalphabetic effect with a very long period.
Lorenz Cipher: Decoding
Decoding requires the same key stream used for encryption. By performing modulo-2 addition (XOR) of the ciphertext with the key stream, the original plaintext bits are recovered:
Ciphertext (Baudot): 11110 11100 11001 11111 00011
Key Stream: 10110 11001 10101 10011 01100
Modulo-2 Subtract: 01000 00101 01100 01100 01111
Plaintext: H E L L OLorenz Cipher: Notes
The Lorenz Cipher represents a significant step in the evolution of machine cryptography. It inspired modern stream ciphers and demonstrates the power of pseudo-random key generation for encryption. The cipher was eventually broken by British cryptanalysts at Bletchley Park, using a combination of statistical analysis, early computing with the Colossus machine, and manual techniques.