James Lovell as a Codebreaker

James Lovell, a leading member of the Committee of Foreign Affairs and an expert in cryptography, was active in deciphering British secret communications around the time of the Yorktown Campaign in 1781.

Substitution by 10-39

On 25 August 1781, Nathaniel Greene, commanding the southern army, had forwarded two intercepted letters in cipher. It took Lovell only a few days to decipher them after they reached Congress on 17 September. On 21 September, Lovell reported his results to Greene and Washington.

You once sent some papers to Congress which no one about you could decypher. Should such be the case with some you have lately forwarded, I presume that the result of my pains, herein sent, will be useful to you. I took the papers out of Congress; and I do not think it necessary to let it be known here what my success has been in the attempt. For, it appears to me that the enemy make only such changes in their cypher, when they meet with misfortunes, as makes a difference of position only to the same alphabet. And therefore, if no talk of discovery is made by us here or by your family, you may be in chance to draw benefit this campaign from my last night's watching.
Lovell to Greene, 21 September 1781

It is not improbable that the enemy have a plan of cyphering their letters which is pretty general among their chiefs: if so, your excellency, will perhaps reap benefit from making your secretary take a copy of the keys and observations which I send to General Greene, through your care.
Lovell to Washington, 21 September 1781

The two letters Lovell deciphered are as follows.

Balfour to Stuart, 12 August 1781

PCC Roll 65, Page 733 (translation on Page 709)

In this, the letters of the alphabet totalling 25 (there is no "j") are substituted by code numbers 10-39 (10, 11, 20, 21, 30 are not used).

 a  b  c  d  e  f  g  h  i  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z
31 12 22 32 13 23 33 14 24 34 15 25 35 16 26 36 17 27 37 18 28 38 19 29 39


Code numbers not included in the substitution table also occur in this letter. They are nulls (baulks as Lovell called it) for distracting the interceptors. As Lovell observes, such nulls are often placed between words but sometimes within a word. Especially, double letters are often hidden by splitting such letters by a null (see "will" and "officers" in the examples given below). This has an effect of defying cryptographers who may use double letters as a clue to guess, for example, 27 18 22 22 13 27 27 stands for "success".

It is noted the cipher message is preceded by a sequence "91 45 31 60". This sequence, or rather the code "31" therein, is an indicator of the start position of the substitution table. It will be further described in the next section.

Craig to Cornwallis, 23 July 1781

PCC Roll 65, Page 703 (translation on Page 759)

The cipher used in this letter is based on the same substitution table as above with shifted mapping between the letters and code numbers. Actually, three variations are used in this single letter.

 a  b  c  d  e  f  g  h  i  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z
26 36 17 27 37 18 28 38 19 29 39 31 12 22 32 13 23 33 14 24 34 15 25 35 16
34 15 25 35 16 26 36 17 27 37 18 28 38 19 29 39 31 12 22 32 13 23 33 14 24
15 25 35 16 26 36 17 27 37 18 28 38 19 29 39 31 12 22 32 13 23 33 14 24 34


To convey the start position of the code arrangement, the letter begins with an indicator 44 57 26 61. Of these, 44, 57, and 61, which are not included in the substitution table, are nulls but 26 indicates the substitution table should start with 26.

In his letter of 21 September, Lovell attached the above substitution tables and explained the system as follows.

Balfour's letter of August 12th 1781 to Lt. Col. Stewart is by only one arrangement of the same alphabet which is used in three by J. H. Craig July 23d 1781 in his letter to Ld. Cornwallis.
...
As a variety of insignificant figures are interspersed; several of those are put in the beginning of the epistles; and among those is placed one of the essential elements; which, however, is only to show how to begin the arrangement of the numbers for use.
The same thing is sometimes practiced for the different paragraphs of the same epistle. The insignificant figures are chiefly between the Words tho sometimes between syllables and particularly to divide what are termed the double letters.

Specimen of Balfour's
91.45.31.60.37.14.13.73.13.27.22.16.17.37.75.38.24.15.95.15.63
             t  h  e     e  s  c  o  r  t     w  i  l     l

All the 93.16.23.85.90.23.24.80.22.13.17.27.80 are sent now & the
            o  f        f  i     c  e  r  s
remainder shall come 38.14.13.35.71.
                      w  h  e  n
Lovell to Greene, 21 September 1781

Lovell's deciphering proved useful for Washington at this critical juncture at least on one occasion.

