1409. 994. 820. 620. 240
t h a t · t h e · g o v e r n m e n t · o f
994 = the · 240 = of · 1436 = full stop

Madrid → Timothy Pickering, Philadelphia · one-part numerical code · March–August 1799 · key recovered from the clerks' decipherments of other despatches, partial

David Humphreys to Timothy Pickering, Madrid, 1799

David Humphreys
fromDavid Humphreys
Timothy Pickering
toTimothy Pickering

Go to the transcriptions ↓

Three coded passages of the American minister at Madrid that carry no decipherment, deciphered in part with his code rebuilt from the clerks' decipherments of his other despatches.

Daniel Bourdeau · posted · updated

Method: key from adjacent plaintext · Extent: partial (89% of cipher tokens valued, not the word count) · On the map

Credits · Andrew Beling (solution) · Contemporary key or decipherment (key or decipherment used) · The Papers of Thomas Jefferson (Julian P. Boyd and successors) (key or decipherment used, unpublished earlier solution) · Founders Online (The Papers of James Madison) (key or decipherment used) · Frank Landon Humphreys (earlier solution)

At a glanceKey from adjacent plaintext · partial (89% of cipher tokens valued, not the word count)

The letters
David Humphreys, American minister at Madrid, to the Secretary of State Timothy Pickering: the coded parts of despatch No. 214 (6 August 1799, 352 groups in ten passages), No. 188 (19 March 1799, 56 groups) and a 16-group sentence of a despatch of April 1799.
Where
National Archives (NARA), RG 59, Despatches from U.S. Ministers to Spain, vol. 4, microfilm M31 roll 5, frames 0414–0417, 0294 and 0364, free on the National Archives Catalog. No decipherment is on or after any of them on the film.
The cipher
A one-part code of about 1,600 numbers in scrambled order: whole words, syllables, single letters and punctuation; proper names are spelled out. The same values run from 1791 to 1801.
How it was deciphered
A table of 686 groups was rebuilt from the State Department clerks' decipherments of other Humphreys despatches and from printed decoded texts, frozen, and tested on a despatch kept out of the build: 129 of 135 groups (95.6%) came out as the clerk had them.
What it says
No. 214: Humphreys can explain Spain's wavering over the recall of its minister Yrujo only by supposing Yrujo shares in an exclusive trade, and reports his talk with Urquijo on Louisiana, ending in the assurance that France {should} {never} get it while Urquijo remained in office. No. 188: news from the Swedish chargé about [Sweden?] and France.
Still open
36 code numbers with no value in the table, found nowhere else with a decipherment; 12 groups of No. 214 with digits hidden in the binding.
Credit
Andrew Beling, with AI agents (Claude Opus 5.5), 14 November 2026 (sure words recounted 15 November): transcriptions, table, test and readings. The pairs come from the State Department's clerks and from the Papers of Thomas Jefferson and of James Madison.
Five lines of numbered code groups after the words 'This Gentleman', in Humphreys's hand
No. 188, 19 March 1799: the 56 code groups after "This Gentleman", ending before "Calepio". Image: National Archives (NARA), RG 59, Despatches from U.S. Ministers to Spain, vol. 4, microfilm M31 roll 5, frame 0294, via the National Archives Catalog.

01 The documents

DocumentFrames (M31 roll 5)GroupsSure words
No. 214, Madrid, 6 Aug 17990414–0417352 in ten passages176 of 224 (78.6%)
No. 188, Madrid, 19 Mar 179902945635 of 43 (81.4%)
Despatch of April 1799, number not read0364 left1613 of 14 (92.9%)

A word counts as sure when every group comes from the frozen table or from a value the clerk gave the same group in the held-out despatch; context values, guesses and digits restored by sense are holes. The 16 despatches found in this code are listed in inventory.tsv, from a page-by-page search of M31 rolls 4, 5 and 6 and M43 rolls 2 and 3. No second copy of No. 188 or No. 214 is on the film.

02 The code

A one-part code: the numbers do not follow the alphabet (Spearman correlation between number and alphabetical rank 0.04). About 46% of its elements are whole words, 49% syllables and 5% single letters, with punctuation groups (1436 full stop, 1235 comma, 1312 semicolon, 1527 a stop often closing a passage). There are some homophones (of = 240 and 24; be = 641 and 108) and i and j share 502. Names are spelled out: Lo-u-i-si-a-n-a = 649.543.436.1466.925.892.925.

The editors of the Papers of Thomas Jefferson decoded Humphreys's letters of January 1791 "employing Code No. 8", Julian Boyd's name for the code Jefferson made in 1785; they describe it as partially reconstructed, and that partial key is an unpublished working file that we have not seen. Weber's United States Diplomatic Codes and Ciphers (1979) lists the code as not located. Compared with the codes of Weber's appendix, Code No. 16, King's, Carmichael's, Code No. 10 and Pinckney's, none is a relative.

03 How the table was built

04 No. 214, 6 August 1799

Plain words come from the table; {braces} are context values supported elsewhere; [brackets with ?] are guesses; [numbers] are groups left unread; Humphreys's clear text is in parentheses.

(It is difficult to account for this strange fluctuating conduct respecting the recal of Mr. de Yrujo) upon any other [ground?] than by supposing he is con[ne?]ced with certain lea[d?][ing?] [men?] here in the profits of an exclusive [trade?] from the United States to the Spanish colonies and that his presence in America is necessary to com[ple?]te that operation.

... if the President should [646] to send him [away?] ... that the {reason}s for that [proceed?]ing should be explained in a letter from him {to} the King of Spain ... (I would request) to be honoured [with?] the orders of the President whether {to} remain at Lisbon or [proceed?] to the United States in ca{se} of my being obliged to leave this country.

(I told him I was not ignorant of the French intrigues on that subject and that I had good reason to believe) that the design of {re}covering Louisiana had {never} been re[197][1355]ished ... {ces}sion was [in?]serted in the [origin?]al project of the {trea}y of [Basl?]e ... Truguet had re[22]d the negociation with saave[dra?] ... he had [314]d against the ra{ti}fication of the treaty for want of that ces{sion} (which he said) would have been made but for trea[ch?]ery ... so long as he {re}mained in offi[ce?] I might rest as[sure?]d France {should} {never} get possession of Louisiana.

The belief about Louisiana is Humphreys's own, told to Urquijo, not a fact the despatch establishes. The man who "had [314]d against the ratification" is Guillemardet, the French ambassador, named in the clear text just before. Of the named details, "Truguet" is fairly strong, "Saavedra" and "treachery" medium, "Basle" weak, and "relinquished" three-quarters guessed. Passages b to d are short and mostly names, partly unread.

05 No. 188, 19 March 1799

(This Gentleman) [ga?]ve me in confidence reason to believe that the government of [Sweden?] {now} less [inclin?]d to use management with that of France than [126] [?405] of that letter and that it is even probable the Baron [935] sta[ël?] would soon retire from Paris

"This Gentleman" is the Swedish chargé at Madrid, Carl Gustaf Adlerberg, identified from the enclosures on frames 0296–0297. That makes Sweden likely but not settled: group 1097 occurs nowhere else. "de Staël" is weak. The passage fills the asterisks printed at this place in Naval Documents Related to the Quasi-War between the United States and France, vol. 2 (1935), p. 437.

06 April 1799

I have seen a letter from the {Dutch} minister at {Paris} which reports that (great clamours prevail particularly against the peculations of Scherer late Minister of War, that Rewbell went out of the Directory with thirty millions...)

"Paris" stands on 74[2?], whose last digit is cut by the binding; "Dutch" comes from a clerk's gloss on frame 0307 found after the test.

07 What remains open

08 Earlier work

