34 70 14 12 6 16 8 28 6 70
l a c a r e t e r a
34 = l · 70 = a · 14 = c · 12 = a · 6 = r · 16 = e · 8 = t · 28 = e

Igualada → the acting commander of the División auxiliar del Norte · numbered alphabets with homophones · 6 May 1840 · key proposed from the cipher by a contributor, its test failed

Juan Van Halen to the acting commander of the División auxiliar del Norte, Igualada, 6 May 1840

Juan Van Halen
fromJuan Van Halen

Go to the full text ↓

A general hid the arrangements for guarding army funds in eight runs of numbers; a contributed key decodes 27 of the 30 cipher words without correction, but the test declared for it in advance failed.

Brice Dudout · posted

Method: key recovered from ciphertext-only · Extent: partial (90% of the cipher)

Contributed by Brice Dudout (solution) · Also credited · Daniel Bourdeau (pointer to a source)

At a glanceCiphertext-only break · partial (90% of the cipher)

The letter
General Juan Van Halen, on the letterhead of the Ejército de Cataluña, Brigada de Reserva, to the brigadier acting as commander of the División auxiliar del Norte; Igualada, 6 May 1840, ten in the morning. Clear Spanish with eight runs of dot-separated numbers.
Where
Archivo Histórico Nacional, Madrid, DIVERSOS-COLECCIONES,195,N.14 (PARES 4151130), described there as a cipher letter. Catalogue entry 2423. No decipherment of the time and no edition were found.
The cipher
Each letter is a number. The alphabet is numbered on in succession (m to z = 1–11, a to l = 12–22, then a again from 24), which gives the common letters several numbers. No word division. The letter uses 24 different numbers, 144 in all.
How it was deciphered
The key was proposed from the cipher of the first six runs alone and frozen. The contributor’s test on the two runs kept back failed: two of its three conditions passed and the third was missed by 0.027. By his own protocol the key is partial.
What it says
A force must come to Montblanc to guard the funds due at Tarragona, and Van Halen asks the brigadier to meet him there on the eleventh unless the march of the Barcelona convoy brings them together sooner “sobre la caretera”.
Still open
Three of the 30 cipher words need a number corrected or supplied, so 90% of the words count as read. The transcription was not checked against the images. The 40 key values that do not occur in the letter are conjecture, and no second test is possible on this letter.
Credit
Transcription, key, test, reading and translation contributed by Brice Dudout (Europe chiffrée), pull request #408 of 11 November 2026; the key itself was proposed by a language model that he ran once and names in his notes. The catalogue entry came from Daniel Bourdeau’s sweep of PARES.

01 The document

Unit N.14 of Diversos-Colecciones 195 in the Archivo Histórico Nacional holds three images: a cover and two pages. The letter is headed Ejército de Cataluña, Brigada de Reserva, dated Igualada, 6 May 1840, “A las 10 del dia”, signed Juan Van Halen and addressed to the “Sr. Brigad.r Comand.te accidental de la Division auxiliar del Norte”, who is not named. It is written in clear Spanish except for eight runs of numbers separated by dots: seven on the first page (S1 to S7 here) and one near the end of the second (S8). No decipherment is written on the leaves or the cover.

The transcription holds 144 numbers: 119 in S1–S6 and 25 in S7–S8. The contributor counted 146, which is the figure if the two “58” are read as “5.8”; the key takes 58 as one number. Only 24 different numbers occur, all between 1 and 34 except 58 and 70.

No image is shown on this page. The contributor used the PARES images (531 by 648 pixels) for study only and included none, and PARES refused the requests of the session that integrated the pull request (HTTP 429, too many requests). For the same reason the transcription was not checked against the images here. A run of the cipher is printed in numbers in the strip under the title.

02 The cipher

The key is an alphabet numbered on in succession, in two halves: m n o p q r s t u, an unseen tenth sign, z take 1 to 11; a b c d e f g h i j l take 12 to 22. A second rank starts again at a = 24 (d 27, e 28, l 34). There is no k, and u serves for v. The letter a also has 58 and 70. The number 70, which closes several runs, is therefore a letter and not a separator or a null. Words are not divided.

NumbersLettersSeen in the letter
1–11m n o p q r s t u ? z1 2 3 5 6 7 8 9 11
12–22a b c d e f g h i j l12 to 20
24–34a b c d e f g h i j l24 (a) 27 (d) 28 (e) 34 (l)
58, 70a58, 70

These 24 attested values are the recovered part of the key. The key file lists 40 more values, filled in from the structure: the unseen places of the first two ranks by alphabetical order, and a third and fourth rank on the supposition that 58 and 70 are 12 and 24 moved on by 46. Those 40 values are conjecture. None of them occurs anywhere in the letter and nothing tests them. The third and fourth ranks rest on two numbers only, and the file of variants that came with the key proposal calls them fragile and gives a reading in which 58 and 70 are simply two more numbers for a.

03 How the key was found

The contributor’s first attempts on runs S1–S6 failed: the index of coincidence is 0.059, and monoalphabetic and homophonic annealing, Gronsfeld-type tests and cribs from the clear context gave nothing.

On 11 November 2026 he sent runs S1–S6, and only those, to a language model in a single run. It proposed the key above. By his notes its anchor is the repeated-letter pattern of “en contacto” in S6, which fits one window of the text and none in 5,000 shuffles. The values it found then fall in alphabetical order for 16 of 16 consecutive pairs, an order the proposal did not impose; the best of 100,000 permuted keys reaches 6. (These two figures are the contributor’s and were not re-run here.) By his record the key was frozen before the two remaining runs were decoded.

The clear words around each run give context but no parallel text, so the method is recorded as a key recovered from the ciphertext alone.

04 The test, and why it failed

What was declared. The contributor’s protocol of 9 November 2026 named runs S7 and S8 (25 numbers) as held out, and they were never sent to the model. Its rule asked for a lexical cover of at least 0.85 on the held-out decode and a margin of 0.30 over the best shuffled-key control. That rule turned out to have almost no power on 25 numbers (4% on windows of the training runs), so an addendum replaced it with three conditions, with thresholds calibrated on S1–S6 (power 82.0% there): C1, cover at least 0.75; C2, a letter-model score at least 0.22 above the best of 200 shuffled keys; C3, the same score at least 0.08 above the best of 200 shuffles of the held-out numbers. All three had to hold. The addendum also fixed what a failure would mean: the key is partial, whatever the sense of the decode.

By the contributor’s record, the addendum was hashed together with the key and the calibration before S7–S8 were decoded. That order rests on timestamps written inside his files and on a pull request of a single commit; there is no outside timestamp. The addendum was written after the key and the reading of S1–S6 existed, and its author declares having seen the lengths of the held-out runs and the number of 70s in them.

The score. One measurement was made.

ConditionScoreNeededResult
Original rule: cover, and margin over the best control0.880; margin 0.120 (control 0.760)0.85; margin 0.30not met
C1: cover0.8800.75passed
C2: letter model against 200 shuffled keys (best −1.359)−1.048−1.139passed
C3: letter model against 200 shuffles of the held-out numbers (best −1.101)−1.048−1.021failed, short by 0.027

The test failed, under the addendum and under the original rule. The contributor’s frozen result file says the same: measure not validated, key partial. The pull request described the outcome as “validated with limited reservations”; that wording came after the result and is not used here. The two held-out runs are now used up, so this letter allows no second test.

An independent re-run before integration reproduced the figures: the original rule exactly, and C3 missed by 0.029 with a different copy of the text used to train the letter model (the contributor’s extract of Don Quijote is not in the pull request). It also found that the failure turns on one doubtful digit: with the contributor’s second transcription pass, where the fourth number of S8 is 18 and not 13, C3 would pass by 0.004. The first pass had been declared decisive, so the failure stands. C3 also depends on the random draw: it passes in 3 to 6 of 30 blocks of 200 shuffles.

What else makes the key credible. None of the following is the declared test.

Against it: S8 decodes to dicbosa caretera, and dichosa needs the fourth number (13 or 18) taken as 19, a confusion outside the classes the addendum allowed; the contributor’s own sense check for S8 is recorded as not met. And a test on 25 numbers that uses only values already fitted could not have settled the key alone.

05 The reading

Each run with the clear words that lead into it. A word in braces is probable (one number of the transcription taken otherwise); a letter in square brackets is supplied. Word division is added; the spelling is the letter’s (deve, comboi, caretera with one r).

RunClear words beforeDecoded
S1Como en ese caso deveve[n]ir a Montblanc fuerza
S2Suficiente para{custodiar} dichos caudales
S3Seria de desear que V.S.se abocase conmigo en
S4dicha Ciudad elonce, dado caso de que la
S5marcha por Cerveradel comboi de Barcelona no
S6nos deviera poner personalmenteen contacto antes de
S7dicha fecha sobrela caretera
S8… sobre la{dichosa} caretera
As in that case a sufficient force must come to Montblanc to guard the said funds, it would be desirable that Your Lordship should meet me in the said city on the eleventh, in case the march by Cervera of the Barcelona convoy does not bring us personally into contact before that date on the road.

The funds are the sum the clear text opens with: 1,503 (unit doubtful, perhaps reales) to be at the disposal of the Division’s paymaster at Tarragona between the 10th and the 12th. The second cipher passage closes the letter. Its clear lead-in says that the forces of Llarch, which the contributor’s notes call Carlist bands, have been given fifteen days’ leave, and that since the 4th Llarch and Marcó roam the Priorat; the last clear words before the run are uncertain at the resolution of the images, and the cipher ends “sobre la {dichosa} caretera”, on that confounded road.

The count. The cipher has 30 words. 27 decode with no correction; 2 are probable; 1 is restored. By this site’s rule a guessed or supplied word does not count as read, so the share is 27 of 30, 90.0%, under the 95% needed for a complete extent: the extent here is partial. With 30 words one word is 3.3 points, so the rule allows a single doubtful word. The contributor counted the two probable words as read (96.7%).

06 What remains uncertain

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.

Van Halen to the Division auxiliar del Norte, Igualada 6 May 1840 read in part

1,503 [reales?] are to be at the paymaster's disposal at Tarragona between 10 and 12 May; as a sufficient force must come to Montblanc to guard the funds, Van Halen asks the brigadier to meet him there on the 11th, unless the march of the Barcelona convoy by Cervera brings them into contact on the road before. The forces of Llarch (Carlist bands, by the contributor's notes) have been given fifteen days' leave and Llarch and Marcó roam the Priorat; the letter ends 'on that confounded road', after clear words that are uncertain on the images.

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

Transcription

transcription.txt

# vanhalen1840 - transcription of the cipher runs of AHN, DIVERSOS-COLECCIONES,195,N.14 (Juan Van Halen, Igualada, 6 May 1840)
# One line per run of dot-separated numbers (S1-S6 on image 2 = training part T; S7 end of image 2 and S8 on image 3 =
# held-out part H). Numbers as written; a|b = two possible readings (the first is used by the decryption).
# Pass 1 (9 Nov 2026, Claude Opus 5.5 agent, from the PARES images, 531x648 px), frozen before any key existed
# (frozen/transcription.txt, SHA-256 66f920a6...). Pass 2 (frozen/transcription-p2.txt, SHA-256 d99dc675...) after
# Brice Dudout's blind shape-matching sheet of 9 Nov 2026 (12 doubtful signs): T values unchanged (two doubts removed:
# S3 no. 15 = 18, S4 no. 15 = 5); S8 no. 4 read 18 (pass 1: 13); "58" twice: second digit 8, a dot between 5 and 8 not
# settled (the key reads 58 as one number, a). The plain text around the runs is in frozen/clair.txt.
# No image is included (PARES; see NOTES.md).
S1	9.16.20.6.12.1.3.2.8.13.34.70.2.14.17.9.28.6.11.24
S2	14.9.7.8.13.15.20.12.6.15.20.14.19.3.7.14.70.9.15.12.34.16.7
S3	7.16.12.13.3.14.24.7.28.14.3.2.1.20.18.3.16.2
S4	3.2.14.16.15.12.27.3.14.58.7.3.15.16.5.9.28.34.70
S5	15.16.34.14.3.1.13.3.20.15.16.13.12.6.14.16.34.3.2.58.2.3
S6	28.2.14.3.2.8.12.14.8.3.24.2.8.28.7.15.16
S7	34.70.14.12.6.16.8.28.6.70
S8	15.20.14.13|18.3.7.12.14.24.6.28.8.16.6.70
Decryption

decryption.txt

# vanhalen1840 - mechanical decryption of transcription.txt with key.tsv, no correction (first reading of a|b).
# S7 and S8 are the raw output of the single held-out measurement (frozen/RESULTAT-LOT4-sortie-brute.txt).
S1	9=u 16=e 20=i 6=r 12=a 1=m 3=o 2=n 8=t 13=b 34=l 70=a 2=n 14=c 17=f 9=u 28=e 6=r 11=z 24=a
S1	ueir a montblanc fuerza
S2	14=c 9=u 7=s 8=t 13=b 15=d 20=i 12=a 6=r 15=d 20=i 14=c 19=h 3=o 7=s 14=c 70=a 9=u 15=d 12=a 34=l 16=e 7=s
S2	custbdiar dichos caudales
S3	7=s 16=e 12=a 13=b 3=o 14=c 24=a 7=s 28=e 14=c 3=o 2=n 1=m 20=i 18=g 3=o 16=e 2=n
S3	se abocase conmigo en
S4	3=o 2=n 14=c 16=e 15=d 12=a 27=d 3=o 14=c 58=a 7=s 3=o 15=d 16=e 5=q 9=u 28=e 34=l 70=a
S4	once dado caso de que la
S5	15=d 16=e 34=l 14=c 3=o 1=m 13=b 3=o 20=i 15=d 16=e 13=b 12=a 6=r 14=c 16=e 34=l 3=o 2=n 58=a 2=n 3=o
S5	del comboi de barcelona no
S6	28=e 2=n 14=c 3=o 2=n 8=t 12=a 14=c 8=t 3=o 24=a 2=n 8=t 28=e 7=s 15=d 16=e
S6	en contacto antes de
S7	34=l 70=a 14=c 12=a 6=r 16=e 8=t 28=e 6=r 70=a
S7	la caretera
S8	15=d 20=i 14=c 13=b 3=o 7=s 12=a 14=c 24=a 6=r 28=e 8=t 16=e 6=r 70=a
S8	dicbosa caretera
# word division added by us; the cipher has none. Pass 2 of S8 (18 = g): dicgosa caretera.
Reading

reading.md

# vanhalen1840 - reading of the cipher (Spanish, spelling of the letter)

Marks: plain = certain (every number read directly with key.tsv, no correction); {x} = probable (one number of the
transcription read otherwise, list below); [x] = restored letter (a number supplied). Word division and punctuation
are ours: the cipher has none. Spelling of the letter kept (deve, comboi, caretera with one r, u for v in "ueir").
Runs S1-S6: reading by the key proposer (Claude Fable 5.2), checked against our decoder; S7-S8: reading by a Claude
Opus 5.5 agent of the raw output of the single held-out measurement.

## Reading, run by run (plain context in small capitals is not cipher)

- S1 (COMO EN ESE CASO DEVE =): ve[n]ir a Montblanc fuerza
- S2 (= SUFICIENTE PARA =): {custodiar} dichos caudales.
- S3 (SERIA DE DESEAR QUE V.S. =): se abocase conmigo en
- S4 (= DICHA CIUDAD EL =): once, dado caso de que la
- S5 (= MARCHA POR CERVERA =): del comboi de Barcelona no
- S6 (= NOS DEVIERA PONER PERSONALMENTE =): en contacto antes de
- S7 (= DICHA FECHA SOBRE =): la caretera.
- S8 (... SOBRE LA =): {dichosa} caretera.

