Lorenz cipher
Encyclopedia
The Lorenz SZ40, SZ42A and SZ42B (SZ for Schlüsselzusatz, meaning "cipher attachment") were German rotor
Rotor machine
In cryptography, a rotor machine is an electro-mechanical device used for encrypting and decrypting secret messages. Rotor machines were the cryptographic state-of-the-art for a prominent period of history; they were in widespread use in the 1920s–1970s...

 cipher
Cipher
In cryptography, a cipher is an algorithm for performing encryption or decryption — a series of well-defined steps that can be followed as a procedure. An alternative, less common term is encipherment. In non-technical usage, a “cipher” is the same thing as a “code”; however, the concepts...

 machines used by the German Army
Wehrmacht
The Wehrmacht – from , to defend and , the might/power) were the unified armed forces of Nazi Germany from 1935 to 1945. It consisted of the Heer , the Kriegsmarine and the Luftwaffe .-Origin and use of the term:...

 during World War II
World War II
World War II, or the Second World War , was a global conflict lasting from 1939 to 1945, involving most of the world's nations—including all of the great powers—eventually forming two opposing military alliances: the Allies and the Axis...

. They were developed by C. Lorenz AG in Berlin
Berlin
Berlin is the capital city of Germany and is one of the 16 states of Germany. With a population of 3.45 million people, Berlin is Germany's largest city. It is the second most populous city proper and the seventh most populous urban area in the European Union...

. They implemented a Vernam stream cipher
Stream cipher
In cryptography, a stream cipher is a symmetric key cipher where plaintext digits are combined with a pseudorandom cipher digit stream . In a stream cipher the plaintext digits are encrypted one at a time, and the transformation of successive digits varies during the encryption...

. British cryptographers, who referred to encrypted German teleprinter
Electrical telegraph
An electrical telegraph is a telegraph that uses electrical signals, usually conveyed via telecommunication lines or radio. The electromagnetic telegraph is a device for human-to-human transmission of coded text messages....

 traffic as "Fish
Fish (cryptography)
Fish was the Allied codename for any of several German teleprinter stream ciphers used during World War II. Enciphered teleprinter traffic was used between German High Command and Army Group commanders in the field, so its intelligence value was of the highest strategic value to the Allies...

", dubbed the machine and its traffic "Tunny".

The SZ machines were in-line attachments to standard Lorenz teleprinter
Teleprinter
A teleprinter is a electromechanical typewriter that can be used to communicate typed messages from point to point and point to multipoint over a variety of communication channels that range from a simple electrical connection, such as a pair of wires, to the use of radio and microwave as the...

s. The SZ40 was introduced on an experimental basis in 1940. The enhanced SZ42 machines were brought into substantial use from mid-1942 onwards for high-level communications between the German High Command
Oberkommando der Wehrmacht
The Oberkommando der Wehrmacht was part of the command structure of the armed forces of Nazi Germany during World War II.- Genesis :...

 in Berlin, and Army Commands throughout occupied Europe.

Wireless telegraphy
Wireless telegraphy
Wireless telegraphy is a historical term used today to apply to early radio telegraph communications techniques and practices, particularly those used during the first three decades of radio before the term radio came into use....

 (WT) rather than land-line circuits was used for this traffic. These non-Morse
Morse code
Morse code is a method of transmitting textual information as a series of on-off tones, lights, or clicks that can be directly understood by a skilled listener or observer without special equipment...

 (NoMo) messages were picked up by Britain's Y-stations
Y-stations
Y-stations were British Signals Intelligence collection sites initially established during World War I and later used during World War II. These sites were operated by a range of agencies including the Army, Navy and RAF plus the Foreign Office , General Post Office and Marconi Company receiving...

 at Knockholt and Denmark Hill and sent to Government Code and Cypher School at Bletchley Park
Bletchley Park
Bletchley Park is an estate located in the town of Bletchley, in Buckinghamshire, England, which currently houses the National Museum of Computing...

 (BP). Some were deciphered using hand methods before the process was partially automated, first with Robinson machines