The clerks deciphered many Humphreys despatches on receipt; whether the Department read Nos. 188 and 214 in 1799 is not established. F. L. Humphreys's Life and Times of David Humphreys (1917) prints the 1791 letters and the coded part of No. 262, not these. Not found in: Naval Documents vol. 2 and vol. 4 (text search only), American State Papers, Foreign Relations vol. 2, the calendar of the Pickering Papers, Tomokiyo's Cryptiana (which describes the code without a key) or Lasry's GL.htm. Not searched: Naval Documents vols. 1 and 5–7, Humphreys's papers at Yale and the New Haven Museum, and the books by Whitaker, Lyon and DeConde.

Full texts

The transcription and the decryption of every document on this page, so that the reading can be used and checked. Short files are shown here; all are in the repository.

Coded parts of No. 214, 6 August 1799 (ten passages) read in part

Humphreys can account for Spain's wavering over the Spanish minister Yrujo's recall only by supposing that Yrujo shares, with certain lea[d?][ing?] [men?] at Madrid, in the profits of an exclusive [trade?] from the United States to the Spanish colonies; asks whether to stay at Lisbon or go home if forced to leave Spain; tells Urquijo of his own belief that France had {never} given up its design on Louisiana ("re[197][1355]ished", read as "relinquished", is mostly guessed), and reports Urquijo's assurance that France {should} {never} get it while he remained in office.

Builds coherent sentences, but under the read bar of 95% of words read as sense (79% here); the holes are marked in the reading.

Transcription

no214_pass1.txt

