Thursday, 5 June 2008

Morse and re-Morse

While we're waiting for the police to let us know if there's any news of the missing items, I thought I'd tell you about codes.

The codes that British Intelligence used during the Second World War were pretty close to the codes they used in the First World War, and nowhere near as sophisticated as the output of the Enigma machines that the Axis was using. The Enigma codes needed the first programmable computer to crack them; the British ones could be brute-forced if you had a clue as to their content, enough people working at them, and a lucky break. Leo Marks at SOE had a team of four hundred female operatives from the First Aid Nursing Yeomanry, known as FANYs (I am not making this up), whose job was to brute-force messages from their own agents that had got scrambled in transmission. They were remarkably successful.

The reason that these codes could be broken was because of the way they were encoded, a system known as poem-codes. Each agent was issued with a piece of poetry or text that they'd use to encode messages sent from the field: for each message they'd pick a few words from the poem at random, use numbers at the start of the message to indicate the words (the transposition key), and encode the message in the usual way, omitting word-breaks and punctuation, and breaking the resulting letter-wall into five-character bricks, which were then transmitted by Morse Code. Some agents, mostly the SOE ones, had radio operators sent in with them; others like the Nova-5 ones went in alone and had to do their own transmitting.

This means two important things. Firstly, poem-codes are transposition cyphers—double-transposition in the case of the SOE ones--not a subsitution one. The encoded message is nothing more than a giant anagram of the original message. So short messages can be broken quite easily, particularly if the agent's code-techniques are slack and they re-use keys. SOE agents were told to make their messages at least 200 characters long. Many didn't bother.

(200 characters. Think of it: you’re intelligence-gathering in occupied territory, knowing that discovery is a death-sentence, and you’re supposed to send back your findings and requests in something only slightly longer than a text message.)

Secondly, once you've cracked one message you're on your way to knowing what the agent's code-poem is. In the early days SOE advised its agents to choose a poem that'd be easy to remember, even under stress, so messages were being encoded with Jerusalem, Land of Hope and Glory, or the National Anthem. None of which are exactly hard to guess.

Here's what happens when an espionage network is using inadequate cryptography and lax protocols: http://en.wikipedia.org/wiki/Das_Englandspiel.

And thirdly, because it's all being done by hand, there are many steps where errors can creep in. You’ve got three elements: the message, the poem, and the transposition-key. Spell a word in the poem wrong, or add an extra letter where there shouldn’t be one and the whole thing becomes a jumble of letters.

So all in all, it's not a very satisfactory way of doing things. And then in June 1943 Leo Marks persuaded his bosses at SOE that this whole system was completely insecure and they should use worked-out codes and one-time keys instead, and all the fun came to an end.

But Violette had been parachuted into Europe in the early summer of 1943, before Leo Marks' system was in play. And yet nobody has ever been able to decode it.

Violette Summer's code-technique was, as far as we know, exemplary. I've mentioned before that most of the Nova-5 records were destroyed when a flying bomb hit their headquarters in Portman Square in 1945, and most of the rest has never been published, but the code-training was done at RAF Tempsford where separate records were kept. So we know Violette was not the sort to make careless errors. And the nature of double-transposition means that even badly encoded messages can eventually be cracked. So what happened to Violette's last message to render it undecipherable?

That, my friends, is the $64,000 question.

No comments: