Skip to content

Codes and cables


Reading Thomas Pakenham’s The Boer War, one of the leading English-language books on the eponymous conflict in South Africa from 1899 to 1902, I’m struck by the fact that during the war telegrams and coded messages were regularly being sent not only within South Africa, but also by undersea cable between South Africa and Britain.

Computers as we know them did not yet exist, let alone the Internet, and ‘wireless’ (radio) telegraphy was still in its infancy – the Italian inventor Guglielmo Marconi’s system had only been around since 1894, and was not patented until after the war had begun. But cable telegraphy had been invented back in the early 19th century, along with Samuel Morse’s dash-and-dot ‘code’. This was not a code in the true sense, for it was easy to learn, widely published and hence not secret – indeed, it was intended to be read by as many people as possible (by 1861 the Atlantic and Pacific coasts of the USA were linked by Morse telegraph, eliminating the need for the Pony Express horseback mail system). But the speed of the system revolutionised military communications by allowing orders and other vital information to be transmitted over increasingly long distances – not instantly, as the cables and wires could at first only cope with a limited amount of traffic, but in any case far faster than ever before. A practised Morse operator could send messages at speeds of 20 words or more a minute.

The electric-powered telegraph was already in use during the Crimean War (fought in southern Russia in the mid-1850s), and by the time the Boer War broke out nearly half a century later it was standard practice to link up South African towns and military positions with telegraph wires. These were of course vulnerable to enemy attack, for they were mounted on highly visible poles; and the famous siege of Ladysmith in the British colony of Natal began when Boer forces cut its telegraph links to the rest of South Africa, and to Britain (whereas the Boers’ own links to the Transvaal government in Pretoria remained intact for most of the war). The wires were also vulnerable to tapping; and at one point quite late in the war Boer telegraph operators were able to listen in to Morse messages that revealed much of their enemy’s strategy (it seems the possibility of the wires being tapped had not occurred to anyone in the British high command, so the messages were not even in code – real code, as opposed to Morse).

The purpose of real codes has always been to keep key information secret by presenting it in a form that – if all is well – only the sender and the recipient can understand. It is not known exactly when code systems were first invented; but they essentially depended on writing systems, which are believed to have first developed around 5,000 years ago in Mesopotamia (modern-day Iraq and Kuwait, more or less). Like Morse code, writing systems were meant to be widely understood; whereas code systems were meant to be secret, and so warfare came to depend on them.

Until quite recently codes simply involved taking the letters of the ‘plain’ message and converting them into different letters (or numbers, or both). This was not always simply one-for-one: as early the 16th century an Italian called Giambattista della Porta came up with a coding system based on pairs of letters, which were turned into series of numbers that recipients could only decode if they knew the key (and this could be changed as required, as long as the people who needed to know were kept informed). Variations on this theme continued to be developed, and during the Boer War the British army was using a similar system named after the Lord Playfair who popularised it. The pairing system made the code far harder to ‘break’, for it was almost invulnerable to one of code-breakers’ classic tricks: frequency analysis.

Every language with a relatively small number of letters (such as those written in Latin script) has a known frequency for each of the letters. In English, for instance, the most frequently used letter is E: in this sentence it occurs 15 times in the space of 114 letters (13% of the total). The frequency of letters can also be seen from the ‘letter score’ in the English version of the board game Scrabble – E, like the other five vowels and the letters L, N, R, S and T, scores just 1 point, whereas the far less frequent letters Q and Z score 10 points each (in other languages the letter scores are different: in Basque and Breton Scrabble the far more frequent Z scores just 4 points, and there is no Q at all, since that letter does not occur natively in either language).

A one-to-one coding system can thus easily be broken by frequency analysis – especially if the system makes the elementary mistake of presenting the encoded words in the same groupings and order as the ‘plain’ words. If, for example, the English word TREE – which contains three of the most frequently occurring letters in the language, all with Scrabble scores of 1 – also appears as a four-letter group (say AZKK) – it should not take the code-breaker very long to work out that A = T, that Z = R and that K = E. This can then be applied to other groups of letters: AFKZK = T-ERE (almost certainly THERE), then we can work out the meaning of AFKJAZK = THE-TRE (quite definitely THEATRE), and so on. If key military words like TARGET (which includes 5 of the 6 letters in THEATRE), REGIMENT and CASUALTIES can be identified in this way, it is only a matter of time before the whole code is broken; and as long as the enemy still thinks it is secure, you can continue to read the messages at your leisure.

Modern coding systems have therefore long ceased to rely on one-to-one transposition of letters and words. Another coding trick is to write the message in, say, a specified number of rows and columns (left to right, then on to the next row), but change the order of the letters according to a secretly agreed system (such as going down the first column and up the next one, then back down the next, and so on). Take the message ABOUT TO ATTACK EAST TRENCHES (which can easily be read without spaces between the words):

A  B  O  U  T

T  O  A  T  T

A  C  K  E  A

S  T  T  R  E

N  C  H  E  S


If you read down the first column, up the next and so on, then write the letters out in new horizontal blocks of five, you get:

A  T  A  S  N

C  T  C  O  B

O  A  K  T  H

E  R  E  T  U

T  T  A  E  S


You can also, to take just one example, spiral downwards from the top right-hand corner (T) of the ‘plain’ message and on round the block until there are no letters left, and present all that in blocks of five letters – the last one will then be K (I’ll leave you to work it out).

But of course even these are tried-and-tested methods which code-breakers are perfectly familiar with; and although it takes a bit longer, experts can eventually work it out. Of course, if the messages are written in a foreign language (and encoded on that basis) you’ll need someone with a very good knowledge of the language concerned to help you work it all out.

