Telegraph and Codebooks

Secret Writing: A History of Codes, Ciphers and Codebreaking

Course 1 · Chapter 7 · Telegraph, Wire and Codebooks

Chapter 6 ended with cipher making and breaking as a government trade. Then came the telegraph, which let a message cross a continent in minutes, and also let anyone with access to the wire copy it. This chapter follows how the nineteenth and early twentieth centuries answered that problem, and why reusing a secret turned out to be the most dangerous habit of all.

The Wire Changes Everything

Before the telegraph, a secret letter travelled with a courier, and protecting the courier was half of the job. A telegram, by contrast, passed through the hands of clerks and operators at every office along the line. Business people, newspapers, armies and governments all had a reason to worry about who was reading. They also had a second reason to shorten messages: telegrams were charged by the word.

Key ideas and dates Telegraph (1840s onward): messages sent as electrical signals along wires.
Commercial codebooks (late 1800s): printed books of code words that cut cost and gave some privacy.
American Civil War (1861 to 1865): both sides used telegraph ciphers and tried to read each other's.
Zimmermann Telegram (1917): a German diplomatic message read by British codebreakers.
Reuse: the habit of using one code or key more than once, which this chapter treats as the main villain.
Not Yet Verified The dates and descriptions above are written from general knowledge and were not checked against a source for this chapter. Treat them as pointers for your own search.

Codes Versus Ciphers Again

Chapter 1 separated a code (whole words or phrases replaced by code words) from a cipher (letters replaced or moved). The telegraph age made codes very popular, for a practical reason. A codebook let a firm replace a long phrase such as "offer accepted subject to inspection" with one five-letter word. That saved money, and it also hid the meaning from a casual reader.

A commercial codebook in outline (invented code words) BAKER : offer accepted subject to inspection CEDAR : shipment delayed one week DOVER : price too high, cannot accept EAGLE : send full details by post Telegram sent: BAKER EAGLE (two words charged instead of a dozen)

The privacy was real but modest. Commercial codebooks were printed and sold, so a rival could buy the same book. The words were usually chosen to be pronounceable and different from each other, which made them easy to spot and to count. A codebook is a table of fixed meanings, which means every use of the same code word means the same thing. That repetition is the thread of the rest of the chapter.

Ciphers in the American Civil War

Both the Union and the Confederacy sent enormous numbers of telegrams, and both used ciphers. A well-known Union approach was a route transposition: the sender wrote the message in a grid, then read it off in an agreed path, often adding decoy words, so that the words appeared out of order. The Confederacy is often associated with the Vigenere-style cipher of Chapter 5, using a brass cipher disk and a key phrase.

Not Yet Verified Which side used which system, and how often each was broken, is written from general knowledge and was not checked here. Several accounts say the Confederate cipher was read by Union operators more than once, using the very weakness of Chapter 5. Search for "Civil War cipher" if you want a sourced version.

The Fatal Weakness of Reuse

Whatever the system, one mistake keeps recurring: using the same code or key again. If a codebook never changes, every repetition of a code word gives an analyst another clue. The more telegrams the enemy collects, the more patterns appear: the code word that opens every message, the group that always ends one, the word that appears just after a battle. Reuse is how a good cipher turns into a bad one without anyone noticing.

Additive code: add a secret number to each code group (invented values) Code table : 12 = ATTACK 25 = DAWN 31 = HOLD 47 = BRIDGE Secret key : add 40 to each group, ignore any carry past 99 Message : ATTACK DAWN Code groups: 12 25 Sent : 52 65 Every time ATTACK is sent it becomes 52 again, so the enemy sees a repeating group.

Adding a secret number hides the table, but if the same number is added every time the repeats still show. The cure is to use a different number for each group, which is the idea behind the one-time pad of Chapter 10.

The Zimmermann Telegram, 1917