## The cipher passage in its sentences

Como en ese caso deve ve[n]ir a Montblanc fuerza suficiente para {custodiar} dichos caudales, seria de desear que V.S.
se abocase conmigo en dicha Ciudad el once, dado caso de que la marcha por Cervera del comboi de Barcelona no nos
deviera poner personalmente en contacto antes de dicha fecha sobre la caretera.

The second passage closes the letter: the last clause of the plain text, whose reading is uncertain at the resolution
of the images (frozen/clair.txt), ends "sobre la" and the cipher gives "{dichosa} caretera".

## Count (30 cipher words)

| class | words | share |
|---|---|---|
| certain | 27 | 90.0% |
| probable | 2 | 6.7% |
| restored | 1 | 3.3% |
| unresolved | 0 | 0% |

- **Read by the README read bar: 27/30 = 90.0%** (a probable word is a guessed word and a restored word a supplied one;
  neither counts as read). Class: read in part. Corrected at integration, 12 Nov 2026.
- Contributor's count, probable words included: 29/30 = 96.7%. With the restored word: 30/30.
- Probable:
  - {custodiar} (S2 no. 5): transcribed 13 (b, "custbdiar"); read 3 (o). A 13/3 confusion of the transcription or a
    slip of the cipher clerk.
  - {dichosa} (S8 no. 4, held out): transcribed 13 (pass 1) or 18 (pass 2) - this was already the doubtful sign of the
    9 Nov sheet; read 19 (h, attested in "dichos", S2). Not one of the confusion classes we declared before the measure
    (3/5, 13/18, 13/3, 8/3, 1/7, omitted number).
- Restored: ve[n]ir (S1): 9.16.20.6 = "ueir"; "venir" needs 9.16.2.20.6, one 2 omitted by the clerk or by us.
- "caretera" (twice) is read letter by letter without correction: one r for rr, a spelling of the letter.
Translation

translation.md

# vanhalen1840 - English translation

Translation of the whole letter (Brice Dudout, with a Claude Opus 5.5 agent, 11 Nov 2026). The cipher passages
(reading.md) are in bold; probable and restored words are not marked here. The plain text was transcribed from images
of 531x648 px: words in round brackets with ? are uncertain readings of the plain text, not of the cipher.

According to an official notice I received yesterday here, 1,503 [reales?] are to be at the disposal of the Paymaster of
your Division in Tarragona between the 10th and the 12th of this month, although to the detriment of the total of the
monthly pay of your Brigade. As in that case **a sufficient force must come to Montblanc to guard the said funds**, it
would be desirable that Your Lordship **should meet me in** the said city on **the eleventh, in case the** march by
Cervera **of the Barcelona convoy does not** bring us personally **into contact before** that date **on the road**.
Please tell me what you wish, or what occurs to you in the matter. All the forces of Llarch, (a little ...?) of 375 dead
and wounded, as appears from documents I found lately when I fell upon La Llacuna, have just been given fifteen days'
leave to rest, they say, from their fatigues in the (...?) of Solsona; so that since the 4th, when Llarch and Marcó
dismissed them at La Llacuna, these chieftains wander about the Priorat, and (the ...?) with a few young men as escort,
roaming among their friends with no one to trouble them, we shall have (...?) from afar (...?) on **that confounded
road**. God keep Your Lordship many years. Igualada, 6 May 1840, at ten in the morning. Juan Van Halen. - To the
Brigadier, acting Commander of the Auxiliary Division of the North.

Note: "dichosa" ("blessed", here ironic: "that wretched road") is the probable reading of S8; see reading.md.

Key: key.tsv

07 Sources

The notes, the key, the transcription, the reading, the translation and the frozen test files are in targets/vanhalen1840.

Cite this page

Brice Dudout, “Juan Van Halen to the acting commander of the División auxiliar del Norte, Igualada, 6 May 1840”, Cyphersolver, posted 12 November 2026, https://cyphersolver.com/vanhalen1840.html.