Which is why both the American and British armed forces have increasingly used native speakers of less widely spoken languages such as Navajo, Comanche, Welsh and Scottish Gaelic to encrypt their communications. It seems that Welsh-speaking British soldiers were called on to perform this linguistic service over the radio as recently as the war in the former Yugoslav republic of Bosnia-Herzegovina.

But back to cables. From the mid-19th century onwards, telegraph cables were laid on the ocean floor by specially equipped vessels; and as early as 1872 Australasia became the last inhabited continent to be connected to the rest of the world by telegraph, with a link from Darwin in northern Australia to the island of Java in the then Dutch East Indies (though it would take until 1902 for Australia to be linked to Canada by a trans-Pacific link that completed the global circle). In any case, throughout the Boer War urgent telegrams could be freely and rapidly sent back and forth between Cape Town and London.

And, unlike overland wires and cables, submarine ones could not (yet) be tapped – being under water, they were well out of reach. So all the world’s leading military powers took good care to have their own international cable networks – Germany’s, for instance, ran to France, Spain and the mid-Atlantic Azores islands, and from there to the USA and the rest of the Americas.

And when the First World War broke out and Britain declared war on Germany in 1914, the very first thing the British Admiralty did was send out a ship to drag up all five of the Germans’ international submarine cables from the bottom of the sea and cut them – leaving Germany dependent on the by now well-developed radio communications (Marconi’s invention had won him the Nobel Prize for physics in 1909). But the problem with radio messages was that they were freely accessible on the airwaves, and could be intercepted. In a matter of weeks the Admiralty had set up a secret radio interception unit known as ‘Room 40’.

Of course, intercepting Germany’s transoceanic military messages required a good knowledge not only of the German language, but above all of the three German military and naval codes: the Imperial Navy codebook Signalbuch der Kaiserlichen Marine (SKM), the commercial Handelsschiffsverkehrsbuch (HVB) used by the German submarines (U-boats) that sought to blockade Britain’s trans-Atlantic trade routes and food supplies, as well as the Zeppelin airships that were soon bombing London, and the Verkehrsbuch (VB), used to communicate with warships and embassies abroad. These codes were not easy to break, but by astonishing strokes of luck all three codebooks very soon fell into British hands: (1) a month after the outbreak of war a German cruiser carrying a copy of the SKM ran aground in Estonia, then still part of Russia, which was allied with Britain and France; the codebook was seized and immediately passed on to London; (2) two months later the Australian Royal Navy (Australia was of course allied with Britain) boarded an Australian-German steamer that was carrying a copy of the HVB, and also passed it on to London; and (3) a month after that a British trawler recovered from a sunk German destroyer a safe that just happened to contain an intact copy of the VB. So by Christmas 1914, just three months into the war, Room 40 had copies of all three codebooks, which it of course put to good use in intercepting German radio traffic. Throughout the war the Germans had no idea this was happening.

The most significant intercepted message was the ‘Zimmermann telegram’, in which Germany’s foreign minister Arthur Zimmermann attempted to draw Mexico into the war on the German side by encouraging the country to invade the USA and, with luck, recover its ‘lost’ territory in Texas, New Mexico and Arizona. Hardly believing its luck, Room 40 gleefully released the intercepted information to the US government just when President Woodrow Wilson was struggling to persuade his still reluctant compatriots that intervention on the side of the Allies was both politically and morally desirable.

Germany’s implicit threat of war against the USA is widely believed to have tipped the scales in favour of American intervention, and hence to have helped the Allies win the war. Every effort was made to conceal the source of the information, for Room 40 did not want the Germans to realise it had been reading their radio traffic for the past three years; and even now the Berlin government did not grasp what had happened.

After the First World War countries began to develop primitive computers which, it was hoped, would withstand traditional code-breaking methods. In the 1920s Germany produced the famous Enigma machine, which it continued to use up to and throughout the Second World War. However, using information supplied by a French spy in the Germany military, Polish cryptologists very soon managed not only to discover how the machine worked, but also to build an Enigma machine of their own. In 1939, shortly before Nazi Germany invaded Poland, British and French intelligence officers were taught the secrets of Enigma by their Polish counterparts, and provided with one of the Polish replicas; and within a year Alan Turing and other British cryptologists at the modern equivalent of Room 40, a country house in south-east England called Bletchley Park, had begun to break the German codes. Once again, the Germans had no idea, and crucial messages were intercepted throughout the war. For more on how the Enigma code was broken, as well as Alan Turing’s sad life, see my early post AMT: a man tormented (1).

How things have changed since then. Not only is today’s world riddled with cables and wires, but we now have a completely ‘wireless’ system of communication, the Internet, all of it vulnerable to interception and distortion not only by the military but even by civilians – from teenage ‘hackers’ wrecking vital communications from the safety of their bedrooms to hostile governments (above all Putin’s Russians, who are the only ones to deny it, so we can safely assume the accusations are true) seeking to disrupt other countries’ elections and social systems in their favour.

Today’s computers have made traditional coding systems obsolete, and all cable systems, whether on land, below the sea or in the atmosphere, have ceased to be secret and reliable – as the recent privacy-raping shenanigans by the USA’s National Security Agency (NSA) and Britain’s Government Communications Headquarters (GCHQ), which they no longer even try to deny, have made only too clear. The problems of coding have entered our everyday lives via the Internet, for more and more organisations require us to make up ‘passwords’ just to gain access to our own medical files or bank accounts; and if the passwords we make up are simple enough for us to remember but not sufficiently complicated to be ‘secure’, they’re rejected – as if it’s our fault.

Not the kind of world I ever wanted to live in – but we aren’t being given a choice in the matter.

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: