APC Australia

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 interchang­eable.

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 Geheimschr­eiber, 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 transforme­d 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 substituti­on 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 polyalphab­etic cipher, such as Enigma or Lorenz, fixes this, but Enigma had a cryptograp­hic 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 subtractio­n.

“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 intermitte­nt stutter in order to try to increase the periodicit­y 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 statistica­lly 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 supplement­ed by machines in the Newmanry. Flowers’ first design for Newman was called the Heath Robinson (named for a British illustrato­r not dissimilar to Rube Goldberg), produced in conjunctio­n 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 transmitte­d 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 immediatel­y 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 abbreviati­ons to make it shorter. In cryptograp­hy, 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 mathematic­ian, and John Tiltman, a British Army intelligen­ce 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 observatio­n 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 statistica­lly 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 synchronis­ed 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 electronic­s 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 photoelect­ric 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 Telecommun­ications Research Establishm­ent 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 overwritte­n with each new count, leading to lost data if not written down in time. Many of the shortcomin­gs were dealt with as the machine was improved, but Flowers realised he could produce a machine that generated the key stream electronic­ally. 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 Mechanisat­ion 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 electronic­s,” 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 operationa­l 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 parallelis­m, 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 communicat­ions, including those signed by Hitler, just hours after they were sent.

Colossus was built for one task, and so couldn’t be called a generalpur­pose computer. Its programmab­ility was limited, with the programs held in the positions of switches and jack panel connection­s, but its algorithms could cover five billion combinatio­ns 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 documentat­ion. “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 informatio­n 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 Communicat­ions Headquarte­rs (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 unbreakabl­e form of sending secret messages) were sufficient­ly 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. Constraine­d 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 recognitio­n of his achievemen­ts in computing in 1980, and in 1993 was awarded a college certificat­e, having completed a course in basic informatio­n processing on a PC. He died in 1998.

Recognitio­n 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 postgradua­tes moving into the telecommun­ications 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 competitio­n 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.

 ??  ?? The Enigma machine resembled a typewriter.
The Enigma machine resembled a typewriter.
 ??  ?? Paper tape with the punch holes of 5-bit Baudot code, and sprocket holes running down the middle.
Paper tape with the punch holes of 5-bit Baudot code, and sprocket holes running down the middle.
 ??  ?? From left to right: Tommy H. Flowers, telephone exchange expert and builder of the first electronic computer; Max Newman, British mathematic­ian, codebreake­r, and computer builder; C. E. Wynn-Williams, inventor of Colossus’s counting device.
From left to right: Tommy H. Flowers, telephone exchange expert and builder of the first electronic computer; Max Newman, British mathematic­ian, codebreake­r, and computer builder; C. E. Wynn-Williams, inventor of Colossus’s counting device.
 ??  ??
 ??  ??
 ??  ?? A Colossus computer, used during World War II at Bletchley Park, on display at The National Museum of Computing in the UK.
A Colossus computer, used during World War II at Bletchley Park, on display at The National Museum of Computing in the UK.

Newspapers in English

Newspapers from Australia