In January 1917 the German foreign minister, Arthur Zimmermann, sent a coded telegram to the German embassy in Washington, to be passed on to Mexico. In the usual account it proposed that Mexico join Germany if the United States entered the war, in return for the promise of lost territory. British naval intelligence, working from a room known as Room 40, had been collecting German telegrams and had already recovered much of the codebook used. They read the message, found a way to show it to the Americans without revealing how they had obtained it, and its publication helped push public opinion towards war.

The story shows several of this chapter's points at once. The German code was a codebook, so the more telegrams the British gathered, the more of the book they rebuilt. The message went along cables the British could reach. And both sides had to decide what a decoded secret was worth: using it might tell the enemy their code was broken.

Not Yet Verified The exact wording of the proposal, the date, the role of Room 40, and the way the British hid how they obtained the text are written from general knowledge and were not checked against a source. The broad outline is widely told, but the finer points are debated. Treat this section as a lead for your own search.

Comparing the Tools

SystemUsed forStrengthWeakness
Commercial codebookBusiness telegramsSaves money; hides meaning from casual readersPrinted and sold; fixed meanings repeat
Route transpositionUnion telegrams, as usually describedLetters and words scrambled in positionPatterns in the route can be guessed
Disk cipher with key phraseConfederate telegrams, as usually describedSeveral alphabets in use (Chapter 5)Short or reused key phrases
Diplomatic codebookThe Zimmermann TelegramWhole phrases hidden at onceReuse lets a collector rebuild the book

What the Wire Teaches

Three themes run through this chapter. First, speed raises the stakes: when a message can cross an ocean in minutes, so can a leak. Second, codes and ciphers trade convenience against strength: a codebook is cheap and quick but static, while a cipher is flexible but slower to use. Third, reuse is the enemy: nearly every break in this chapter came from a code or key being used more than it should have been.

Try it yourself: a telegram with a shift A telegraph clerk has enciphered a short message with a Caesar shift of 4 (Chapter 2), so to decipher it you move each letter 4 places back in the alphabet:

QIIX EX XLI SPH FVMHKI

What does it say?
Show the worked answer

Q moves back four to M, I to E, I to E, X to T: QIIX is MEET. EX is AT, XLI is THE, SPH is OLD and FVMHKI is BRIDGE. The message is MEET AT THE OLD BRIDGE. The short word XLI (THE) is the quick way in, which is exactly the habit of Chapter 3.

Where This Leaves the Secret Writer

By 1920 the world had telegraphs, codebooks and a hard lesson about reuse. Hand ciphers were no longer enough for governments sending millions of words. The next chapter follows the response: machines with rotating wheels, and the most famous of them, Enigma.

Exercises

Exercise 1

Use this codebook: BAKER = offer accepted subject to inspection, CEDAR = shipment delayed one week, DOVER = price too high, cannot accept, EAGLE = send full details by post. Decode CEDAR EAGLE BAKER. Then explain in a sentence how a codebook saves money on a telegram.

Exercise 2

Use this code table: 12 = ATTACK, 25 = DAWN, 31 = HOLD, 47 = BRIDGE, 58 = RETREAT. The secret key adds 40 to every group. (a) Decode the groups 71 98 87 by subtracting 40. (b) A spy sees the group 52 appear in three different telegrams. What can the spy guess, and what mistake made this possible?

Exercise 3

Here is a Caesar-shifted telegram: AOL RLF DHZ BZLK ADPJL. (a) Guess the plain word for AOL and work out the shift. (b) Check the guess against DHZ. (c) Decipher the full message and say what the message warns about.

Quick Reference

  • Telegraph: fast messages, but readable by anyone with access to the wire
  • Commercial codebook: printed code words for whole phrases, cheaper and somewhat private
  • Reuse: using the same code or key repeatedly lets repeats reveal the secret
  • Additive code: a secret number added to code groups; only strong if it changes every time
  • Zimmermann Telegram (1917): a diplomatic codebook message read by British codebreakers
  • Check: dates, which side used which cipher, and the Room 40 details

Next chapter: Rotors and Enigma, with the electromechanical age, how Enigma worked in plain terms, its flaws and the Polish breakthrough.