Route Ciphers in the Civil War

As the age of electronic communcation began, it quickly became apparent the nation needed methods to preserve the security of messages sent over channels that could be tapped. The method adopted by the government was developed (in part) by one of the country's biggest technology companies and involved confusion and diffusion.

Are we talking Lucifer/DES, Horst Feistel of IBM and S-boxes? No. We are interested in a time a hundred years earlier when the transmissions were not over the internet but via telegraph lines, and the messages were those sent by the North during the American civil war. Our topic is route ciphers.

In the early 1860's Anton Stager was the general superintendent of the Western Union Telegraph Company. Soon after the Civil War began Ohio Governor William Denison made him responsible for all telegraph lines in the Ohio military district, and asked him to prepare a cipher for use by the governors of Ohio, Indiana and Illinois. This was, apparently, "the first telegraphic cipher used for war purposes" [Plum, page 44]. Later General George B. McClellan, who had been put in charge of the Ohio volunteers, asked Stager to prepare a cipher for use during his campaign in West Virginia. Stager based this new cipher on his previous one, and it was afterwords adopted as the official cipher of the War Department [Weber]. Stager's cipher was a route cipher. As J.E. O'Brien, a former US Military Telegraph operator, put it [ASA3]  "The principle of [this] cipher consisted in writing a message with an equal number of words in each line then copying the words up and down the columns by various routes, throwing in an extra word at the end of each column, and substituting other words for important words and meanings."

Here is an example from the very beginning of the war. [Plum]

Parkersburg, VA. June 1, 1861.

To Maj. Gen. G.W. McClellan, Cincinnati, Ohio:

Telegraph the have be not I hands profane right hired held must start my cowardly to an responsible Crittendon to at polite ascertain engine for Colonel desiring demands curse the to success by not reputation nasty state go of superseded Crittenden past kind of up this being Colonel my just the road division since advance sir kill. (Signed) F.W. Lander

With knowledge of the code we'd look up the keyword Telegraph to learn that this message is eight lines long with seven columns. Further that the plaintext was inserted in the order up the 6th column, down the 1st, up the 5th, down the 2nd, up the 4th, and down the 3rd. Finally that the seventh column is filled with nulls and the ciphered message is pulled off row by row.

To decipher, reverse these steps. So write the message in 8 rows of 7 columns each

the have be not I hands profane
right hired held must start my cowardly
to an responsible Crittendon to at polite
ascertain engine for Colonel desiring demands curse
the to success by not reputation masty
state go of superseded Crittenden past kind
of up this being Colonel my just
the road division since advance sir kill

and then pull off the columns in order. Up the 6th column and down the 1st begins the message:

Sir. My past reputation demands at my hands the right to ascertain the state of the advance. Colonel Crittendon, not desiring to start, I have hired an engine to go up road. Since being superseded by Colonel Crittendon, [I] must not be held responsible for [the] success of this division.

The instructions for the codes were originally printed on cards about 3 by 5 inches in size. Included were the route, the keys (then called commencement words), the code words (or arbitrary words), and the null words (or check or blind words). As the war went on, the ciphers became more complicated. Here is an example from 1863 [Weber, pages 114-5].

Headquarters Department of the Cumberland

Chattanooga, October 16, 1863 - 7 p.m.

Major-General Burnside, Knoxville, Tenn.;

The enemy are preparing pontoons and increasing on our front. If they cross between us you will go up, and probably we too. You ought to move in this direction, at least as far as Kingston, which should be strongly fortified, and your spare stores go into it without delay. You ought to be free to oppose a crossing of the river, and with your cavalry to keep open complete and rapid communications between us, so that we can move combined on him. Let me hear from you, if possible, at once. No news from you in ten days. Our cavalry drove the rebel raid across the Tennessee at Lamb's Ferry, with loss to them of 2,000 killed, wounded, prisoners, and deserters; also five pieces of artillery.



Answer quick.

To encipher the clerk first choose a key -- Enemy in this case. This keyword demands an array with 10 rows of 6 columns each. So the first 60 words of the message are entered:

For Burnside The enemy are preparing
Pontoons & increasing numbers on our
front If they cross between us
you will go up and probably
we too . You ought to
move in this direction at least
as far as Kingston which should
be strongly fortified and your spare
stores go into it without delay
You ought to be fee to

Next, some giveaway words are replaced by their code equivalents - Burnside becomes Burton and enemy becomes Wiley. The key also indicates that nulls are to be added at the tops and bottoms of certain columns. Doing this produces

  boy greatly
For Burton the Wiley are preparing
Pontoons & increasing numbers on our
front If they cross between us
you will go up and probably
we too . You ought to
move in this direction at least
as far as Kingston which should
be strongly fortified and your spare
stores go into it without delay
You ought to be fee to
Not surely some      

Finally, the key tells how the plaintext is to be taken off: down column 3, up column 4, down 2, up 5, down 1 and up 6. This gives the ciphertext

the increasing they go period this as fortified into some be it and Kingston direction you up cross numbers Wiley boy Burton & If will too in far strongly go ought surely free without your which at ought and between on are greatly For Pontoons front you we move as be stores You Not to delay spare should least to probably us our preparing


Because the entire message has not yet been enciphered, a new key would be chosen and enciphering would continue.

As it turns out, this ciphertext was captured and given to E.P. Alexander, the founder of the Confederate Army Signal Corps, who attempted to decipher it. His account of this incident is as follows [Gallagher, pages 302-3]

I had never seen a cipher of this character before, but it was very clear that it was simply a disarrangement of words, what may be called, for short, a jumble. Each correspondent, of course, had what was practically a list of the natural numbers, say from one up to 50, or whatever limit was used, taken in an agreed jumble, as for instance beginning 19, 3, 41, 22 &c. Then, the first word of the cipher would be the 19th of the genuine message, the 2nd cipher would be 3rd of message, the 3rd cipher the 41st, &c.

If [the jumble] were used twice or three times, I could, by comparison & trial, probably decipher the whole business. But if the jumble were not repeated, I could never decipher it without getting another message in the same jumble in order to compare the two. ... I found one pair of words which certainly belonged together, 'Lambs' & 'ferry' -- for there was a 'Lamb's Ferry' on the Tennessee River. But it only made the demonstration absolute that the jumble ws not repeated [and so I could not make sense of it.] I afterward found that the Federals made their jumbles by means of diagrams of row & columns, writing up & down in different orders & then taking the words across ... They also used some blind words to further confuse the cipher. This made, indeed, a most excellent cipher, quick & easy, both to write & to decipher, which is a very great advantage. But there is one objection to it, in that it required a book, & that book might get into the wrong hands.

By 1865 the codesheets really were, as Alexander suggested, code books, and they included many code words, nulls, and variations on the routes [SSA3], eventually growing to 48 pages. Cipher No. 4 was the last one of the war, only going into service on March 23, 1865. The keywords and routes, apparently to effect some security, were in code [Plum]. According to Plum the entire content of page seven is

3 7 4 2
8 10 14 12
13 11 9
6 5 1
Bedroom. 1. Lazy. | Blonde 11. Liniment.
Bedstead. 2. League. | Bloody. 12. Lion.
Beverage. 3. Leather. | Bosom. 13. Liquid.
Beyond. 4. Legacy. | Boy. 14. Loafer.
Big. 5. Lemon. | Bread. 15. Log.
Bill. 6. Lesson. | Bride. 16. Lomax.
Billiards. 7. Let. | Brush. 17. Long.
Bilious. 8. Library. | Bulk. 18. Lucky.
Blanket. 9. Life. | Bushel. 19. Luscious.
Bliss. 10. Linen. | Buxom. 20. Luxury.

The column words indicate the number of lines in the text, with only one being used (unless the message was more than 20 lines, in which case others were added.) The route was given in the top and bottom rows of numbers - up the 6th column, down the 3rd, up the 5th, etc. (The two middle lines are nulls.) There are also 1608 codewords. Plum gave the examples

Word Code Word Code
. flea, hound battle knit
, ass, bat commander locust
, bear, bitch corps Madrid
, cat the enemy village
3 Madison fight optic
15th Brown fighting oppressing
18 Norris in the quail
60 Knox of the serenade
July Steward one Harry
Sunday Tyler Over skeleton
Couch ax night Rustle
A. Lincoln Adrian relieved trammeled
Meade Bunyard the river turnip
Smith children signature upright
Washington, D. C. Incubus    

Notice that common phrases ("in the" and "on the") and punctuation were given code equivalences.

As a demonstration Plum gave a well-known message of Lincoln.

Washington, D.C.

To A. Harper Caldwell,

Cipher Operator, Army of the Potomac:

Blonde bless of who no optic to get and impression I Madison square Brown cammer Toby ax the have turnip me Harry bitch Rustle silk Adrian counsel locust you another only of children serenade flea Knox County for wood that awl ties get hound who was war him suicide on for was please village large bat Bunyan give sigh incubus heavy Norris on trammeled cat knit striven without if Madrid quail upright martyr Stewart man much bear since ass skeleton tell the oppressing Tyler monkey.

(signed) D. Homer Bates

(David Homer Bates was from 1861--1866 a telegrapher and cipher clerk in the telegraph office in the old War Department Building [SSA1]. His war remembrances, Lincoln in the Telegraph Office, make for interesting reading.) When deciphered the message reads

Washington, D.C. July 15th, 1863, for Simon Cameron.

I would give much to be relieved of the impression that Meade, Couch, Smith and all, since the battle of Gettysburg, have striven only to get the enemy over the river without another fight. Please tell me if you know who was the one corps commander who was for fighting, in the council of war on Sunday night.

Signature A. Lincoln. Bless him.

Our final example is a cipher from the very end of the war. Apparently to conceal the cipher's content from the cipher operators who were relaying it a different, but simple, technique was used. Can you read it?

City Point, Va., 8:30 A.M., April 3, 1865

TINKER, War Department:

A Lincoln its in fume a in hymn to start I army treating there possible if of cut too forward pushing is He is so all Richmond aunt confide is Andy evacuated Petersburg reports Grant morning this Washington Secretary War.


During the American Civil War, the North used relatively simple word transposition ciphers, which sends the plaintext message with word order jumbled. Why, then, did the North enjoy cryptographic success? The North's messages consisted of meaningful words, which reduced the number of garbles and errors and led the North to keep to cryptographic protocol [Weber]. In addition, the extensive use of code words in Stager's system generally prevented the South from getting any easy entries into messages. "Judged by the standards of its own day, [Stager's] cipher was adequate: it was not too complex to be practicable, and yet it delayed solution for a sufficient time.'' [ASA2, page 20].


  • [Gallagher] Gallagher, Gary W., Fighting for the Confederacy: The Personal Recollections of General Edward Porter Alexander, University of North Carolina Press, 1998.
  • [Plum] Plum, William Rattle, The Military Telegraph during the Civil War in the United States, Arno Press, New York, 1974.
  • [ASA1] U.S. Army Security Agency. The History of Codes and Ciphers in the United States Prior to World War I. Laguna Hills, CA: Aegean Park Press, 1978
  • [ASA2] U.S. Army Security Agency. Historical Background of the Signal Security Agency. Vol. I. Codes and Ciphers Prior to World War I. Army Security Agency, Washington, DC, 1946.
  • [ASA3] U.S. Army Security Agency. Codes and Ciphers During the Civil War. Prepared under the direction of the Chief Signal Officer, Washington, DC, 1945.
  • [Weber] Weber, Ralph E. Masked Dispatches: Cryptograms and Cryptology in American History, 1775-1900. Ft. George G. Meade, MD: Center of Military History, National Security Agency, 1993.

  • ABOUT THE AUTHOR: Jim Sauerberg is Professor and Chair of the Department of Mathematics and Computer Science at Saint Mary's College of California He obtained his Ph.D. at Brown University in 1993 with Michael Rosen. His research interests include Algebraic Number Theory, Formal Groups, Cryptography, Reciprocity Laws, Elementary Number Theory, and Function Fields. He has just completed a textbook for use in liberal arts mathematics courses, titled Cryptography: A Historical Approach.

Mathematics Awareness Month is sponsored each year by the Joint Policy Board for Mathematics to recognize the importance of mathematics through written materials and an accompanying poster that highlight mathematical developments and applications in a particular area.
Questions or comments about this site may be directed to mamsupport