The Lorenz SZ40, SZ42a and SZ42b were German rotor stream cipher machines used by the German Army during World War II. They were developed by C. Lorenz AG in Berlin. The model name SZ is derived from Schlüssel-Zusatz, meaning cipher attachment. The instruments implemented a Vernam stream cipher. British cryptanalysts, who referred to encrypted German teleprinter traffic as Fish, dubbed the machine and its traffic Tunny (meaning tunafish) and deduced its logical structure three years before they saw such a machine. The SZ machines were in-line attachments to standard teleprinters. An experimental link using SZ40 machines was started in June 1941. The enhanced SZ42 machines were brought into substantial use from mid-1942 onwards for high-level communications between the German High Command in Wünsdorf close to Berlin, and Army Commands throughout occupied Europe. The more advanced SZ42A came into routine use in February 1943 and the SZ42B in June 1944. Radioteletype (RTTY) rather than land-line circuits was used for this traffic. These audio frequency shift keying non-Morse (NoMo) messages were picked up by Britain's Y-stations at Knockholt in Kent, its outstation at Higher Wincombe in Wiltshire, and at Denmark Hill in south London, and forwarded to the Government Code and Cypher School at Bletchley Park (BP). Some were deciphered using hand methods before the process was partially automated, first with Robinson machines and then with the Colossus computers. The deciphered Lorenz messages made one of the most significant contributions to British Ultra military intelligence and to Allied victory in Europe, due to the high-level strategic nature of the information that was gained from Lorenz decrypts.
History After the Second World War, a group of British and US cryptanalysts entered Germany with the front-line troops to capture the documents, technology and personnel of the various German signal intelligence organizations before these secrets could be destroyed, looted, or captured by the Soviets. They were called the Target Intelligence Committee: TICOM. From captured German cryptographers Drs Huttenhain and Fricke they learnt of the development of the SZ40 and SZ42 a/b. The design was for a machine that could be attached to any teleprinter. The first machine was referred to as the SZ40 (old type) which had ten rotors with fixed cams. It was recognised that the security of this machine was not great. The definitive SZ40 had twelve rotors with movable cams. The rightmost five rotors were called Spaltencäsar but named the Chi wheels by Bill Tutte. The leftmost five were named Springcäsar, Psi wheels to Tutte. The middle two Vorgeleger rotors were called Mu or motor wheels by Tutte. The five data bits of each ITA2-coded telegraph character were processed first by the five chi wheels and then further processed by the five psi wheels. The cams on the wheels reversed the value of a bit if in the raised position, but left it unchanged if in the lowered position.
Vernam cipher
Gilbert Vernam was an AT&T Bell Labs research engineer who, in 1917, invented a cipher system in which the plaintext bitstream is enciphered by combining it with a random or pseudorandom bitstream (the "keystream") to generate the ciphertext. This combination is done using the Boolean "exclusive or" (XOR) function, symbolised by ⊕. This is represented by the following "truth table", where 1 represents "true" and 0 represents "false".
Other names for this function are: Not equal (NEQ), modulo 2 addition (without 'carry') and modulo 2 subtraction (without 'borrow'). Vernam's cipher is a symmetric-key algorithm, i.e. the same key is used both to encipher plaintext to produce the ciphertext and to decipher ciphertext to yield the original plaintext:
and:
This produces the essential reciprocity that allows the same machine with the same settings to be used for both encryption and decryption. Vernam's idea was to use conventional telegraphy practice with a paper tape of the plaintext combined with a paper tape of the key. Each key tape would have been unique (a one-time tape), but generating and distributing such tapes presented considerable practical difficulties. In the 1920s four men in different countries invented rotor cipher machines to produce a key stream to act instead of a tape. The 1940 Lorenz SZ40/42 was one of these.
Operating principle The logical functioning of the Tunny system was worked out well before the Bletchley Park cryptanalysts saw one of the machines—which only happened in 1945, as Germany was surrendering to the Allies.
… excerpt ends here. Continue reading the full article.


![Lorenz cipher: The Lorenz SZ machines had 12 wheels each with a different number of cams (or "pins").
OKW/Chiwheel name
ABCDEFGHIKLM
BP wheelname[15]
ψ1
ψ2
ψ3
ψ4
ψ5
μ37
μ61
χ1
χ2
χ3
χ4
χ5
Number ofcams (pins)
434751535937614131292623](https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/SZ42-6-wheels-lightened.jpg/1280px-SZ42-6-wheels-lightened.jpg?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)



