Code vs. cipher
Whether something is a code or a cipher is a question that mainly vexes magazine editors looking at almost 4,000 words of copy in which the terms are used frequently, but the two concepts are not interchangeable.
One way of looking at it is that codes change words, but ciphers change individual letters, or bits. In the context of Lorenz, the Baudot code took the words that were enciphered letter by letter by letter by the Geheimschreiber, and turned them into something else.
Another approach is that ciphers are for keeping things secret, whereas codes can be publicly known. An example here is Enigma, which was meant to be secret until Bletchley Park got its hands on it, and which used Morse code to transmit gibberish to other Enigma operators, who then transformed it back into readable German through knowledge of Morse and the secret Enigma machine.
Roman dictator Julius Caesar, though not blessed with a wireless network through which to propagate his orders, made use of a simple substitution cipher in which letters are shifted a set number of places in the alphabet. So, with a shift of five, the common phrase “Maximum PC, Minimum BS” becomes “Rfcnrzr UH, Rnsnrzr GX.” You can see here an immediate weakness of a single-alphabet cipher: The words “Maximum” and “Minimum” look very similar even when enciphered. A polyalphabetic cipher, such as Enigma or Lorenz, fixes this, but Enigma had a cryptographic weakness – no letter could ever be enciphered as itself – that Lorenz didn’t.
random, and from this the movements of one set of wheels in the Lorenz machine could be deduced. It was called Delta for the Greek letter, and the word “difference,” because XOR is the same as modulo 2 subtraction.
“This became a key factor in what Colossus did,” says Gannon, “as the way the Lorenz machine was built meant that two of the wheels generated an intermittent stutter in order to try to increase the periodicity of the wheels. By using the Delta technique, you could observe these stutters because you’d get a regularity, lines of spaces coming through. You could then statistically see through different layers of the cipher.”
This method of attacking Lorenz was carried out in the “Testery,” the part of Bletchley Park run by Ralph Tester, and supplemented by machines in the Newmanry. Flowers’ first design for Newman was called the Heath Robinson (named for a British illustrator not dissimilar to Rube Goldberg), produced in conjunction with his colleague Frank Morell at the Post Office Research Station. Begun in January 1943, it was delivered to Bletchley Park in June, and worked pretty much straight away.
To understand how, we must step back a bit. In 1941, a Nazi radio operator made a mistake. He transmitted a message of 4,000 characters from Athens to Vienna using Lorenz, but it wasn’t received properly. Vienna asked Athens to repeat the message, but didn’t encrypt this request. The British immediately began to listen very carefully. The 4,000 characters were sent again, but without changing the key settings. This was very bad practice – in fact it, was forbidden – and to make things worse, the two messages weren’t quite identical; the operator used abbreviations to make it shorter. In cryptography, this is known as a “depth,” and can be used to break into the cipher.
Enter the enormous brains of Bill Tutte, a British/Canadian mathematician, and John Tiltman, a British Army intelligence officer. Tiltman deduced that it was a Vernam cipher using the XOR function, and was able to extract the key. This huge feat of intellect relied on Turing’s observation that, once you had recognised and removed the effect of the first five wheels in the machine from the message, what was left, though still unreadable, was not statistically random. It took two months, but Tutte, backed by other members of the Research Section, was able to work out the complete structure of the Lorenz machine, despite never having seen one, from this one mistake by a radio operator in Athens.
It was this break-in that first Delta and then Heath Robinson were designed to exploit – removing the effect of the first five wheels from the enciphered message, so that manual methods could do the rest. It used two synchronised paper tapes for data storage (each punched with up to five holes, one for every bit of the Baudot code), and was largely electro
mechanical apart from a few thermionic valves – key components of electronics for the first half of the 20th century until the invention of the transistor. The characters of the message were punched into the paper tape, which was passed at speeds of up to 2,000 characters a second past a photoelectric reader. Flowers’ valve-based “combining unit” then applied the XOR logic that Tutte had figured out, passing the result to a counting unit designed by Dr. C. E. Wynn-Williams from the Telecommunications Research Establishment at Malvern. This used a thyratron – a sort of high-voltage thermionic valve – to count the number of 0s generated. The higher the 0 count, the more likely the key sequence was correct.
The Heath Robinson was slow and a bit unreliable. Paper tapes could stretch, putting them out of sync, and the display of the 0 count was overwritten with each new count, leading to lost data if not written down in time. Many of the shortcomings were dealt with as the machine was improved, but Flowers realised he could produce a machine that generated the key stream electronically. This meant a lot more valves. The idea that up to 2,000 valves could work together reliably was not popular. They weren’t seen as reliable, with a tendency to blow like old-fashioned light bulbs.
“There was a dispute between Gordon Welchman [Assistant Director for Mechanisation at Bletchley Park in 1943] and Flowers, where Welchman was trying to get Flowers kicked out of Bletchley Park because he was wanting to use too many electronics,” says Gannon. “His ideas would have used up all the electronic valves in the country.” Gannon’s theory, based on his research, is that Turing intervened and took Flowers’ side. This was just as well, as Flowers’ work at the Post Office had shown that valves blew from stresses that were greatest when they were powered up. His solution? Don’t turn the machine off. A team of 50 people set about building something completely new.
Colossus Mark I, with 1,600 valves, arrived at Bletchley Park on
January 18, 1944, and attacked its first message on February 5. A Mark II machine, with 2,400 valves, became operational on June 1, just in time for D-Day, the Allied invasion of France, and would be joined by 11 more. The Mark II had 12 rings of thyratrons that simulated the 12 wheels of the Lorenz machine, and a six-character shift register of Flowers’ design which, along with the five electronic counters, gave it five-way parallelism, so it was five times faster than the original and easier to operate. Its speed was still limited by the paper tape, but it meant the British were reading high-level Nazi communications, including those signed by Hitler, just hours after they were sent.
Colossus was built for one task, and so couldn’t be called a generalpurpose computer. Its programmability was limited, with the programs held in the positions of switches and jack panel connections, but its algorithms could cover five billion combinations of variables. Of course, the Germans hadn’t sat still, and by August 1944, the wheel settings on all Lorenz machines were being changed daily, leading to a lot of work.
After the war, Colossus was a secret for 30 years. Units 1–10 were dismantled, their parts returned to the Post Office or Newman’s Royal Society Computing Machine Laboratory at the University of Manchester. Flowers was ordered to burn all documentation. “That was a terrible mistake,” he said later. “I was instructed to destroy all the records, which I did. I took all the drawings and the plans and all the information about Colossus on paper and put it in the boiler fire. And saw it burn.”
Units 11 and 12 survived, however, and as the Government Code and Cipher School was renamed Government Communications Headquarters (GCHQ) and moved to a new building at Cheltenham, they, plus two replica Lorenz machines, were taken along. They remained there until 1960, used mainly for training and for checking that one-time pads (an unbreakable form of sending secret messages) were sufficiently random.
Those who knew about the machines, however, dispersed into academia and industry. The idea that high-speed digital computing was feasible and reliable was a powerful one, but it didn’t catch on everywhere; when Flowers applied for a bank loan to build another machine, he was rejected because the idea was not considered likely to work. Constrained by the Official Secrets Act, he could not argue that he’d already built one. He remained at the Post Office Research Station, where he became head of the switching division, finally building his all-electric telephone exchange in 1950. He moved to Standard Telephones and Cables Ltd, and retired in 1969. He published a book on telephone exchanges in 1976, received an honorary doctorate in 1977, the Martlesham Medal in recognition of his achievements in computing in 1980, and in 1993 was awarded a college certificate, having completed a course in basic information processing on a PC. He died in 1998.
Recognition was not something the man who built the first computer sought in his lifetime, but it has come to him, slowly. There are at least two roads named for him, and a computing center for young people, The Tommy Flowers Centre, opened in 2010 near where he was born. At the R&D center operated by British Telecom (BT) – the successor to the Post Office in running Britain’s phone network – a life-size bronze bust of Flowers was unveiled in 2013, and in 2016, BT opened the Tommy Flowers Institute, a training center for postgraduates moving into the telecommunications industry.
And despite the blueprints being destroyed, enough material survived in engineers’ notebooks (a surprising amount of the material had made its way to the US) for a Colossus Mark II to be rebuilt between 1993 and 2008. The optical tape reader was rebuilt by its original designer, Dr. Arnold Lynch, and the working unit stands today in the position occupied by Colossus No. 9 at Bletchley Park, now The National Museum of Computing. It’s the size of a bus, and makes a noise like the world’s worst industrial metal band falling down the stairs.
A competition to celebrate the rebuilt Colossus pitted it against modern computers in receiving and decoding Lorenz messages. The winner, Joachim Schüth, using a 1.4GHz laptop and his own program written in Ada, took 46 seconds to find the settings for all 12 wheels. Colossus took three hours and 15 minutes. “My laptop digested ciphertext at a speed of 1.2 million characters per second, 240 times faster than Colossus,” said Schüth at the time. “If you scale the CPU frequency by that factor, you get an equivalent clock of 5.8MHz for Colossus. That is a remarkable speed for a computer built in 1944.” Remarkable indeed. Intel wouldn’t get there for another 35 years.