State Department Code: 1797-1866

Ministers resident in foreign countries often need to convey sensitive information and it was customary that ministers sent by the United States were provided with code to be used in correspondence with the Department of State. When Thomas Jefferson was the Secretary of State, it fell on him to provide code to ministers abroad (see another article). When George Washington decided not to run for a third term, Jefferson ran but was defeated by John Adams.

President John Adams (1797-1801)

Rufus King (England)

Rufus King, a fervent Federalist and minister in London (1796-1803) succeeding Thomas Pinckney (see here), encoded more than 60 dispatches to the Secretary of State, beginning in January 1797 through 2 April 1803 (Weber p.153). An example is a letter of 1 June 1800 (electronic text). A letter King received in 1796 from the Secretary of State, Timothy Pickering, was written with a 1592-element code (THE=1355, WE025). (Weber p.143)

King used a simple substitution cipher (WE064) with other ministers, John Quincy Adams and William Vans Murray, as noted below.

Apparently, King took over from Thomas Pinckney the 1600-element code (THE=792, WE024) shared among ministers. He used it in a letter of 30 April 1798 to Elbridge Gerry in France (Weber p.133). On the other hand, Gerry wrote his regret that King's letter was not in cipher on 3 May 1798 (The Life of Elbridge Gerry, p.269).

King took up THE=663, which Thomas Pinckney used in writing to the State Department, and sent the code to Livingston in Paris in mid-January 1802 (Weber p.155). On the other hand, he did not leave his code for his successor, James Monroe (1803-1807) (see below).

Charles Cotesworth Pinckney, John Marshall, and Elbridge Gerry (France)

In mid-1790s, the US-French relationship was worse than ever. In September 1796, Charles Cotesworth Pinckney (elder brother of Thomas Pinckney) was appointed as minister to France succeeding Monroe but the French government refused to receive him. To ameliorate the US-French relation, the newly inaugurated President John Adams dispatched Charles Cotesworth Pinckney, John Marshall, and Elbridge Gerry to France. The commissioners used a 1593-element code (THE=954, WE023) in their voluminous dispatches to the Secretary of State (Timothy Pickering).

French intermediaries' conditions were not acceptable and the mission ended up in a failure even before the commissioners could be received by the French government. In April 1798, Adams disclosed the content of the encoded letters to the Congress, which inflamed the public opinion against France (the XYZ Affair). The commissioners returned to America one after another and the potentially compromised code fell into disuse thereafter. The last use was by Gerry in his dispatch on 13 May 1798 (Weber p.132).

Jefferson, vice President under his rival, was against Adams' hardline reaction against France and did not join the public discussions of the XYZ Affair. Of the three commissioners, Gerry was sympathetic to Jeffersonian view of foreign relations. Rufus King, the staunch Federalist then stationed in London, conveyed his concern about him to Charles Cotesworth Pinckney on 24 December 1797, and changed the cipher used between them. (Weber p.129)

Oliver Ellsworth

The XYZ Affair excited American public opinion against France and an undeclared naval war ensued. President Adams sent a new commission consisting of Chief Justice Oliver Ellsworth, William R. Davie, and William Vans Murray to France. Secretary of State Timothy Pickering, complying with Hamilton, delayed their departure and it was only in April 1800 that negotiations began. The Convention of Mortefontaine signed in October 1800 brought an end to the Quasi-War.

Ellsworth used THE=910 (WE026) in his correspondence with the Secretary of State (Timothy Pickering) during his mission in France in 1800. (Weber p.144) This code, which includes code numbers for Ellsworth (425) and Talleyrand (904) as the only two personal names, appears to have been prepared for this mission.

President Adams' decision to negotiate with France would cost him support of many Federalist leaders in the presidential election of 1800.

John Quincy Adams / William Vans Murray

William Vans Murray, minister to the Netherlands (1797-1801), used THE=536 in his correspondence with the Secretary of State (Timothy Pickering). (Weber p.140) John Quincy Adams, his predecessor in the Netherlands (1794-1797) and minister to Prussia (1797-1801) used THE=1355 (WE025) in his correspondence with the Secretary of State (John Marshall) in 1800. (Weber p.143)

In July 1798, Murray used a small code of 11 elements (WE097) in his letter to Adams. The code allowed pictorial representation as well as numerical representation. When Adams used it in September, he only used the numerical representation. (Weber p.136, 137) Somehow, in the same month (July 1798), Murray also wrote to Adams with THE=536, which he used with the State Department. (Weber p.140) Murray's commonplace book contains another simple substitution cipher with some code numbers assigned (WE035) (Weber p.133).

In September 1798, Adams provided King, minister in London, with a simple substitution cipher (homophonic with 1-100) (WE064) (Weber p.137). This was used among Adams, Murray, and King. (Weber p.607)

In December 1798, Adams provided Murray with a novel sliding cipher (WE036), which was used several times in 1799. (Weber p.140)

Reversion to One-part Code

The code of the XYZ Affair (THE=954, WE023) was a blockwise one-part code. One-part code, for which words and syllables are alphabetically ordered, is vulnerable compared with two-part code, for which ordering is random. (Thus, two-part code requires two separate tables for encoding and decoding.) With one-part code, a codebreaker who has identified some codes may guess other codes. Although THE=954 was not completely alphabetical, it consisted of alphabetical blocks. For example, codes 7-99 are assigned words and syllables "pa" - "py" alphabetically.

Examples of such partly one-part code are Dumas-Franklin-Jones code THE=840 (WE003) in 1779 (see here) and Monroe-Jefferson code THE=907 [THE=912] (WE019 / PTJ Code No.5) in 1784 (see here). While two-part code had since become the standard, somehow such wisdom of the previous generation was not employed in this code.

In Pickering-Ellsworth cipher (THE=910, WE026), ordering was more mixed but included many small alphabetical blocks. THE=968 (WE027) used by Livingston and THE=1385 (WE028) to be called Monroe's Cipher would also be blockwise one-part code (see below).

President Jefferson (1801-1809)

In the presidential election of 1800, Jefferson defeated the incumbent, John Adams. Having been vice-President under his rival, Jefferson now had his revenge and became the third President of the United States.

This election marked the beginning of Democratic-Republican rule under three Virginian presidents. In the next election of 1804, he would defeat Charles Cotesworth Pinckney. James Madison, his Secretary of State (1801-1809), would be elected as the next President (1809-1817). James Monroe, Secretary of State (1811-1814, 1815-1817) under Madison, would be the fifth President (1817-1825).

Charles Pinckney (Spain)

Jefferson appointed Charles Pinckney as minister to Spain (1801-1805). He was a second cousin of Charles Cotesworth and Thomas Pinckney and had turned away from the cousins when Thomas was chosen as minister to London. While his predecessor, David Humphreys, used THE=994, Pinckney used THE=1651 in ten letters. Use of THE=1651 to President Jefferson is seen in a letter of 24 May 1802 (see Thomas Jefferson Papers)

Robert R. Livingston (France)

Jefferson appointed Robert R. Livingston as minister to France (1801-1804). He used a 1700 element code THE=968 (WE027) in more than 45 letters to Madison, the Secretary of State.

This was a blockwise one-part code. For example, codes 101-138 are assigned to alphabetically ordered words or syllables from "confirm" to "cy". Numbers and punctuations are sequentially assigned codes 265-280. Codes 21-39 are "change" to "cant" in reverse alphabetical order. Codes 139-178 are assigned "D" to "dy" while there is one other D-section in 1301-1330 ("dal" to "det") followed by a reverse alphabetical block 1332-1350 ("dul" to "dog"), with "delegate" being an orphan assigned "181".

Apparently, President Jefferson did not have access to the code personally. When Livingston used the code in his letter to Jefferson of 2 June 1803, he had to refer to the Secretary for deciphering.

I enclose you two letters from Rob. R. Livingston. That of the 2d of June is just intelligible enough in the unciphered parts to create anxieties which perhaps the cipher may remove. I communicate them for your information, & shall be glad to receive them deciphered. I infer that the less we say about constitutional difficulties respecting Louisiana the better, and that what is necessary for surmounting them must be done sub-silentio
Jefferson to Madison, 18 August 1803

John Armstrong (France)

John Armstrong, Livingston's successor (1804-1810) used a THE=972 code in 40 letters to Madison. (Weber p.154) Letters of 4 May 1806 (here) and 30 August 1808 (Madison Papers or here) may be its examples (see their encoding).

Introduction of Monroe Cipher

Monroe's Second Mission to France

In 1803, James Monroe was sent to Paris to assist Livingston in negotiating with the French government under Napoleon Bonaparte about the purchase of Louisiana. Just before setting out from New York, Secretary of State Madison sent him a code (WE028; THE=1385) of 1600 elements. This code was to be used for many years thereafter and would come to be known as the Monroe Cipher.

Inclosed herewith is the cypher you are to carry with you. I send it apart from the despatches, because I shall put a few words in them into cyphers.
Madison to Monroe, 28 February 1803

As with the case in THE=968 (WE027), this was a blockwise alphabetical code. The first use of this code was for the price for Louisiana Purchase that President Jefferson was ready to accept (Madison to Monroe, 2 March 1803). (see electronic text)

Monroe reached Paris to find that Livingston had received from the French government just the day before an offer to sell the whole Louisiana territories. Napoleon had determined that Louisiana was expensive to maintain and would be likely to be taken by the British from Canada in case of war. Monroe and Livingston used THE=1385 (WE028) in their dispatch to Madison on 8 June 1803 (Weber p.155).

James Monroe (England)

After an agreement was reached about the Louisiana Purchase, Monroe was appointed minister to Great Britain (1803-1807) succeeding Rufus King. He continued to use this code (THE=1385/WE028) in his dispatches to the Secretary of State.

Some letters using cipher from this period are as follows.

Madison to Livingston, 28 May 1803 WE027

Madison to Monroe, 29 July 1803, another version WE028

Monroe to Barbé-Marbois, 20 August 1803 WE027

Livingston to Monroe, 11 September 1803 WE027

Madison to Monroe, 29 September 1803 WE028

Madison to Monroe, 16 February 1804 WE028

Madison to Monroe, 8 March 1804 WE028

Monroe to Madison, 6 July 1805 WE028

Monroe to Jefferson, 6 October 1805 p.10 contains some cipher, not decoded (WE028)

Madison to Monroe, 22 November 1805 WE028

Madison to Monroe, 10 March 1806 WE028

Madison to Monroe, 11 March 1806 WE028

Armstrong to Madison, 4 May 1806 THE=972

Madison to Monroe, 4 June 1806 WE028

Madison to Monroe, 28 November 1806, another version WE028

Armstrong to Madison, 30 August 1808 undecoded postscript presumably in THE=972

As can be seen, THE=968 (WE027) was used at least once in Livingston-Monroe correspondence (but apparently not thereafter; see the next section) and once in Monroe's letter of 20 August 1803 to Barbé-Marbois, French Minister of the Treasury, preserved in Papers of James Madison. (The latter may be a copy intended for Livingston or Madison. A copy enclosed in a letter from Monroe to Madison, 31 August 1803, is preserved in DNA [National Archives, Washington, D.C.]: RG 59 [General Records of the Department of State], Dispatches from Great Britain (Papers of James Monroe, vol.5, p.112, n.3).)

Rufus King also used THE=1385/WE028 in his letter to Madison in July 1803, after he returned from London. By some accident, however, this letter was sent with the code numbers written over the plaintext (Weber p.157).

Monroe-Livingston Correspondence

Difficulty arose when Livingston needed to send secret information to Monroe. He asked Monroe if he had Rufus King's cipher on 9 September 1803. Probably, he meant THE=663, which he had used in his correspondence with King. (Somehow, Livingston's letter to Monroe on 11 September 1803 is encoded in WE027.)

Due to unexpected delay in delivery of letters (Monroe to Livingston, 29 October 1803), Livingston had to repeatedly ask the same question on 25 September and 8 October. On 28 October 1803, Livingston forwarded some letters written in Monroe's code but did not forward a letter from James Madison that approved the Louisiana treaty because he did not know whether Monroe could read it. Actually, Monroe had replied on 9 October that King had not leave for Monroe the code but the letter had not reached Livingston in time.

Monroe counted on arrival of a new secretary for preparing a new code but found out that the secretary could not spare time for that.

I have no cypher but will make one when Mr Purviance arrives & send it to you.
Monroe to Livingston, 29 October 1803
The cypher is not yet arranged: it is a difficult affair to make one; and having been long without a secretary, Mr Purviance's close engagements have rendered it impossible for him to form one. Col. Livingston intimated that he had one to correspond with you while here. If it will answer I will obtain it of him.
Monroe to Livingston, 13 January 1804

Apparently, Charles Pinckney in Spain provided a code that he used with Livingston (Charles Pinckney to Monroe, 22 February 1804). Pinckney himself had complained lack of cipher for correspondence with Monroe (Charles Pinckney to Monroe, 14 November 1803)

I shall certainly write you whenever I have an opportunity, especially as I can do with less risque by the cypher [brought] me by Mr. Graham.
Monroe to Charles Pinckney, 13 April 1804

Livingston's successor, John Armstrong had a problem in corresponding with Monroe. On 7 July 1807, he wrote that he could not read Monroe's letter because the cipher was incorrect.

William Pinckney (England)

Monroe's successor in London, William Pinckney (1807-1811), used the Monroe Cipher for one name, "Mis-ter Per-ci-val" (134 1379 1123 1028 454), on 24 January 1808 (Madison Papers; Weber p.156).

President Madison (1809-1817)

John Quincy Adams, James A. Bayard, and Albert Gallatin (THE=1385, WE028)

Under President Madison, the State Department continued to use the Monroe Cipher (THE=1385, WE028) under the two Secretaries of State: Robert Smith (1809-1811) and Monroe himself (1811-1814).

Smith used this code in writing to John Quincy Adams, stationed in St. Petersburg, on 11 November 1809. Adams sent a large volume of messages encoded in this code between November 1809 and May 1814.

A draft shows President Madison used this code when he wrote on 2 August 1813 to Albert Gallatin, who had been dispatched to negotiate a peace of the War of 1812 (see Madison Papers).

The peace commissioners appointed by President Madison were John Quincy Adams, minister in St. Petersburg (1809-1814), James A. Bayard, and Albert Gallatin. Secretary of State Monroe wrote in a letter of 26 April 1813 to Adams that Gallatin and Bayard had been given the same cipher as Adams.

Joel Barlow (France)

Joel Barlow, minister to France (1811-1812) succeeding John Armstrong, also used code in writing to Monroe, Secretary of State.

Barlow was negotiating with the Napoleon government about a commercial treaty with indemnity provisions for damages caused to American vessels by the French. He was alarmed by President Madison's threat to break with France. Barlow proposed some compromise but it was hardly acceptable to Madison or Monroe (Richard Buel Jr. (2011), Joel Barlow: American Citizen in a Revolutionary World, p.356-357). In reply to Madison's letter of 11 August 1812, Barlow wrote a partially coded letter (key not found) to the President on 26 September 1812 (image, decoded text), warning against a possibility of Anglo-French cooperation against America (the War of 1812 had started). The French decipherer decoded most of the coded portions, including the names of two French officials, Cambacérès and Talleyrand, who supported his proposals, which he made a point of asking the President to keep secret (Kahn p.187). These exchage used a THE=1700 code.