My Secretary has taken a copy of the cyphers, and by help of one of the alphabets has been able to decypher one paragraph of a letter lately intercepted going from Ld Cornwallis to Sir Hy Clinton.
Washington to Lovell, 6 October 1781

Substitution by 1-29

Balfour to Cornwallis, undated

PCC Roll 65, Page 717

In the above letter of 21 September to Greene, Lovell added a postscript next day.

P.S. Sepr. 22d. With greater pain than in the cases of Balfour's & Craig's epistles, I have also succeeded to find the key of the papers which are without date, subscription or intermixture of letters, said to be "intercepted with others dated 7th of March 1781." I do not suppose it now in use; however, I send it.
Lovell to Greene, 21 September 1781

The substitution table is as follows.

 a  b  c  d  e  f  g  h  i  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z
19 09 17 13 16 07 12 08 14 15 26 04 18 21 03 02 11 05 24 29 01 25 23 22 06


Here, the 25 letters of the alphabet (there is no "j") are substituted by code numbers 1-29 (10, 20, 27, 28 are not used). (Note that, hereinafter, preceding 0s are included by the author merely for convenience of tabulation.) While this is based on the same simple substitution with table switching as above, the deciphering involved "greater pain" because the substitution table was switched more than twenty times, almost every sentence. Thus, the letter contains the following indicators.

  • 33 19 37 45 31
  • 49 32 23 40 36
  • 47 5 30 31 40
  • 45 36 43 42 9
  • 47 49 31 25 40 *Lovell notes "should be 13" by 25.
  • 32 40 25 39 41 38
  • 47 1 32 30 44
  • 49 22 30 40
  • 33 25 40
  • 42 36 11 49 30 45
  • 39 46 30 4 47
  • 46 12 47 40 33
  • 33 40 9 31
  • 39 26 40 37
  • 30 47 8 46 30 49
  • 39 13 45 31
  • 43 30 14 40 37 49
  • 30 16 33 44 37
  • 32 40 6 45 30 47
  • 44 2 49 30 42
  • 36 39 30 41 22 39
  • 49 18 37 41 35
  • 41 16 30
  • 33 35 29 46 31
  • 40 5 30 40 39
  • 49 33 17 40 49
  • 18 30 49 41 30
  • 37 40 14 35 36
  • 41 30 16 33 44
  • 36 11 39 41
  • 33 4 47
  • The first indicator shows "a" should be enciphered as "19", as shown in the above table. The second and third indicators show "a" should be enciphered as "23" and "05", respectively. Thus, the substitution table for these indicators will be as follows.

     a  b  c  d  e  f  g  h  i  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z
    23 22 06 19 09 17 13 16 07 12 08 14 15 26 04 18 21 03 02 11 05 24 29 01 25
    05 24 29 01 25 23 22 06 19 09 17 13 16 07 12 08 14 15 26 04 18 21 03 02 11


    Tables for the other indicators can be constructed similarly.

    Cornwallis to Wemyss, 7 October 1780

    PCC Roll 65 Page 529 (translation on Page 760)

    On 28 September, Lovell reported to Greene of his success on some letters Greene forwarded a year before (see below for quotation). Of these, a letter to Wemyss was based on the same table for "substitution by 1-29" as above.

     a  b  c  d  e  f  g  h  i  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z
    08 14 15 26 04 18 21 03 02 11 05 24 29 01 25 23 22 06 19 09 17 13 16 07 12


    At first sight of the letter, the system may look very different from the simple substitution as above. The letter "a" is enciphered as either 8, 38, 48, or 68, "e" as 4, 44, 64, or 74, "h" as 3 or 73, and so on. Thus, some polyalphabetic principles more intricate than switched simple substitution seem to be used.

    However, Lovell found out that for two-digit numbers not listed in the substitution table, the left-side digit is insignificant. Thus, 38, 48, and 68 have all the same value as 8.

    For the reader's convenience, single-digit codes are:

    1(o) 2(i) 3(h) 4(e) 5(l) 6(s) 7(y) 8(a) 9(u).

    Lovell's explanation is as follows.

    I have, at length, found the letters of Cornwallis to Wimys & Balfour of Octr. 7. 1780, which have been very long mislaid by one of the Delegates of Georgia.
    The cypher for the former comprehends the same course of figures with that of the papers of no date taken in March; but the deceptions are different, nor is the key-number put down, here, as there. I found it by calculation, and discovered that the unalphabetical numbers are not wholly baulks as in the cases already explained; but that the right-hand figure of them is of the same value as though it stood single.
    Lovell to Greene, 28 September 1781

    (The cipher of this Cornwallis-Wemyss letter of 7 October 1780 was independently broken by Peter P. Fagone in 1977, who reported the fact and printed the cipher with hints (not the decipherment) for the readers in 'A Message in Cipher Written by General Cornwallis during the Revolutionary War', Cryptologia, Vol. 1, No. 4, pp. 392-395.)

    Substitution by 1-25

    Lovell's letter of 28 September reported two more ciphers.

    As to the cypher for the latter (to Balfour) it is of two sorts; the first marked B is from some book, probably an edition of Entick's Dictionary agreed upon by the parties and not now in my possession, in which you are to seek 377page.2column.23word. The second is found by calculation to be a different alphabet from those already sent to you. Perhaps the letter F means the figure to begin the course, that being the 6th, but I need more samples to know that certainly. It happens to answer in the present case.
    ...
    I shall be very happy if the pains I have taken shall enable yr. secretary to make future speedy discoveries so as to save one of our own or take one of the enemy's posts, parties or escorts.
    Lovell to Greene, 28 September 1781

    Cornwallis to Balfour, 7 October 1780 ("F" cipher)

    The "second" cipher is simple substitution similar to above. Lovell's reconstruction of the substitution table is as follows.

     a  b  c  d  e  f  g  h  i  k  l  m  n  o  p  q  r  s  t  u  v  w  x  y  z
    06 05 04 03 02 01 12 11 10 09 08 07 18 17 16 15 14 13 24 23 22 21 20 19 25*

    *Lovell actually wrote "I presume 25" for "z".


    The letter was marked "F" and Lovell regarded it as an indicator of the start position of the substitution table.

    I believe F capital in the epistle either signifies that you begin with 6, F being the sixth of the common alphabet, or else that the capital whatever it may be shows where the figure 1 is to be placed. One more sample will show us.
    Lovell to Greene, 28 September 1781

    British Use of Book Code

    Cornwallis to Balfour, 7 October 1780 ("B" cipher)

    As to the "first" of the two ciphers used for Balfour, Lovell considered it was a book code based on Entick's New Spelling Dictionary.

    A book code encodes a word by the page and the line where the word occurs in a book (a dictionary is typically used because it facilitates finding a word to encode). When a page consists of two or more columns, the column is indicated by a letter ("a", "b" or "1", "2" etc.), an underline, an overdot, an overline, or the word position may be reckoned in the whole page without regard to columns.

    Interestingly, the same dictionary was used by the Americans during the Revolution. For specific examples, see another article of mine. Compared with complex versions used by John Jay, Cornwallis' use of Entick's Dictionary was straightforward.

    Lovell confirmed his conjecture two weeks afterwards.

    I gave a letter for your Excellency this morning to some gentleman who is connected with the French army, I now understand it will not reach you in eight-days, but it will reach you doubtless then. It was merely to compleat the account of the cyphers used by the enemy. I found, as I had before supposed, that they sometimes use Entick's Dictionary marking the page, column & word as 115.1.4. Tis the edition of 1777 London by Charles Dilley.
    Since I wrote that letter, I have been happy in decyphering what the President of Congress sends by this opportunity. The use of the same cypher by all the British commanders is now pretty fairly concluded.
    Lovell to Washington, 14 October 1781

    Last Minute Deciphering

    Letters from Clinton to Cornwallis

    The deciphered letters reported at the end of the above quotation were no less than ones sent by Sir Henry Clinton, Commander-in-Chief of the British forces in New York, to Lord Cornwallis in Yorktown. By late September, Cornwallis' situation was desperate. The British planned to relieve Cornwallis but the close watch kept by the Americans made it hard for the dispatch boats to get through.

    The capture of Clinton's letters was reported by Thomas McKean, the President of Congress, to Washington on 12 October.

    Sir Henry Clinton sent off three boats with despatches for Lord Cornwallis; one, named the Andre, carrying a brass six pounder in her bow, eight blunderbusses, and twenty men armed with muskets sailed on the 26th September last; the second sailed on the 28th and the third on the 1st instant: we have taken the two last, and by means of a little address and a promise of pardon to a Tory, who was intrusted with one sett of the dispatches, I found it was hid on the beach where he was taken;
    I have procured three Gentlemen of ingenuity and fidelity to proceed to little Egg harbour with the fellow, in quest of it. The beach is so extensive, and so many places like each other, that it is not yet found, tho' the man is believed to be perfectly sincere in his wishes to recover it. The Gentlemen went from this on Sunday, and I expect their return to morrow; you shall know the result as soon as they arrive. In the mean time the boat which first sailed should be looked for by the Fleet; I have written to the Presidents of Delaware and the Eastern Shore of Maryland to watch for her.
    McKean to Washington, 12 October 1781

    Two days later, McKean could report Lovell's deciphering of the captured letters. In such a feat, Lovell was helped by British commanders' tendency to use the same cipher. It has been verified by David Kahn that Cornwallis used the same cipher table (presumably, the "substitution by 1-29" as indicated herein) with the start position a=7.

    My intelligence was true; the inclosed copies of two original letters from Sir Henry Clinton to Lord Cornwallis, which I have in cyphers, and which have been faithfully decyphered by Mr Lovell (whose key I had the honor to forward to you about a fortnight ago) more than prove the fact.
    McKean to Washington, 14 October 1781

    A circumstantial description of the event is given in a later memoir of Elias Boudinot.

    Before the capture & at the first preparation for the seige before Count de Grasse arrived-General Clinton sent a row boat well manned with a confidential officer along the coast, to get into Yorktown with a letter to Lord Cornwallis, setting forth his situation and the impossibility of his relieving him with a fleet till a certain day and encouraging him to hold out till that period.
    The boat was driven on shore somewhere near Egg Harbor & the crew taken & brought to Philadelphia. One of the men discovered in private, where they were bound & that the confidential letter had been hidden under a certain large stone on the shore by the officers. A person was sent to the Place & brought it to Congress.
    It was in cipher and after some trouble it was discovered to be in three different cyphers. However it was deciphered by a Mr. Lovell, a Member of Congress from Boston, after about two days' labor.
    The original letter was carefully returned to the stone or some means used so that it finally got to Lord Cornwallis, but not before Count de Grasse' arrival and having the copy fairly translated. By this means W[ashington] was enabled to counteract all their intended measures."
    J. J. Boudinot, The Life, Public Services, Addresses, and Letters of Elias Boudinot (quoted in Letters of Delegate of Congress)

    The President's letter of 14 October further reported about the British preparation of relieving Cornwallis. Actually, it was only on 17 October that the fleet set sail. When the fleet arrived near the Chesapeake, Cornwallis had already surrendered on 19 October 1781.

    Apparently, Washington received the President's letter after this. On 20 October, he lost "not an instant" to send his ally, Admiral de Grasse, the two intercepted letters (without knowing that the President had already forwarded copies of these letters to de Grasse).

    At the time, the British forces under Clinton were expected to make a counterattack. After all, however, the victory of Yorktown effectively concluded the Revolutionary War.

    Passage Cipher

    After five years' hard working, without even visiting his wife and children in Boston, Lovell resigned in 1782. On his way home, he took a letter in cipher with him, which he "copied by desire of the gentleman at my House's" and deciphered it on the way. Though it contained little information, he reported the feat to Robert Livingston for future use (19 April 1782).

    This was a passage cipher similar to Dumas' cipher (see another article). In a passage cipher, each letter in a passage (phrase or sentence) is assigned a number sequentially.

     w  h  e  t  h  e  r   a   r  e  g  i  m  e  n  t   o  f
     1  2  3  4  5  6  7   8   9 10 11 12 13 14 15 16  17 18

     a  r  t  i  l  l  e  r  y   o  r   a   c  o  r  p  s
    19 20 21 22 23 24 25 26 27  28 29  30  31 32 33 34 35

      o  f   e  n  g  i  n  e  e  r  s
     36 37  38 39 40 41 42 43 44 45 46

    A letter is enciphered with any of the assigned numbers. Letter r may be enciphered as 7, 20, 26, 29, 33, or 45 in this example. Thus, peace may be enciphered as 34 6 30 31 10 but there could be many other ways to represent the same word.

    The passage cipher used in this particular letter used several such passages. Thus, a letter is represented by two numbers: one indicating the passage and the other indicating the letter. The passage given above is passage 16 and peace should actually be enciphered as 16-34 6 30 31 10. (Apparently, the passage number was written only at the beginning.)

    Lovell included a table of assigned numbers and explained the cipher thus: "you'll observe that there is regularity of sense in the alphabets when placed by the columns of numbers from 1 upwards".

    It is possible that these passages 1-18 are not independent but actually lines from one contiguous passage.



    ©2008 S.Tomokiyo
    First posted on 17 November 2008. Last modified on 26 August 2009.

    Articles on Historical Cryptography
    inserted by FC2 system