Thomas Jefferson was one of the first to foresee American independence from the British Crown and, at thirty-three, drafted the Declaration of Independence in 1776. During the Revolutionary War, he was elected Governor of Virginia (1779-1781) but ended up in showing that he was not a wartime leader.
After resignation, he lived a retired life with his family and wrote Notes on the State of Virginia.
After the death of his beloved wife, Martha, the Congress appointed Jefferson as an additional peace commissioner in November 1782. Robert R. Livingston, Secretary of Foreign Affairs, thought of offering a position of his successor or a commissioner in Spain succeeding John Jay instead of the mission in Paris and asked James Madison to find out Jefferson's mind. Madison, Jefferson's fellow countryman from Virginia and residing in Philadelphia as a Virginia delegate to the Congress, wrote to Edmund Randolph in Virginia and asked him to find out Jefferson's response (2 and 3 December 1782). The substantial part of this letter was written in Virginia Delegates' official code (WE015) and Madison said he did not write to Jefferson directly because of "want of a cypher with him".
When Jefferson came to Philadelphia, he provided Madison with a book code. When he went over to Baltimore to set sail, however, the news of the provisional peace treaty came and his foreign mission was cancelled.
The book code was based on Thomas Nugent's New Pocket Dictionary of the French and English Languages (1774). A word was to be encoded by the column and the line in the column where the word occurs. For example, "a" was encoded as 1.1 and "the" as 816.27.
The edition had no pagination and Jefferson and Madison numbered the pages in the margin themselves. Apparently, their numbering was not consecutive and some numbers were skipped occasionally. For example, page numbers 61-79 were skipped (15 numbers skipped). Thus, "balance" was encoded as 60.27 while "basis" [conjectured reading by PTJ] was 80.15. Similarly, 8 numbers were skipped between "basis" 80.15 and "be" 89.1. (cf. Weber p.71)
A few days after Jefferson left Madison in Philadelphia, Jefferson used this code for the first time in a letter from Baltimore on 31 January 1783.
Apparently, Jefferson and Madison had arranged some special ordering of page numbers to be used. Somehow, they used the page numbers in order rather than "as concerted" and this helped editors in later generations.
Madison also started to use the code. In his letter of 11 February, he encoded a passage reporting that a letter to the Congress from John Adams showed "his vanity, his prejudice against the French Court & his venom against Doctr. Franklin." The rest of the letter was in plaintext because "Other preparations for the post do not allow me to use more cypher at present."
It is clear that use of code/cipher was not only against prying eyes of foreign spies but also for protecting sensitive remarks from jealousies of fellow Americans.
In reply to Madison's letter of 11 February, Jefferson wrote in code on 14 February, "I am nearly at a loss to judge how he [Adams] will act in the negotiation. He hates Franklin, he hates Jay, he hates the French, he hates the English." Madison had trouble in decoding this letter. Madison's decoding had "has" in place of "hates", which made no sense in the context. Madison's reading, though including other errors and omissions, was long followed in publications until corrected by PTJ.
Book code is handy in that one need not prepare a code list but, in use, it involves a lot of trouble in counting the lines. Jefferson and Madison soon stopped using this code.
From April 1783 to May 1785, a numerical code of 1-1107 was used in numerous letters between Jefferson and Madison.
The first use of this code on 14 April 1783 was quite personal in nature. In encouraging Madison's courtship, Jefferson wrote in code "as I know it will render you happier than you can possibly be in a single state, I oft made it the subject of conversation, more exhortation, with her and was able to convince myself that she possessed every sentiment in your favor which you could wish."
Soon after this code came into use, in June 1783, Congress was threatened by some 300 mutinous soldiers and it was resolved to remove from Philadelphia to Princeton. In this turmoil, Madison apparently left his code behind. The code was missed when he reported the disposal of the mutineers to Jefferson.
Madison used this code in a letter as late as 20 August 1785, in which he acknowledged receipt of Jefferson's letter of 18 March 1785, which notified him of a new code (THE=812 / PTJ Code No. 9 / PJM JM-Jefferson Code No. 2 / WE018).
When Jefferson was appointed a peace commissioner, he offered a young James Monroe an opportunity to accompany him to France. On 8 February 1783, still believing Jefferson would sail from Baltimore, Monroe sent him a small code of 99 elements.
Jefferson does not appear to have ever used this code.
Monroe used this code in a letter to Madison on 15 November 1784, 18 December 1784, and 1 February 1785 (Weber p.72).
Madison then proposed to Monroe a new 1-660 code WE014 on 12 April 1785. Its use includes Monroe to Madison, May 1785; Monroe to Madison, 31 May 1786; and Madison to Monroe, 21 June 1786.
The session of the Continental Congress from November 1783 to June 1784 was held in Annapolis, for which Monroe was elected as one of the Virginia delegates. It was also in this session that George Washington resigned his commission as commander-in-chief of the Continental Army in December 1783.
It was decided to send Jefferson to Paris to assist Franklin and John Adams in drawing up treaties of commerce (for which Jefferson drafted the instructions himself.)
When Jefferson left Annapolis to Philadelphia to make arrangements for crossing the Atlantic, Monroe was preparing a cipher for use between them.
When Monroe was to enclose it for Jefferson, however, he found a problem. But he did not have time to finish it. He was leaving for Germantown on that day. Young Monroe was given a first important role as a member of the committee to inspect a possible site for the capital. Thus he left the matter to a clerk.
Thus, Monroe's code was enclosed in a letter of 21 May 1784 from Samuel Hardy to Jefferson. It was a code of some 1100 elements.
The first use of the code was in Monroe's letter of 25 May 1784, in which some key words such as "Maryland" or "indecent conduct" were written in code.
Monroe, however, found the code to be unpractical.
Monroe did not mean any defect of the code itself. Rather, he had only the code list arranged for decoding (i.e., in the order of code numbers) and not one for encoding (i.e., in alphabetical order).
His inconvenience, however, must have been minimal because this code was basically a one-part code. That is, the sequential code numbers were each assigned words etc. in alphabetical order, though the ordering of the blocks under common initial letters was partially changed (i.e., word beginning with D came first, followed by F, G, H, C, A, B, E, ...). This type of code was less secure against cryptanalysis than two-part code, in which code numbers are assigned words etc. in random order.
As it turned out, lack of a separate encoding sheet was not the only problem with Monroe's code. With all his efforts, Jefferson could not decode Monroe's letter. After interlining decodings, Jefferson found it did not make sense. The original manuscript shows the first decodings struck out and the correct reading written beside them. However, it was only after many months of frustrations that Jefferson could solve the puzzle.
In the first place, not until Jefferson settled down in Paris after a comfortable transatlantic passage which was "remarkably short, being only 19 days from land to land", did Jefferson find the problem. Jefferson waited until after Monroe came back to Congress, this time convened at Trenton, from a westward travel before he informed Monroe of the problem.
Ignorant of the trouble, Monroe continued to puzzle Jefferson by using the code extensively on 1 November 1784 in reporting his westward travel to Jefferson and also on 14 December 1784.
Monroe had enclosed with his letter of 20 July 1784 a new code, THE=7 (WE020).
Jefferson received the code at the end of November by Short, soon to be his private secretary, who arrived in Paris. Jefferson actually used the new code on 10 December 1784.
However, this second cipher from Monroe only exacerbated the confusion. In his attempt of decoding, Jefferson used the new code, instead of the first one which he thought wrong. When Jefferson found out Monroe's letter of 1 November was no more intelligible than before, he reported the error to Monroe.
As it happened, though Monroe's letter of 1 November was sent more than three months after he sent his second cipher (WE020, PTJ Code No.6), Monroe was still using the first cipher (WE019, PTJ Code No.5). With hindsight, this might seem obvious even from a mere fact "there are no numbers so high as" 962 and 968 in the second cipher but in the first cipher. The first cipher had some 1100 elements and the second cipher had 925. However, Jefferson knew that the first cipher had failed to decode Monroe's letters. Actually, Monroe did use the first cipher but the code table he had was an inaccurate copy. Jefferson was so desirous to read the letters that, after much effort, he succeeded in solving the puzzle. The report he sent Monroe reveals quite an achievement.
Thus, it was the copyist's error that created this "comedy of errors". (WE019 printed by Ralph E. Weber is the version in Jefferson's possession, with each line followed by a number used by Monroe. Monroe's version is designated as WE019b herein.)
Jefferson's achievement was not duly appreciated by Monroe. When he received Jefferson's letter of 11 November, in which Jefferson said he did not yet receive the second cipher, and one of 10 December, which was written with the second cipher, he wrote from New York (where Congress had moved at the beginning of the year):
Two months later, Monroe could not yet have the code he left in Virginia.
This letter implies that he received Jefferson's letter of 18 March (see below), telling him of a new code, but he made no mention of receiving the letter of February, including Jefferson's solution. Thus, Monroe's two codes fell into disuse in confusion and Monroe waited for young John Quincy Adams to bring him a new code from Jefferson.
Jefferson prepared a new code with a larger vocabulary. Compared to WE019 (PTJ Code No.5) with 1000 elements and WE020 (PTJ Code No.6) with 925, this code, containing 1700 elements, expanded the vocabulary considerably. (An earlier example of a code of this scale is WE016 by Randolph.)
It was in May that Jefferson could send the promised cipher by young John Quincy Adams.
Monroe received the code on 15 August (Weber p.104). Finally, the two men could have the common code and both continued to use it during Jefferson's residence in Paris.
The same code had been sent to Madison in Virginia on the same day as it was sent to Monroe, to replace the former code (WE017) they had been using since before Jefferson came to Paris.
This code (WE018), frequently used between Jefferson, Madison, and Monroe during Jefferson's residence in Paris, would be resumed during the years of political strife in 1790s.
Jefferson sent out another code on 11 May to John Jay, who had become the second Secretary of Foreign Affairs after long vacancy left by Livingston's resignation. The code, THE=224, was delivered by young John Quincy Adams, who also carried the code WE018 to Monroe.
As its twin, WE018 (PTJ Code No.9), this included 1700 elements. (1700 denotes "been".)
When Jefferson reported to the Secretary of prospected replacement of the French envoy in a letter of 4 February 1789 in this code, he thought the matter so sensitive that he wrote "I must beg you to take the trouble of decyphering yourself what follows."
On 14 and 18 March, he wrote down further proceedings and sent them to the Secretary with notes on 11 May 1789. According to the PTJ editors, who examined the original copies of the report in various archives, it is evident that, when Jefferson succeeded Jay as Secretary of State, "Jefferson must have found that there was no text except those in code for the letter of 4 Feb. 1789 and its three additions, and hence supplied the deficiency" by transcribing from the draft copy.
Later, Jefferson would use this code, THE=224, for correspondence with William Short and William Carmichael (here).
The year 1785, two years after the Revolutionary War ended, marked establishment of diplomatic relation between Britain and the United States. John Adams, the first American envoy residing in London, was provided by Jay with a THE=82' code (WE013) for his correspondence with the home government. (About the same time, the aged Benjamin Franklin was allowed to return to America and Jefferson succeeded him as minister to France.)
Jefferson never used this code and, when William Stephens Smith used this code in transmitting Jay's words in a letter of 30 June 1787, Jefferson, naturally, could not read it.
In a reply, Smith explained the code and his intended message.
W. S. Smith had been sent to London as a secretary to the US legation in London, where he would court and win the hands of John Adams' daughter. When he arrived in England (and before reaching London), he mentioned lack of code.
While using THE=82' code with Jay, Adams used THE=994 code with Jefferson and Franklin, American commissioners in Paris. Apparently, this code was originated on Adams' side. Adams used the code in his letters of 20 June, 18 July, and 24 July 1785. Jefferson, however, reported omissions in the encoding table of the code he received.
Jefferson took care to spell the keywords "Denmark", "disc", "gone", and "government" in code. When Adams supplied the omitted codes, he did not forget to find fault with Jefferson's use of the code.
From the manuscript of the letter of 31 July, Jefferson indeed wrote 1672 for 1072. However, Jefferson pointed out that it was an error in the encoding sheet.
Although Jefferson generally used THE=994 code with Adams, on one occasion, he used a THE=1196 code, which he "gave to Mr. Adams", in the postscript of his letter to Adams dated 28 September 1787. It is noted that this was three days after Jefferson used the THE=1196 code in his letter to Carmichael for the first time.
Jefferson envisaged THE=1196 (also termed "Barclay-Lamb code" or "Adams-TJ-Barclay-Lamb code" in PTJ) code as a common cipher to be used among the American envoys in France, Britain, and Spain and the Secretary at home. However, his attempt to send it to Carmichael in Spain was a succession of frustrations.
William Carmichael stayed in Spain from 1779 as secretary to John Jay and, after Jay's departure for Paris in 1782, as chargé d'affaires.
Jefferson, who was already using a code with Madison and Monroe, told Carmichael of his intention of sending a code (missing letters of 30 January and 3 May 1785) . In this May, Jefferson sent a new code (WE018, PTJ Code No.9) to Monroe and Madison and another (THE=224, PTJ Code No.10) to Jay. To Carmichael, however, a bearer was hard to find.
Carmichael, who had used code under Jay (see here), recognized the need to have a common cipher. In letters on 27 June and afterwards, Carmichael repeatedly urged the need of a code. When Carmichael received Jefferson's letter of 22 June, he suggested sharing a common cipher with Adams in London.
Jefferson acknowledged his point when he next found a person going to Spain.
However, this John Lamb, being sent by Congress to be an envoy in Algiers, would turn out to be an unfortunate choice. Though he arrived at Madrid on 4 December, he failed to hand the code to Carmichael. During his stay in Madrid for almost two months, he did not even let Carmichael copy his. Carmichael reported the situation after Lamb left for Africa.
Soon Thomas Barclay arrived at Madrid on 10 March for preparation for his mission in Morocco. When Carmichael found that Barclay did not have the code Lamb said he should have, neither Carmichael nor Barclay made any noise over it. Jefferson, when acknowledging this report after returning from two months' visit to England (5 May), said nothing about Lamb's explanation, either. Actually, dissatisfied with the proceedings at Algiers, he soon recommended recall of Lamb. Lamb returned to Spain and stayed in Alicante on the southeastern coast of Spain.
Somehow Carmichael no longer complain of lack of code and attributed his silence on sensitive topics to the attitude of Jefferson's own silence (15 July 1786).
To this, Jefferson only wrote that he was not yet sure if Carmichael received the code from Barclay.
Acting upon this, Carmichael turned to Lamb, "expressing a wish ... of having the original of the paper in question to be sent to me by a safe conveyance". This resulted in no success.
In contrast with Lamb's failure, Barclay was successful in Morocco. Barclay sent his secretary, Colonel David Franks, ahead with treaty documents. Barclay himself reached Madrid in early November 1786. Thus, finally, Colonel Franks brought the code to Carmichael (see the note of PTJ on p.177, which provides detailed analysis of the proceedings).
Somehow, however, Carmichael did not use the code until almost a year later. Nor did he mention that now he possessed of the code he had so wanted. Thus, Jefferson felt Lamb needed a push from him.
Lamb, now formally recalled by Congress, refused to hand over the code.
Carmichael's silence and Lamb's intransigence induced Jefferson to broach the subject to Carmichael again. (The PTJ Editors conjecture that Jefferson may have learned from Barclay that Carmichael had received a copy from Franks (PTJ p.178).)
Only on receiving this, Carmichael admitted his possession of the code he received from Colonel Franks, albeit in an impassive tone.
Thus, more than two years after Jefferson decided to send Carmichael a code, he could use the code in his letter of on 25 September 1787. However, this was not the end of the story. Carmichael could not decipher Jefferson's letter with the code in his hands!
Carmichael reported the problem to Jefferson.
In order to allow Carmichael to verify the code, Jefferson encoded three lines from his past letter.
Though Carmichael received this letter on the 26th of December, Carmichael spent many weeks working on the cipher and it was only in next April that he responded to this.
As Carmichael explained himself, he only made some trivial use of the code, including 223 [Massachusetts], 278 [majority], and 597 [you]. (Readings in brackets are conjectures by PTJ.)
Jefferson confirmed that Carmichael was right in saying their codes "do not correspond" in his letter of 3 June (see below). PTJ designation Code No. 11 is reserved for the original Adams-TJ-Barclay-Lamb code, while the wrong version is given Code No.13.
Meanwhile, Jefferson had sent Carmichael a new copy of the code.
At last, Carmichael could use the code substantially in his letter of 8 May 1788.
Ten days later, Carmichael would entrust with the bearer from Jefferson the code that he received from Franks, now of no use.
Even with the new copy of the code, however, it was not without trouble. In the above quotation of Carmichael's letter of 8 May, the passages in italics were written in code and interlinearly decoded by Jefferson, with some minor modifications by the PTJ editors (shown in brackets [ ]). The code numbers left undecoded in the above quotation require some explanation.
For the sequence 1077 1097, Jefferson wrote plaintext "never :", which does not fit the context. Carmichael may have failed to delete 1077, an error for 1097, and simply meant ":".(PTJ)
The sequence "1237 1509 950 1509 694 861" also resulted in a garbled decoding: "an ral fical ral owl e" (This transcription is taken from PTJ). Jefferson tried possible corrections for the written codes, such as "1508 of" for "1509 ral" but could not solve the puzzle by himself.
At least, Jefferson could feel sufficiently sure to use the code in some subsequent portions of this letter. (Carmichael also started to regularly use the cipher (e.g., 29 May, 5 June).)
In responding to this, Carmichael did not give the decoding Jefferson asked for, which is given by PTJ as: "I have no advice of an official nature [from] America for many months."
It is interesting to note that this letter, which employed the code now shared with Jefferson, includes a null use of the code. There appears at one point a code sequence 707. 1555. 959. 1371. 1611. Jefferson correctly decoded this as "4. yet 8. Tunis Mr. Barclay." This sequence, apparently carrying no information in the context, may have been inserted for distraction. Carmichael occasionally made such use of a code (PTJ).
In October 1789, after five years' activities in Europe, Jefferson sailed for America and, in March next, he was sworn in as Secretary of State of the Washington administration under the new Constitution. Jefferson continued to use this code in writing to Carmichael (11 April 1791).