# Humphreys to Pickering, No. 214, Madrid, 6 Aug 1799. M31 roll 5 frames 0414-0417 (catalog item 188602965).
# Pass 1, read top to bottom on 14 Nov 2026 from the catalog images (5296x3168), crops at 1800 px.
# The copy is in a clerk's hand; no interlining anywhere. Groups are dot-separated.
# Notation: [?]9 = leading digit(s) hidden in the binding (frame edge); 5[?]3 = middle digit unreadable;
# a group followed by ?? is an uncertain reading. Clear-text context is quoted in {braces}.
# Passage ids a-j are mine.
# Corrected 14 Nov 2026 (session 2) after the independent check: 0415 line 1 reads 1393 (should), not 1392 (checked on
# a zoom: round foot of the last 3); 0415 line 7 "827??" may be 927 (8 or 9 not settled; 827 = doub fits).
a 0414R {It is difficult to account for this strange fluctuating conduct respecting the recal of Mr. de Yrujo.}
1145 716 726 43 1350 492 1288 1367 1122
1099 1333 1589 974 400 1205 1533 913 1165 1298 609 812 351 542 556
994 906 1428 7 24 901 688 244 789 1198 367 211 718 994 69 565 994
546 811 1477 502 7 1537 1409 1157 379 851 556 435 1333 59 565 1430
749 320 1409 706 912 234 1527
{Many intelligent Persons are of opinion, that the prohibition for neutral vessels to trade with the Spanish Colonies as heretofore is principally calculated to promote the interest of Individuals who have influence enough to obtain privileges for themselves and friends. The Person mentioned in my Nos 203 and 204}
b 0414R
713 983 1333 1099 444 603 1149 821
{has informed some Americans here that he has himself obtained permission to import 300,000 barrels of flour into the Havana and 250.000 to the Caracas, together with liberty to settle in the Spanish Colonies.}
c 0414R
1009 1300 925 1289 718 895
543 436 1024 [?]65?? 895 226 426 1024 1527
{He told Mr. Young he should not have succeeded so soon but for the friendship}
d 0414R
240 994 42[?]
1567 238 532 994 532 689
{He dined with Mr. de Urquijo, who gave him a Passport as a Citizen of the United States, altho' not pretending to be in reality such, he never applied to me for one. Perhaps the facts}
e 0414R-0415L
1053 1403 565 1422 1116 532 994 1589 346 1098 381 240 5[?]3
[?]9 436 1024 556 994 69 1527 1042 994 52 1393 646 565 660 747 631
[?]00 349 292 1409 1199 1437 813 441 1393 641 766 52[?] 1205 1533 631
{[I] beg leave to suggest whether it might not be expedient.}
1409 994
[?]9 7 532 1409 15 1122 1393 641 688 1434 1205 556 925 1289 718 631
[?]65 994 1142 240 223
{accompanied with a translation in Spanish or French, as otherwise.}
873 330 1393 641 796 821 756 1157 1091 936 330
[?]33 181 827?? 1567 1325 92 994 1399 1103 578 565 1157 1579 170 1527
{[I] would request}
565 641 1146 1205 533 994 1385 7 240 994 52 92
[?]65 1497 1392 821 1263 1071 7 786 821 292 15 565 994 69 556 822
[?]19 240 677 641 1122 667 747 565 1298 1267 1213 763 1527
{I came then to remark on the fourth point ...}
f 0417L {I told him I was not ignorant of the French intrigues on that subject and that I had good reason to believe}
1409 994 517 240 1490
1021 1389 1122 649 543 436 1466 925 892 925 229 561 641 160
1497 197 1355 204 1205
{I added that I had understood the}
g 0417L
123[?]
650 495 536 1405 879 556 994 1412 301 906 186 240 994 244
592 240 1519 8
{and that I was acquainted with the sentiments of each of the Ambassadors of France who had resided here since the peace. I knew that}
h 0417L
1095 772 1567 229 1497 22 747 994 55 1533 1044
925 1267 734 1527
{I could not moreover forbear mentioning that Guillemardet had declared to me}
i 0417R
1099 229 314 747 365 994 912
[?]46 1524 822 234 240 994 344 592 532 295 1572 240 1409 1239
[?]50
{which he said}
1103 1467 522 139 215 532 755 925 1587 8 489
{as France had relinquished so much to Spain without an equivalent. ... Mr. de Urquijo said, that having been engaged with Mr. Iriarte in the negotiation of that Treaty, he could affirm there were no secret articles of any kind of importance in it, and that}
j 0417R
209 471 162 1099
[?]97 1392 376 556 240 1524 1459 436 368 1119 162 568 747 1555
[?]93 561 1439 629 284 240 649 543 436 1466 925 892 925
{I enclose in No. 11 the correspondence respecting Andrew Clark and Thomas Draper ...}
Decryption

reading_214.txt

# Reading of 214, made with scripts/mark_reading.py from readings/words_214.txt.
# Plain = frozen table; {..} = context value supported by another occurrence or by visible digits;
# [..?] = guess (sense only); [n] = group left unread, shown by its number; (..) = Humphreys's clear text.
# Words: 224; table 173, context 17, guess 24, unread 10. Share of words resting on the table alone: 0.772; table or supported context: 0.848.
# Code groups (punctuation groups included): 352; read by the frozen table 293 (0.832); supported context 17; sense-only 28; unread 14.

a frame 0414, right page.
 (It is difficult to account for this strange fluctuating conduct respecting the recal of Mr. de Yrujo) upon any other [ground?] than by supposing he is con[ne?]ced with certain lea[d?][ing?] [men?] here in the profits of an exclusive [trade?] from the United States to the Spanish colonies and that his presence in America is necessary to com[ple?]te that operation. (Many intelligent Persons are of opinion, that the prohibition for neutral vessels to trade with the Spanish Colonies as heretofore is principally calculated to promote the interest of Individuals who have influence enough to obtain privileges for themselves and friends. The Person mentioned in my Nos 203 and 204)

b frame 0414, right page.
 [713][983]ishefernan (has informed some Americans here that he has himself obtained permission to import 300,000 barrels of flour into the Havana and 250.000 to the Caracas, together with liberty to settle in the Spanish Colonies.)

c frame 0414, right page.
 [1009] {carried} a letter from uruI[jo?] {to} urque[426][jo?]. (He told Mr. Young he should not have succeeded so soon but for the friendship)

d frame 0414, right page.
 of the {la}tter for the former (He dined with Mr. de Urquijo, who gave him a Passport as a Citizen of the United States, altho' not pretending to be in reality such, he never applied to me for one. Perhaps the facts)

e frames 0414 right page to 0415 left page.
 will tend to account for the conti[nu?]ance of [5?3][?9]I[jo?] in the United States. if the President should [646] to send him [away?] or that no far[ther?] business should be [766] [52?]ed with him (I beg leave to suggest whether it might not be expedient) that the {reason}s for that [proceed?]ing should be explained in a letter from him {to} the King of Spain (accompanied with a translation in Spanish or French, as otherwise) tho it should be given into his [own?] hand it [?33]tle {doub}tful whether the [contents?] would come to his know[ledge?]. (I would request) to be honoured [with?] the orders of the President whether {to} remain at Lisbon or [proceed?] to the United States in ca{se} of my being obliged to leave this country. (I came then to remark on the fourth point...)

f frame 0417, left page.
 (I told him I was not ignorant of the French intrigues on that subject and that I had good reason to believe) that the design of {re}covering Louisiana had {never} been re[197][1355]ished (I added that I had understood the)

g frame 0417, left page.
 {ces}sion was [in?]serted in the [origin?]al project of the {trea}y of [Basl?]e (and that I was acquainted with the sentiments of each of the Ambassadors of France who had resided here since the peace. I knew that)

h frame 0417, left page.
 Truguet had re[22]d the negociation with saave[dra?]. (I could not moreover forbear mentioning that Guillemardet had declared to me)

i frame 0417, right page.
 he had [314]d against the ra{ti}fication of the treaty for want of that ces{sion} (which he said) would have been made but for trea[ch?]ery (as France had relinquished so much to Spain without an equivalent.... Mr. de Urquijo said, that having been engaged with Mr. Iriarte in the negotiation of that Treaty, he could affirm there were no secret articles of any kind of importance in it, and that)

j frame 0417, right page.
 so long as he {re}mained in offi[ce?] I might rest as[sure?]d France {should} {never} get possession of Louisiana (I enclose in No. 11 the correspondence respecting Andrew Clark and Thomas Draper...)

Coded passage of No. 188, 19 March 1799 read in part

The Swedish chargé at Madrid (from the enclosures) gave Humphreys reason to believe (the reading, word for word) "that the government of [Sweden?] {now} less [inclin?]d to use management with that of France ... and that it is even probable the Baron [935] sta[ël?] would soon retire from Paris"; fills the asterisks in Naval Documents, Quasi-War 2:437.

Builds coherent sentences, but under the read bar of 95% of words read as sense (81% here); the holes are marked in the reading.

Transcription

no188_pass1.txt

# Humphreys to Pickering, No. 188, Madrid, 19 Mar 1799. M31 roll 5 frame 0294, right-hand page.
# Line 3 first group corrected to [?]405 after the independent check (the 4 matches the following 240).
# Pass 1, read top to bottom 14 Nov 2026 from the catalog image (crop at 1800 px). Clerk's copy, no interlining.
# The first group of lines 2 and 3 is at the binding edge: a leading digit may be hidden ([?]).
# {Context before: ... In a posterior conference with that Chargé des Affaires, I have answered his question respecting the
#  authority by which Danish vessels of war were in the habit of conveying American Merchantmen, that I only knew the fact
#  without being able to ascertain the source from whence that protection originated, but that it must be by the
#  approbation of their Government. This Gentleman}
1267 261 556 1159 851 579 565 108 502 1267 1409 994 820 620 240 1097
[?]411 291 864 747 565 1056 1046 1149 110 620 1533 1409 240 1555 1350 126
[?]405 240 1409 1289 1537 1409 330 1333 288 258 1545 994 401 704 935 537
1103 209 704 459 1068 8 718 742
# {Context after: Calepio, the Cisalpine Minister at this Court is recalled, to be Minister of foreign Affairs at Milan.}
Decryption

reading_188.txt

# Reading of 188, made with scripts/mark_reading.py from readings/words_188.txt.
# Plain = frozen table; {..} = context value supported by another occurrence or by visible digits;
# [..?] = guess (sense only); [n] = group left unread, shown by its number; (..) = Humphreys's clear text.
# Words: 43; table 35, context 1, guess 4, unread 3. Share of words resting on the table alone: 0.814; table or supported context: 0.837.
# Code groups (punctuation groups included): 56; read by the frozen table 50 (0.893); supported context 1; sense-only 2; unread 3.

a frame 0294, right page.
 (In a posterior conference with that Chargé des Affaires, I have answered his question respecting the authority by which Danish vessels of war were in the habit of conveying American Merchantmen, that I only knew the fact without being able to ascertain the source from whence that protection originated, but that it must be by the approbation of their Government. This Gentleman) [ga?]ve me in confidence reason to believe that the government of [Sweden?] {now} less [inclin?]d to use management with that of France than [126] [?405] of that letter and that it is even probable the Baron [935] sta[ël?] would soon retire from Paris (Calepio, the Cisalpine Minister at this Court is recalled, to be Minister of foreign Affairs at Milan.)

Coded sentence of the April 1799 despatch (frame 0364) read in part

Humphreys has seen a letter from the Dutch minister at Paris reporting (in clear) the outcry against Scherer's peculations and Rewbell's leaving the Directory with thirty millions.

Builds coherent sentences, but under the read bar of 95% of words read as sense (93% here); the holes are marked in the reading.

Transcription

april1799_0364.txt

# Despatch of April 1799 (number not read), David Humphreys to Timothy Pickering. M31 roll 5 frame 0364, left page
# (catalog record https://catalog.archives.gov/id/188602965). Bare: no decipherment on or after this copy.
# Transcribed 14 Nov 2026 (second session, after the freeze and the held-out test) from one crop of the catalog image,
# and checked twice on the same crop; there is no second transcription made independently. 16 groups (the inventory
# of the first session estimated 19 at overview size). 74[2?]: last digit not certain.
436 1467 1319 160 925 1289 718 994 1290 1538 1263 74[2?]
777 1163 7 1409
# {clear text follows: great clamours prevail particularly against the peculations of Scherer late Minister of War,
#  that Rewbell went out of the Directory with thirty millions ...}
Decryption

reading_0364.txt

# Reading of 0364, made with scripts/mark_reading.py from readings/words_0364.txt.
# Plain = frozen table; {..} = context value supported by another occurrence or by visible digits;
# [..?] = guess (sense only); [n] = group left unread, shown by its number; (..) = Humphreys's clear text.
# Words: 14; table 12, context 2, guess 0, unread 0. Share of words resting on the table alone: 0.857; table or supported context: 1.000.
# Code groups (punctuation groups included): 16; read by the frozen table 14 (0.875); supported context 2; sense-only 0; unread 0.

a frame 0364, left page.
 I have seen a letter from the {Dutch} minister at {Paris} which reports that (great clamours prevail particularly against the peculations of Scherer late Minister of War, that Rewbell went out of the Directory with thirty millions...)

Key: table_frozen_v1.tsv

09 Sources

Transcriptions, pairs, frozen table, held-out test and readings: targets/humphreys1799/.

Cite this page

Daniel Bourdeau and Andrew Beling, “David Humphreys to Timothy Pickering, Madrid, 1799”, Cyphersolver, posted 24 November 2026, updated 25 November 2026, repository commit 17bf7e8764, https://cyphersolver.com/humphreys1799.html.