In late 1812, Barlow left Paris to talk with Napoleon at his winter quarters in Vilna. However, Napoleon's Russian campaign turned out to be a disaster and Napoleon was retreating from Moscow. On his way back to Paris, Barlow died of pneumonia in December.

There arose a dispute between his nephew, Thomas Barlow, and David Warden as to which should be the legitimate chargé d'affaires and the French government recognized Warden as the American representative. Warden demanded that he take over the official cipher but the widow refused unless a duly authorized representative was designated. Thomas Barlow used a THE=1700 code in reporting these to Monroe (Thomas Barlow to Monroe, 10 February 1813).

William Crawford (France)

William Crawford, minister to France (1813-1815), who officially succeeded Barlow, used code extensively (Weber p.186). He used the Monroe Cipher in his lengthy dispatch of 3 September 1813 (Weber p.156) and he also used it on 8 June 1814 in writing to the peace commissioners in Ghent (Weber p.187).

Monroe's letter of 8 February 1814 to Crawford tells he forwarded a code for use in writing to the State Department and to the peace commissioners. (A comprehensive catalogue of the correspondence and papers of James Monroe)

George William Erving (Spain) (THE=951, WE026)

George William Erving, chargé d'affaires after recall of Pinckney (Weber p.152-153), used the same THE=1651 code as Pinckney. Erving left Spain in 1810 but President Madison officially appointed him minister in Spain in 1814, when Spain was freed from the Napoleonic rule and King Ferdinad was reinstated. The letter of Monroe, then Secretary of State, enclosing his commission was written partly in cipher ("Diplomatic Services of George William Erving").

During Erving's absence, Anthony Morris coveted the post of the official minister in Spain. Morris used a THE=285 code. He was so secretive that he even put his signature in code (for example, Morris to Monroe, 27 January 1815 (Weber p.191)).

Erving, appointed minster to Spain in 1814, received a new code, THE=951 (WE026), from the State Department. Actually, the code was not new and had been used by Oliver Ellsworth in 1800. As early as 5 December 1814, he wrote from Paris to Monroe that he had not yet received code. When the expected code arrived, however, it caused him much frustration. In a letter of 31 August 1816 to Monroe, he included code and plaintext and closed with an eruption of vexation: "This letter is in the cypher brought by W. Smith; but I have found a great many mistakes in it. They are corrected. We have examined all the figures with great care so that in this letter there is no mistake -- tho the decypherer will have some difficulty if the original of my cypher is as imperfect as the copy sent me."

Albert Gallatin (France) (THE=951 WE026)

THE=951 (WE026) was also used by Gallatin in Paris. After contributing to the Peace of Ghent in 1814 that concluded the War of 1812, Gallatin remained in Europe and was appointed minister to France (July 1815-May 1823). On 15 April 1816, Monroe forwarded him the code with passports for Gallatin and his family. As with Erving, he found the code incomplete (Gallatin to Monroe, 3 May 1816). He still used the code throughout his office (1816-1823).

President Monroe and Thereafter (1817-1841)

Richard Rush, Albert Gallatin (England)

Gallatin's successors in France never used code in their dispatches (Weber p.193). With the end of the wars in Europe, use of code by US ministers in Europe diminished drastically not only in volume but also in variety. After 1814, the Monroe Cipher was used almost exclusively by American foreign ministers.

The minister in London, Richard Rush, used the Monroe Cipher (THE=1385, WE028) in several lengthy dispatches to the Secretary of State, John Quincy Adams, from 1818 to 1821. After this, American ministers in London never used code in dispatches to the State Department, except one letter written by Gallatin on 24 August 1827. (Weber p.201-203)

Ministers in Spain

About the same time, the minister in Spain, John Forsyth, also used the Monroe Cipher in his dispatches to John Quincy Adams on 19 June 1819 and 20 November 1822. In the latter, he reviewed in detail the status of the Spanish colonies overseas. The code was also used by his successor, Hugh Nelson, in February 1824 and then by Nelson's successor, Hill Everett, in September 1825.

After absence of encoding from Spain in the 1830s, an American chargé d'affaires, Aaron Vail, still used the same code in April 1841. The British government obtained a copy of the letter but the Decyphering Branch could not locate the key for this almost forty-year-old code among its papers but could produce a partial reconstruction from the despatch in code and plaintext obtained from an informant (Weber p.210, Kahn p.187).

Ministers to Mexico (1825-1847)

Monroe Cipher in Mexico

As peace was restored in Europe, a turmoil was brought up in Mexico. Joel R. Poinsett, the first American minister to Mexico (1825-1830) (and an amateur botanist who discovered poinsettia), used the Monroe Cipher.

His successor Anthony Butler (1830-1835) also used the code. One issue at the time concerned Texas, which would become independent in 1836. However, the Monroe Cipher, prepared in 1803, did not include a code for "Texas" and it had be spelled with syllables: 1372(te) 651(x) 692(as). Butler also used a private cipher. Weber (p.212, n.31) considers this may have been similar to a 660-element code used in 1780s (see here).

The next American minister, Powhatan Ellis continued using the code in 1836 and 1839.

Trist's Passage Cipher (WE104)

In 1847, Nicholas Trist was sent to Mexico for negotiations to end the Mexican-American War (1846-1848). On 3 June 1847, he wrote from Pueblo to the Secretary of State, James Buchanan, and proposed a cipher, which enciphers letters of the alphabet with numbers as follows:
t  h  e  s  t  u  d  y  o  f  f  o  r  e  i  g  n
1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17

 l  a  n  u  g  a  g  e  s  a  f  t  e  r ...
18 19 20 21 22 23 24 25 26 27 28 29 30 31 ...

This was a passage cipher on the same principle as Dumas' cipher (see here). That is, by numbering the letters of some passage agreed between the correspondents, the cipher table can be reconstructed. In this example, the letter "t" can be enciphered as "1", "5", "29", .... In order to share the passage to be used, Trist explained as follows:

A duplicate & key can be made at the Department by sending to my daughter for a copy of the smallest of the books (there are several at my house) which she packed up for me: the work of our old instructor, who was sent to Spain as Consul. Let the address of the prefatory address To the British Nation (excluding this title) be numbered, from one onward until every letter of the alphabet is reached, except Z (which I represent by zero).
Trist to Buchanan, 3 June 1847

Trist used this cipher in the following months.

Monroe Cipher Forever (1848-1876)

The American minister in Spain, Romulus M. Saunders, used the Monroe Cipher on 17 November 1848, when he had to use the Spanish post instead of a courier. This would be the last of use of diplomatic code before the Civil War (Weber p.210).

Notwithstanding, American diplomatic legations abroad appear to have been provided with the code. On 23 November 1866, after the Civil War, Secretary of State, William H. Seward, used the Monroe Cipher in his message to John Bigelow, minister to France. This was the first American diplomatic message in code that was sent by telegraph. (Weber p.216) Since telegraph did not support transmission of digits, code numbers had to be spelled out for cabling: "1424" as "fourteen twenty six" and "569" as "five sixty nine" (Weber p.217). This resulted in inflation of the cable charge because, occasionally, from fifteen to twenty letters were necessary to express a single letter of the code (Weber p.219).

On 1 December 1866, Charles Francis Adams in London also used the Monroe Cipher in a secret message to Seward.

These were about the last use of the Monroe Cipher prepared in 1803. The cost of cabling messages in such a code turned out to be prohibitive and a code more suited to cablegrams was devised in early 1867 (Weber p.219).

The new State Department code (WE029) represented words or syllables with one to three alphabetical letters instead of a number. This code was used until 1876, when 5-letter groups became the basic code format.

©2009 S.Tomokiyo
First posted on 15 November 2009. Title corrected on 21 March 2014. Last modified on 1 September 2015.
(Some of the content of this article has been moved from another article.)
Articles on Historical Cryptography
inserted by FC2 system