22 May 2013

Breaking the Code

by David Edgerley Gates

If you asked my uncle Charlie what he did in the Second World War, you got some evasive boilerplate about working for Army Intelligence. He'd tell you that during the Bulge, say, his unit searched abandoned German command posts for compromising material, and sometimes it was touch and go, because the battle lines shifted back and forth, but he was generally close-mouthed about it, and made his service out to be pretty much routine duty. He did in fact have an old Third Army sleeve insignia, a pin with the white A on a blue field, circled in red, so there might have been some truth to that Battle of the Bulge story. If there was, it was a very small part of the truth, because he was actually in on one of the biggest secrets of the war.

It was called ENIGMA, and the product was code-named ULTRA.

Enigma machine
ENIGMA was an encipherment system, used by the German military and diplomatic services. Polish intelligence did the initial heavy lifting, reverse-engineering captured German equipment, and passed their results on to the Brits in 1939. British code-breakers set up shop at Bletchley Park, north of London, and began reading Luftwaffe and Army traffic.

To simplify enormously, the Enigma machine was a transposition cipher device with a typewriter keyboard. There were three rotors inside, each with twenty-six characters. When you struck a key, the first rotor advanced one position, until it reached twenty-six, and then the next rotor advanced, like an odometer. In other words, any given letter was substituted with another, but the possible combinations were twenty-six to the power of three. The rotor settings were predetermined, but they changed every day, in theory. One weakness Bletchley Park exploited was that the German operators didn't always change the settings daily. Another was that messages were sometime sent in plaintext, for redundancy, and you could compare the coded transmission to the uncoded one. If not for German security breaches, the coded traffic might well have proved unreadable.

Then they hit a bottleneck. German naval security had always been more rigorous than that of the Luftwaffe and Wehrmacht, and the Kriegsmarine introduced a machine with four rotors. The number of possible character substitutions multiplied, and the traffic went dark.

In the North Atlantic, the convoys that were Britain's lifeline had no effective air cover or escorts, in 1940 and '41, and crossed two thousand nautical miles of unpatrolled open ocean.  Here the wolfpacks hunted. The loss of Allied tonnage was crippling. Bletchley Park needed to break the U-boat codes or the resupply would founder.

Alan Turing
The guy who probably deserves the most credit was an eccentric mathematics done from Cambridge named Alan Turing, who'd been recruited by the Government Code and Cypher School even before the war began. Turing designed an analytical machine, a numb-cruncher, in effect one of the earliest computers, a bombe, so-called.  With it, they "unbuttoned," Turing's word, the German naval ciphers, and shortened the Battle of the Atlantic. It's no exaggeration to suggest they shortened the war.

Model of the Bombe
At its peak, Bletchley Park was reading 4,000 messages a day. The decrypts tipped the balance in every campaign from North Africa to D-Day. (They were never shared with the Russians, however. Churchill's mistrust ran deep.) The people who worked there didn't talk about it, then or later. They maintained their habit of silence, and the whole story didn't break until thirty years afterwards. It was a better-kept secret than the Manhattan Project.

Alan Turing died in 1954. He was queer, and MI-5 hounded him, as a security risk. He underwent chemical castration, and was eventually driven to suicide, his contribution to the war effort unrecognized at the time of his death. Some thirty years later, Hugh Whitemore's play "Breaking the Code" opened in the West End, with the astonishing Derek Jacobi as Turing. Sodomy hasn't been criminally prosecuted in Great Britain since the repeal of the gross indecency acts in the late '60's. A legislative motion was introduced in Parliament to grant Turing a statutory pardon, just this past year.

I don't want to wade into the question of gay civil rights, although it seems to me obvious that without legal protection, homosexuals are still fair game. Turing was blackmailed by the law. His reputation doesn't deserve just rehabilitation. This has already happened. The computer library at King's College, Cambridge, for example, is now named after him, and he's widely accepted as a pioneer in Artificial Intelligence (the Turing test), and secure speech, the Delilah program. I'm saying that he deserves a posthumous knighthood, or an Order of Chivalry, at the least. This odd, cranky-pantsed fairy did as much to beat Hitler as any divisions in the field.

Churchill was later to say: "ULTRA won the war."

Editor's note: Software developer Terry Long has created a free Enigma Simulator. If you happen to use a Macintosh, download it and try it out.



Leigh Lundin said...

To accompany today's excellent article, I highly recommend Leo Marks' excellent book, Between Silk and Cyanide. When you finish, take a look at 84 Charing Cross Road.

Janice Law said...

Good piece.
The recent Bletchley Circle on PBS was good on the women of the enigma work,

Leigh Lundin said...

A question dropped into my inbox this morning asking about the appropriate use of language in the column. My take after a second read is that David is using 'queer' and 'fairy' ironically, saying "Look, the world hounded this man, it didn't like what he was, but look what he did for the war, look what he did for you."

For thirty years I lived on a street largely Asian (Chinese and Filipino) with a smattering of German, Jewish, and Hispanic. The one irritating neighbor was the WASP who moved next door to me, irritating because he didn't like black people and moved to my street. Ha! The biggest house at the end of the street was owned by a mixed race family and you can imagine his language when he learned the truth. Fortunately he died (okay, okay, maybe that's an ill-advised phrase) but his daughters-in-law came onto the scene, having been appointed executors for reasons beyond me. They made the mistake of calling my neighbors "slant-eyes." Somewhat dangerously, I said, "Slant eyes?" "Yes, slants, gooks, whatever." As evenly as I could, I said, "Before your father-in-law died, those slant-eyes drove him to the store. They helped pay his bills. They rushed him to the hospital when his health failed. I sure as hell rather live with these slant-eyes neighbors than many people I can think of." Sometimes we use words for impact, not to offend.

It's worth noting that in the book I mentioned above, Between Silk and Cyanide, Leo Marks also received pushback. Neighbors thought him cowardly because this Jewish boy in civilian dress obviously hadn't joined the British Army. They wouldn't learn for a couple of decades he'd secretly helped win the war with his talents for decoding, deciphering, and deception. And noting Janice's comment, his staff was entirely female doing their part while their men were off to the front.

Leigh Lundin said...

I apologize for dominating David's comment board today, but I remembered I'd previously written about 84 Charing Cross Road by Helene Hanff and Between Silk and Cyanide by Leo Marks. Find the review here.

Anonymous said...

it all sounds fascinating. it seems to depend on genius and lies. but your own cryptocode, the two word image, makes it very hard to comment.