Heath Robinson (codebreaking machine)
Heath Robinson was a machine used by British codebreakers at Bletchley Park during World War II to solve messages in the German teleprinter cipher used by the Lorenz SZ40/42 cipher machine; the cipher and machine were called "Tunny" by the codebreakers, who named different German teleprinter...

 and then with the Colossus computer
Colossus computer
Not to be confused with the fictional computer of the same name in the movie Colossus: The Forbin Project.Colossus was the world's first electronic, digital, programmable computer. Colossus and its successors were used by British codebreakers to help read encrypted German messages during World War II...

s. The deciphered messages made an important contribution to Ultra
Ultra
Ultra was the designation adopted by British military intelligence in June 1941 for wartime signals intelligence obtained by "breaking" high-level encrypted enemy radio and teleprinter communications at the Government Code and Cypher School at Bletchley Park. "Ultra" eventually became the standard...

military intelligence
Military intelligence
Military intelligence is a military discipline that exploits a number of information collection and analysis approaches to provide guidance and direction to commanders in support of their decisions....

.

The Vernam cipher

Gilbert Vernam
Gilbert Vernam
Gilbert Sandford Vernam was an AT&T Bell Labs engineer who, in 1917, invented the stream cipher and later co-invented the one-time pad cipher. Vernam proposed a teleprinter cipher in which a previously-prepared key, kept on paper tape, is combined character by character with the plaintext message...

 was an AT&T
AT&T
AT&T Inc. is an American multinational telecommunications corporation headquartered in Whitacre Tower, Dallas, Texas, United States. It is the largest provider of mobile telephony and fixed telephony in the United States, and is also a provider of broadband and subscription television services...

 Bell Labs
Bell Labs
Bell Laboratories is the research and development subsidiary of the French-owned Alcatel-Lucent and previously of the American Telephone & Telegraph Company , half-owned through its Western Electric manufacturing subsidiary.Bell Laboratories operates its...

 research engineer who, in 1917, invented a cipher system that used the Boolean "exclusive or" (XOR) function, symbolised by . This is represented by the following "truth table
Truth table
A truth table is a mathematical table used in logic—specifically in connection with Boolean algebra, boolean functions, and propositional calculus—to compute the functional values of logical expressions on each of their functional arguments, that is, on each combination of values taken by their...

", where 1 represents "true" and 0 represents "false".
INPUT OUTPUT
A B AB
0 0 0
0 1 1
1 0 1
1 1 0

Other names for this function are: Not equal (NEQ), modulo 2 addition (without carry) and subtraction (without 'borrow').

In Vernam's cipher:
and:
which produces the essential reciprocity to allow the same machine with the same settings to be used for both enciphering and deciphering.

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 was one of these, the revised 1942 versions were called the SZ42A and SZ42B.

Structure

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, shortly before the allied victory in Europe.
The SZ machine served as an in-line attachment to a standard Lorenz teleprinter. It had a metal base 19 in (48 cm) × 15.5 in (39 cm) and was 17 in (43 cm) high. The teleprinter characters consisted of five data bit
Bit
A bit is the basic unit of information in computing and telecommunications; it is the amount of information stored by a digital device or other physical system that exists in one of two possible distinct states...

s, encoded in the International Telegraphy Alphabet No. 2 (ITA2). The enciphering machine generated a pseudorandom
Pseudorandom number generator
A pseudorandom number generator , also known as a deterministic random bit generator , is an algorithm for generating a sequence of numbers that approximates the properties of random numbers...

 character-by-character key bit-stream that was XOR-ed with the input characters to form the output characters.

Each of the five bits (or "impulses") of the key for each character was generated by the relevant wheels in two parts of the machine. The Bletchley Park analysts called these the ("chi
Chi (letter)
Chi is the 22nd letter of the Greek alphabet, pronounced as in English.-Greek:-Ancient Greek:Its value in Ancient Greek was an aspirated velar stop .-Koine Greek:...

") wheels, and the ("psi
Psi (letter)
Psi is the 23rd letter of the Greek alphabet and has a numeric value of 700. In both Classical and Modern Greek, the letter indicates the combination /ps/ . The letter was adopted into the Old Italic alphabet, and its shape is continued into the Algiz rune of the Elder Futhark...

") wheels. Each wheel had a series of cams (or "pins") around them. These cams could be set in a raised (active) or lowered (inactive) position. In the raised position they generated a '1', in the lowered position they generated a '0'.

The chi wheels all moved on one position for each character. The psi wheels also all moved together, but not after each character. Their movement was controlled by the two ("mu
Mu (letter)
Carlos Alberto Vives Restrepo is a Grammy Award and three-time Latin Grammy Award winning-Colombian singer, composer and actor.-Biography:...

") or "motor" wheels. The SZ40 61 wheel moved one position with each character, but the 37 wheel moved on only when the cam on the 61 wheel was in the active position. If the cam on the 37 wheel was in the active position, all five psi wheels then moved. The SZ42A and SZ42B models had additional complexity to this mechanism, known at Bletchley Park as Limitations.

The key stream generated by the SZ machines thus had a chi component and a psi component that were combined together with the XOR function. Symbolically, the key that was combined with the plaintext for enciphering—or with the ciphertext for deciphering—can be represented as follows.
The number of cams on each wheel equalled the number of impulses needed to cause them to complete a full rotation. It should be noted that these numbers are all co-prime
Coprime
In number theory, a branch of mathematics, two integers a and b are said to be coprime or relatively prime if the only positive integer that evenly divides both of them is 1. This is the same thing as their greatest common divisor being 1...

 with each other, giving the longest possible time before the pattern repeated. With a total of 501 cams this equals 2501 which is approximately 10151, an astronomically large number. However, if the five impulses are considered independently, the numbers are much more manageable. The product
Multiplication
Multiplication is the mathematical operation of scaling one number by another. It is one of the four basic operations in elementary arithmetic ....

 of the rotation period of any pair of chi wheels gives numbers between 41×31=1271 and 26×23=598.

Operation

Each "Tunny" link had four SZ machines with a transmitting and a receiving teleprinter at each end. For enciphering and deciphering to work, the transmitting and receiving machines had to be set up identically. There were two components to this, setting the patterns of cams on the wheels and rotating the wheels for the start of enciphering a message. The cam settings were changed less frequently before the Summer of 1944. The psi wheel cams were initially only changed quarterly, but later monthly, the chi wheels were changed monthly but the motor wheel patterns were changed daily. From 1 August 1944, all wheel patterns were changed daily.

Initially the wheel settings for a message were sent to the receiving end by means of a 12-letter indicator sent un-enciphered, the letters being associated with wheel positions in a book. In October 1942 this was changed to the use of a book of single-use settings in what was known as the QEP book. The last two digits of the QEP book entry were sent for the receiving operator to look up in his copy of the QEP book and set his machine's wheels. Each book contained one hundred or more combinations. Once all the combinations in a QEP book had been used it was replaced by a new one. The message settings should never have been re-used, but on occasion they were, providing a "depth", which could be utilised by a cryptanalyst.

As was normal telegraphy practice, messages of any length were keyed into a teleprinter
Teleprinter
A teleprinter is a electromechanical typewriter that can be used to communicate typed messages from point to point and point to multipoint over a variety of communication channels that range from a simple electrical connection, such as a pair of wires, to the use of radio and microwave as the...

 with a paper tape
Punched tape
Punched tape or paper tape is an obsolete form of data storage, consisting of a long strip of paper in which holes are punched to store data...

 perforator. The typical sequence of operations would be that the sending operator would punch up the message, make contact with the receiving operator, use the EIN / AUS switch on the SZ machine to connect it into the circuit, and then run the tape through the reader. At the receiving end, the operator would similarly connect his SZ machine into the circuit and the output would be printed up on a continuous sticky tape. Because this was the practice, the plaintext did not contain the characters for "carriage return", "line feed" or the null (blank tape, 00000) character.

Cryptanalysis

British cryptographers at Bletchley Park
Bletchley Park
Bletchley Park is an estate located in the town of Bletchley, in Buckinghamshire, England, which currently houses the National Museum of Computing...

 had deduced the operation of the machine by January 1942 without ever having seen a Lorenz machine, made possible because of a mistake made by a German operator.

Interception

Known by Y Station operators used to listening to Morse code
Morse code
Morse code is a method of transmitting textual information as a series of on-off tones, lights, or clicks that can be directly understood by a skilled listener or observer without special equipment...

 transmission as "new music", originally Tunny traffic interception was concentrated at the Foreign Office Y Station operated by the Metropolitan Police
Metropolitan police
Metropolitan Police is a generic title for the municipal police force for a major metropolitan area, and it may be part of the official title of the force...

 at Denmark Hill
Denmark Hill
Denmark Hill is an area and road in the London Borough of Southwark. The road forms part of the A215; north of Camberwell Green it becomes Camberwell Road; south of Red Post Hill it becomes Herne Hill. Its postcode is SE5. Nearby streets whose names refer to different aspects of the same...

 in Camberwell
Camberwell
Camberwell is a district of south London, England, and forms part of the London Borough of Southwark. It is a built-up inner city district located southeast of Charing Cross. To the west it has a boundary with the London Borough of Lambeth.-Toponymy:...

, London. But due to lack of resource at this time (~1941) it was given a low priority. A new Y Station, Knockholt
Knockholt
Knockholt is a village and civil parish in Kent, England, lying approximately 5 miles south of Orpington and 3 miles northwest of Sevenoaks. It is part of the Sevenoaks district and according to the 2001 census it had a population of 1,166...

 in Kent
Kent
Kent is a county in southeast England, and is one of the home counties. It borders East Sussex, Surrey and Greater London and has a defined boundary with Essex in the middle of the Thames Estuary. The ceremonial county boundaries of Kent include the shire county of Kent and the unitary borough of...

, was later constructed specifically to receive Tunny traffic so that the messages could be efficiently recorded and sent to Bletchley Park. The head of Y station, Harold Kenworthy, moved to head up Knockholt. He was later promoted to head the Foreign Office Research and Development Establishment (F.O.R.D.E).

Code breaking

On 30 August 1941, a 4,500 character message was transmitted from Athens
Athens
Athens , is the capital and largest city of Greece. Athens dominates the Attica region and is one of the world's oldest cities, as its recorded history spans around 3,400 years. Classical Athens was a powerful city-state...

 to Vienna
Vienna
Vienna is the capital and largest city of the Republic of Austria and one of the nine states of Austria. Vienna is Austria's primary city, with a population of about 1.723 million , and is by far the largest city in Austria, as well as its cultural, economic, and political centre...

. However, the message was not received correctly at the other end, so (after the recipient sent an unencoded request for retransmission, which let the codebreakers know what was happening) the message was retransmitted with the same key settings (HQIBPEXEZMUG); a forbidden practice. Moreover, the second time the operator made a number of small alterations to the message, such as using abbreviations (The second message was only 4,000 characters long), allowing the code breakers to see the obscuring character sequence. From these two related ciphertexts, General John Tiltman and his Research team were able to recover both the plaintext and the keystream
Keystream
In cryptography, a keystream is a stream of random or pseudorandom characters that are combined with a plaintext message to produce an encrypted message ....

. Tiltman then handed the keystream to mathematician Bill Tutte
W. T. Tutte
William Thomas Tutte, OC, FRS, known as Bill Tutte, was a British, later Canadian, codebreaker and mathematician. During World War II he made a brilliant and fundamental advance in Cryptanalysis of the Lorenz cipher, a major German code system, which had a significant impact on the Allied...

, who after writing out by hand the original teleprinter 5 character Baudot code
Baudot code
The Baudot code, invented by Émile Baudot, is a character set predating EBCDIC and ASCII. It was the predecessor to the International Telegraph Alphabet No 2 , the teleprinter code in use until the advent of ASCII. Each character in the alphabet is represented by a series of bits, sent over a...

, made an initial breakthrough by recognising a 41 character repeat. Over the following two months Tutte, and other members of the Research section worked out the complete logical structure of the cipher machine. This achievement was later described as "one of the greatest intellectual feats of World War II".

Decryption machines: worlds first programmable computer

Several complex machines were built by the British to attack Tunny. The first was a family of machines known as "Heath Robinsons
Heath Robinson (codebreaking machine)
Heath Robinson was a machine used by British codebreakers at Bletchley Park during World War II to solve messages in the German teleprinter cipher used by the Lorenz SZ40/42 cipher machine; the cipher and machine were called "Tunny" by the codebreakers, who named different German teleprinter...

", which used two paper tapes, along with electro-mechanical logic circuitry, to find the pin wheel settings of the Lorenz machine. Because of the relatively slow speed at which the mechanical tape readers operated, Heath-Robinson could take up to eight weeks to break a single message. Heath Robinson also had major problems keeping the two paper tapes in synchronism.

The next was the Colossus
Colossus computer
Not to be confused with the fictional computer of the same name in the movie Colossus: The Forbin Project.Colossus was the world's first electronic, digital, programmable computer. Colossus and its successors were used by British codebreakers to help read encrypted German messages during World War II...

, the world's first programmable electronic digital computer
Computer
A computer is a programmable machine designed to sequentially and automatically carry out a sequence of arithmetic or logical operations. The particular sequence of operations can be changed readily, allowing the computer to solve more than one kind of problem...

, operational from December 1943. This was developed by G.P.O.
General Post Office
General Post Office is the name of the British postal system from 1660 until 1969.General Post Office may also refer to:* General Post Office, Perth* General Post Office, Sydney* General Post Office, Melbourne* General Post Office, Brisbane...

 engineer Tommy Flowers
Tommy Flowers
Thomas "Tommy" Harold Flowers, MBE was an English engineer. During World War II, Flowers designed Colossus, the world's first programmable electronic computer, to help solve encrypted German messages.-Early life:...

 at Dollis Hill
Dollis Hill
Dollis Hill is an area of north-west London. It lies close to Willesden, in the London Borough of Brent. As a result, Dollis Hill is sometimes referred as being part of Willesden, especially by the national press...

 in London (the Post Office research station). Like the later ENIAC
ENIAC
ENIAC was the first general-purpose electronic computer. It was a Turing-complete digital computer capable of being reprogrammed to solve a full range of computing problems....

 of 1946, it did not have a stored program, and was programmed through plugboards and jumper cables. It was both faster and more reliable than the Heath Robinsons; using it, the British were able to speed up the process of finding the Lorenz pin wheel settings. Colossus used an optical tape reader which could be driven much faster than Heath-Robinson's. As a result, Colossus could break a message within a couple of hours. The limitation to the speed at which Colossus operated remained the speed at which the optical tape reader could be driven without the tape breaking. This was around 30 miles per hour (48 kph). Since Colossus generated the obscuring characters in its electronic circuitry, the synchronisation problem was completely eliminated. Colossus itself derived its clock signal optically from the sprocket holes down the middle of the paper tape, so it always remained in synchronism with the tape reader regardless of the speed at which it actually ran.

The third machine was the Tunny Emulator. This machine was designed by Bletchley Park, based on the reverse engineering
Reverse engineering
Reverse engineering is the process of discovering the technological principles of a device, object, or system through analysis of its structure, function, and operation...

 work done by Tiltman's team in the Testery, to emulate the Lorenz Cypher Machine. When the pin wheel settings were found by Colossus and manual cryptanalysis, the Tunny machine was set up and run so the messages could be read.

Testery executives and codebreakers

After the cracking of Tunny, a special team of Tunny message code breakers was set-up under Ralph Tester
Ralph Tester
Ralph P. Tester was an administrator at Bletchley Park, the British codebreaking station during World War II. He founded and supervised a section named the Testery for breaking TUNNY .-Background:...

, most initially transferred from Alan Turing
Alan Turing
Alan Mathison Turing, OBE, FRS , was an English mathematician, logician, cryptanalyst, and computer scientist. He was highly influential in the development of computer science, providing a formalisation of the concepts of "algorithm" and "computation" with the Turing machine, which played a...

's Hut 8
Hut 8
Hut 8 was a section at Bletchley Park tasked with solving German naval Enigma messages. The section was led initially by Alan Turing...

. The team became known as the Testery
Testery
The Testery was a section at Bletchley Park, the British codebreaking station during World War II. It was set up in July 1942 under Major Ralph Tester to achieve Cryptanalysis of the Lorenz cipher. The three original founding members, cryptographers, and linguists were Captain Jerry Roberts,...

:
  • Ralph Tester
    Ralph Tester
    Ralph P. Tester was an administrator at Bletchley Park, the British codebreaking station during World War II. He founded and supervised a section named the Testery for breaking TUNNY .-Background:...

      linguist and head of Testery
  • Jerry Roberts
    Jerry Roberts
    Captain Jerry Roberts was born at Wembley, London in November 1920. His father was a pharmacist and his mother an organist who played in the local chapel....

      shift-leader, linguist and senior codebreaker
  • Peter Ericsson  shift-leader, linguist and senior codebreaker
  • Victor Masters  shift-leader
  • Denis Oswald
    Denis Oswald
    Denis Oswald is a Swiss rower and sports official. He competed in the 1968 Summer Olympics, in the 1972 Summer Olympics, and in the 1976 Summer Olympics....

      linguist and senior codebreaker
  • Peter Hilton
    Peter Hilton
    Peter John Hilton was a British mathematician, noted for his contributions to homotopy theory and for code-breaking during the Second World War.-Life:Hilton was born in London, and educated at St Paul's School...

      codebreaker and mathematician
  • Peter Benenson
    Peter Benenson
    Peter Benenson was an English lawyer and the founder of human rights group Amnesty International . In 2001, Benenson received the Pride of Britain Award for Lifetime Achievement.-Biography:...

      codebreaker
  • Peter Edgerley  codebreaker
  • John Christie
    John Christie
    John Christie may refer to:*John Christie , English footballer*John Christie , author, ski historian, Member Maine Ski Hall of Fame*John Christie , opera festival founder...

      codebreaker
  • John Thompson
    John Thompson
    -Academics:* Sir John Eric Sidney Thompson , English archeologist and Mayan scholar* John G. Thompson , mathematician* John Thompson , professor at Cambridge...

      codebreaker
  • Roy Jenkins
    Roy Jenkins
    Roy Harris Jenkins, Baron Jenkins of Hillhead OM, PC was a British politician.The son of a Welsh coal miner who later became a union official and Labour MP, Roy Jenkins served with distinction in World War II. Elected to Parliament as a Labour member in 1948, he served in several major posts in...

      codebreaker
  • Tom Colvill  general manager


By the end of the war, the Testery had grown to 9 cryptographers, 24 ATS girls with a total staff of 118, organised in 3 shifts working round the clock.

Further reading

  • Stephen Budiansky, Battle of Wits (Free Press, New York, 2000). Contains a short but informative section (pages 312–315) describing the operation of Tunny, and how it was attacked.
  • Paul Gannon, Colossus: Bletchley Park's Greatest Secret (Atlantic Books, 2006). Using recently declassified material and dealing exclusively with the efforts to break into Tunny. Clears up many previous misconceptions about Fish traffic, the Lorenz cipher machine and Colossus.
  • F. H. Hinsley, Alan Stripp, Codebreakers: The Inside Story of Bletchley Park (Oxford University Press
    Oxford University Press
    Oxford University Press is the largest university press in the world. It is a department of the University of Oxford and is governed by a group of 15 academics appointed by the Vice-Chancellor known as the Delegates of the Press. They are headed by the Secretary to the Delegates, who serves as...

    , 1993). Contains a lengthy section (pages 139–192) about Tunny, the British attack on it, and the British replicas of the Lorenz machine.
  • Michael Smith, Station X: Decoding Nazi Secrets (TV Books, New York, 2001). Contains a lengthy section (pages 183–202) about Tunny and the British attack on it.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK