Thomas Jefferson Papers

To Thomas Jefferson from Robert Patterson, 19 December 1801

From Robert Patterson

Philadelphia Decr. 19th. 1801


The art of secret writing, or, as it is usually termed, writing in cypher, has occasionally engaged the attention both of the states-man & philosopher for many ages; and yet I believe it will be acknowledged, by all who are acquainted with the present state of this art, that it is still far short of perfection. A perfect cypher, as it appears to me, should possess the following properties.—

1. It should be equally adapted to all languages.

2. It should be easily learned & retained in memory.

3. It should be written and read with facility & dispatch.

4. (Which is the most essential property) it should be absolutely inscrutable to all unacquainted with the particular key or secret for decyphering.

I shall not enter into a tedious detail of the various systems of secret writing that have been, or are still in use,1 or point out their several defects; but shall immediately proceed to lay before you a system which, I flatter myself, will be found to possess the above requisites, in as great a degree as can reasonably be desired. For 1st. it is equally applicable to all alphabetical languages. 2d) it may be learned by any person of moderate capacity in ten minutes; so that he shall be as expert in the use of it, as one who may have practised it for many years. 3d) it may be written and read with nearly the same facility and dispatch as common writing. & 4thly it will be absolutely impossible, even for one perfectly acquainted with the general system, ever to desypher the writing of another without his key.

In this system, there is no substitution of one letter or character for another; but every word is to be written at large, in its proper alphabetical characters, as in common writing: only that there need be no use of capitals, pointing, nor spaces between words; since any piece of writing may be easily read without these distinctions.

The method is simply this—Let the writer rule on his paper as many pencil-lines as will be sufficient to contain the whole writing—Then, instead of placing the letters one after the other, as in common writing, let them be placed one under the other, in the Chinese manner; namely, the first letter at the beginning of the first line, the second letter at the beginning of the second line, and so on, writing column after column, from left to right, till the whole is written.

This writing is then to be distributed into sections of not more than nine lines in each section, and these are to be numbered 1. 2. 3 &c 1. 2. 3 &c (from top to bottom).2 The whole is then to be transcribed, section after section, taking the lines of each section in any order at pleasure, inserting at the beginning of each line respectively any number of arbitrary or insignificant letters, not exceeding nine; & also filling up the vacant spaces at the end of the lines with like letters.

Now the Key or secret for decyphering will consist in knowing—the number of lines in each section, the order in which these are transcribed, and the number of insignificant letters at the beginning of each line—All which may be briefly, and intelligibly expressed in figures, thus—

5 8 } The first rank of figures expressing the number and order of the lines in each section, and the 2d rank, the number of arbitrary letters at the beginning of each respective line
7 1
3 3
4 9
8 3
1 4
6 2
2 0

For example, let the following sentence be written in cypher according to the above key

“Buonaparte has at last given peace to Europe! France is now at peace with all the world. Four treaties have been concluded with the chief Consul within three weeks, to wit, with Portugal, Britain, Russia, and Turkey. A copy of the latter, which was signed at Paris on Friday, we received last night, in the French Journals to the nineteenth. The news was announced, at the Theatres on the sixteenth, and next day by the firing of cannon, and other demonstrations of joy.”

First Draft.

1 b i n l e i h t s h e e e n a e e a r 2 u v c l s t i h i e d c f i n s x n a 3 o e e t h h n p a l a e r n n o t n t 4 n n i h a t t o a a t i e e o n d o i 5 a p s e v h h r n t p v n t u t a n o 6 p e n w e e r t d t a e c e n h y a n 7 a a o o b c e u t e r d h e c e b n s 8 r c w r e h e g u r i l j n e s y d o 1 t e a l e i w a r w s a o t d i t o f 2 e t t d n e e l k h o s u h a x h t j 3 h o p f c f e b e i n t r t t t e h o 4 a e e o o c k r y c f n n h t e f e y 5 s u a u n o s i a h r i a e h e i r 6 a r c r c n t t c w i g l n e n r d 7 t o e t l s o a o a d h s e t t i e 8 l p w r u u w i p s a t t w h h n m 1 a e i e d l i n y s y i o s e a g o 2 s f t a e w t r o i w n t w a n o n 3 t r h t d i w u f g e t h a t d f s 4 g a a i w t i s t n r h e s r n c t

Transcribed in cypher-

w s a t a i s p a p s e v h h r n t p v n t u t a n o e a a o o b c e u t e r d h e c e b n s b v a t d e p d n o c h n o e e t h h n p a l a e r n n o t n t u t i o h n e m e y e e s a n n i h a t t o a a t i e e o n d o i r t l r c w r e h e g u r i l j n e s y d o t h d s e a r s e e o b i n l e i h t s h e e e n a e e a r t a n r m a r p e n w e e r t d t a e c e n h y a n o a b i u v c l s t i h i e d c f i n s x n a h o n y l e n r f s d t r o d i e s u a u n o s i a h r i a e h e i r p s t o e t l s o a o a d h s e t t i e u a h r d c i u y f t s h o p t3c f e b e i n t r t t t e h o r e o y p u p o r t e r e p i a e e o o c k r y c f n n h t e f e y o t l r l p w r u u w i p s a t t w h h n m e n t e r r e t e a l e i w a r w s a o t d i t o f n g e w h a r c r c n t t c w i g l n e n r d h f o w s h e t t d n e e l k h o s u h a x h t j o r u i y i s a u t r h t d i w u f g e t h a t d f s l t m a d t r o d i i e g a a i w t i s t n r h e s r n c t n o n o a e i e d l i n y s y i o s e a g o d l l m n s f t a e w t r o i w n t w a n o n s y o u r c h

It will be proper that the supplementary letters, used at the beginning and end of the lines, should be nearly in the same relative proportion to each other in which they occur in the cypher itself, so that no clue may be afforded for distinguishing between them and the significant letters4

The easiest way of reading the cypher will be, after numbering the lines according to the key, and cancelling the arbitrary letters at the beginning of the lines, to cut them apart, and with a bit of wafer, or the like, stick them on another piece of paper, one under the other, in the same order in which they were first written: for then it may be read downwards, with the utmost facility—

On calculating the number of changes, and combinations, of which the above cypher is susceptible, even supposing that neither the number of lines in a section, nor the number of arbitrary letters at the beginning of the lines, should ever exceed nine, it will be found to amount to upwards of ninety millions of millions*, nearly equal to the number of seconds in three millions of years—! Hence I presume the utter impossibility of decyphering will be readily acknowledged—

I shall conclude this paper with a specimen of secret writing, which I may safely defy the united ingenuity of the whole human race to decypher, to the end of time—but which, however, by the help of the key, consisting of not more than eighteen figures, might be read, with the utmost ease, in less than fifteen minutes—

lonmnhxtednywsnfedtaysirrarersmngnnmbotititslrrrriswmyst haebyhcstfhudnoeiltttnjtutnasdoggolrraahtouoanipstormno

I shall take the liberty of presenting this through the hands of Mr. Daniel T. Patterson, a young gentleman of the navy, who has for some time, I trust not unprofitably, been engaged, under my care, in the study of navigation, and other parts of practical mathematics.

I am, Sir, with the greatest respect and esteem, Your most obedient Servant

Rt. Patterson

RC (DLC); address clipped; addressed: “Thomas Jefferson Esqre President of the American Philosophical Society City of Washington […]vd. by […]nl. T. Patterson”; endorsed by TJ as received 25 Dec. and so recorded in SJL; also endorsed by TJ: “Cyphers.”

Let the Following Sentence be Written in Cypher: to demonstrate the process of encipherment, Patterson used the opening lines of a piece that originated in the True Briton, a British publication, in October 1801 (Walpole, N.H., Farmers’ Museum, or Literary Gazette, 22 Dec.).

France and Turkey—the Ottoman Empire—signed articles of peace in Paris on 9 Oct. (Parry, Consolidated Treaty Series description begins Clive Parry, ed., The Consolidated Treaty Series, Dobbs Ferry, N.Y., 1969–81, 231 vols. description ends , 56:227–30).

Specimen of Secret Writing: by applying the statistical technique of maximum likelihood analysis to letter sequences, Lawren Smithline of the Center for Communications Research unscrambled the passage that Patterson considered to be indecipherable (Lawren M. Smithline, “A Cipher to Thomas Jefferson,” American Scientist, 97 [2009], 142–9). The passage consists of the opening lines of the published version of the Declaration of Independence, beginning “in congress july fourth one thousand seven hundred and seventy six” and ending “let facts be submitted to a candid world.” Patterson made several errors in the encipherment as he transposed the text, such as writing the wrong letter, repeating a letter, or placing a letter on the wrong line. The key that Patterson used to encrypt the text, according to Smithline’s decipherment, was

1 3
3 4
5 7
6 5
2 2
7 8
4 9

(presented in the form Patterson used for another key in the letter above). The figures in the left column indicate the order in which the lines of each seven-line section of the passage would be rearranged (1, 3, 5, 6, 2, 7, 4), and the right column shows the number of random letters added to the beginning of each line. Patterson obviously believed that a passage enciphered using his system could never be read without the key, basing his defiance of the united ingenuity of the whole human race on his calculation of the chances of guessing the key. The Editors have found no evidence that TJ attempted to decipher the passage.

In addition to his classes at the University of Pennsylvania, Patterson taught “practical mathematics,” arithmetic, and bookkeeping. Daniel Todd Patterson, the young gentleman of the navy, was not related to him. Daniel, who was 15 years old in December 1801, was a son of John Patterson—and, therefore, a brother of the William Patterson whom TJ appointed commercial agent for L’Orient. Daniel joined the navy at the age of 13 and received a midshipman’s warrant in August 1800. He remained a naval officer until his death in 1839 (Edward Potts Cheyney, History of the University of Pennsylvania, 1740–1940 [Philadelphia, 1940], 134; ANB description begins John A. Garraty and Mark C. Carnes, eds., American National Biography, New York and Oxford, 1999, 24 vols. description ends , 17:134; Vol. 35:664).

1Preceding eight words interlined.

2Words in parentheses interlined. Closing parenthesis and period supplied by Editors.

3Thus in MS, but this letter should be “f.”

4Patterson first wrote “between the arbitrary and significant letters” before altering the passage to read as above.

Authorial notes

[The following note(s) appeared in the margins or otherwise outside the text flow in the original source, and have been moved here for purposes of the digital edition.]

* Equal to the sum of all the changes on any number of quantities not exceeding nine, multiplied by the ninth power of nine.

Index Entries