Early in 1940, a group of policemen on the South coast were listening out for possible German spy transmissions from inside the UK, but instead, they found encoded teleprinter signals being transmitted.
Following this discovery, a Y-station was setup in Knockholt in Kent to try to intercept and record this traffic. The operator would use an undulator to record the impulses of the signal onto narrow paper tape called a slip.
This slip shows the impulses and gaps which would be carefully read by hand and punched onto paper tape and transmitted to Bletchley Park.
Brigadier John Tiltman, one of the top codebreakers at Bletchley Park, became interested in these messages, especially ones where the German operators were making mistakes and sending multiple messages with the same start positions (known as a depth). Each message (in the first part of the war) was sent with a 12-letter indicator at the start which told the receiving operator which positions to setup his Lorenz machine. If two messages had the same indicator at the start, this was the sign that a possible depth had occurred and these would be sent to Bletchley Park. Not much headway was made into breaking the cipher until the Germans made one horrendous mistake.
On 30th August 1941, two messages of nearly 4,000 characters were intercepted with the same 12 letter indicator at the beginning, HQIBPEXEZMUG. What appeared to have happened is the first operator had set his machine up as normal and typed in by hand 4,000 characters of message which was transmitted. Unfortunately for them, what came back from the receiving end was the German equivalent of "sorry, didn't get that - send it again".
It was then that the mistake was made, rather than using a new setting, the first operator set his Lorenz machine back to the initial settings and started typing the message again. This would have been absolutely forbidden to do, but they did exactly that. If he had typed exactly the same message word for word, then the exact same cipher text would have been transmitted the second time and nothing would have been gained by Bletchley Park.
Being probably understandably annoyed at having to type out all that message again, the operator started to shorten some of the message. For example, he started the first message with the German phrase SPRUCHNUMMER which means message number in English but in the second, he keyed SPRUCHNR and then continued with the message. To a person, you can read Message Number just as easily as Message No. so what difference does it make? But immediately following the N, the two text were now different, but both were using the same obscuring keystring and so the message was different from there onwards.
Using a clever bit detective work, and knowing that the cipher text was encoded using a teleprinter and Vernam cipher, John Tiltam was able to split out the key that was used to encipher this text.
The way to do this is as follows
Remember, Lorenz enciphers the text like this: Plain + Key = Ciphertext
Therefore, if we add both cipher text strings together when the key is the same we get the following
Ciphertext 1 + Ciphertext 2 = Plain 1 + Plain 2 + Key 1 + Key 2
As we are aware that these two messages are in depth and using the same key, the two keys cancel out which leaves us with just the two plain text messages mixed together
Ciphertext (1+2) = Plain text (1+2)
Once he had added the two messages together, the way to break apart the two plain text messages is a bit like completing a logic puzzle.
The first thing to do would be to think of a word or two that were very likely to be in the message. At Bletchley Park, it was known that the German army numbered units using Roman Numerals, so German words such as “ROEM” which means “Roman” followed by a number such as “EINS”, which means “One” could be expected in messages. Another frequent word was "Geheim" which meant secret.
Next, this word would have been trawled through the joined plain1+plain2 message, trying to add it to a section at a time. If the result was gibberish, then it was in the wrong position and it would be tried elsewhere.
We can see in the example above, when adding the text 9ROEM9EINS9 (9 was the way a space character was written) gives us the words "IN FRAGE" which could then be guessed as part of the sentence "KOMMT NICHT IN FRAGE" which means "IS OUT OF THE QUESTION" in German. This full text would then be added back to the cipher text sum again to hopefully further extend the text.
In this way, Tiltman managed to tease out the two messages. By the time he did this though, the messages would have been out of date and no longer necessarily useful in themselves, but what it did mean was that using both the cipher text sent and the known plain text, he could then work out the original key used to create the cipher.
Ciphertext + Plain Text = Key
Tiltman now had a stretch of roughly 4000 characters of key string generated by the encoding device. Remember, they still had no idea exactly what was generating this, but this was a great breakthrough.
Unable to make any further headway on this and after a number of codebreakers had not managed to make any further headway on this, the messages and key was given to a new codebreaker who had recently joined at Bletchley Park, Bill Tutte.
Bill Tutte, having recently completed a course at crypographical school, had learned that one way to break a code was to try and find repetitions in the key by writing them out in tables
After months of trying, he tried writing just the first channel of the key in rows of 41 and started to see patterns emerge which meant that the repetition period of 41 had some significance in the way the cipher was generated. This turned out to be the number of starting positions of the first Chi wheel.
He also deduced that as it wasn't a perfect repetition, this would suggest that there was two rather than one wheel generating the key string. He called these the Psi and Chi wheels. He also worked out that one of the wheels always stepped on each letter entered while one stuttered and from this deduced the motor wheels necessary to do this.
Over the next couple of months, Tutte and the other members of the Research section carried on to get a complete logical structure of the cipher machine which we now know as Lorenz. They did not see an actual Lorenz machine until right at the end of the war which finally confirmed that it was setup in exactly this way they had worked out!
After this huge intellectual feat, he went on to work out a way of being able to statistically work out the starting positions in smaller segments by using just two of the wheels at a time, but this involved calculation 1271 possible starts for just the first two wheels, a huge amount of work for a person to manually check by which time the messages were too out of date to be useful. What was needed was a mechanised approach to run this calculation - a machine to beat a machine!
More details of this statistical attack is given on the next page.