How AI read Napoleon's 1809 cipher letter — and how we checked it

In September 2026, GPT-6 Astra read a 217-year-old Napoleonic cipher from one scan. We downloaded the solution package and ran it offline: the key reproduces the literal text byte for byte, and 97% of the letters reach the final reading unchanged.

A small robot with a magnifying glass studies a ciphered parchment next to a key and a grid of decoded signsA small robot with a magnifying glass studies a ciphered parchment next to a key and a grid of decoded signs

Published: 4 October 2026 · Updated: 6 October 2026

In short: In September 2026, engineer Carter Church used OpenAI’s GPT-6 Astra to read a ciphered letter sent to General Marmont in 1809, from one scanned image, in about six hours of model time1. We downloaded the published solution package and ran its scripts offline: the key reproduces the literal text byte for byte, and 97% of the letters reach the final reading unchanged2.

Key takeaways:

  • The letter was written at the headquarters of Napoleon’s stepson Eugène de Beauharnais on Napoleon’s direct order of 16 March 1809; the ciphered text had never been read13.
  • The cipher is a homophonic nomenclator: 155 signs, 1,300 cipher units, 29 signs for whole words. Only 33 values were published before14.
  • The final text is computed, not composed: a script applies the key to every unit, then 29 documented editorial interventions turn the literal output into the reading2.
  • Our independent run passed every check: 1,833 file hashes, byte-identical text, 1,800 images identical pixel for pixel2.
  • The key anti-hallucination test — rerunning the solver without Napoleonic texts — is reported by the author but not included in the published package12.

What is a homophonic cipher?

A homophonic cipher (homophonic substitution cipher) replaces each plaintext letter with one of several interchangeable signs, so that frequent letters do not stand out5. In the Marmont letter, E and T each have nine signs. Counting sign frequencies, the classic first step of codebreaking, therefore reveals almost nothing.

Video. Why frequency analysis fails on a homophonic cipher: in the Marmont letter, E has nine interchangeable signs [1].

The Marmont cipher is also a nomenclator (nomenclator cipher): some signs stand for whole words rather than letters. In this letter 29 signs encode words such as de, que, les, vous and général, two encode a doubled s, and several are nulls that mean nothing1. A solver that assumes one sign equals one letter produces broken French wherever a word-sign appears.

Was it really Napoleon’s letter?

The letter was not written by Napoleon personally, but it carried out his direct order. It came from the headquarters of his stepson Eugène de Beauharnais, Viceroy of Italy6. On 16 March 1809 Napoleon told Eugène to send General Auguste de Marmont the positions of every French and allied army, “in a ciphered letter and by an intelligent officer”3.

Marmont held about 13,000 men in Dalmatia, cut off from every other French army by Austrian territory1. Austria was about to go to war. The order itself has been in print since 18653. What nobody had read was the ciphered letter that actually reached the general.

The letter survives only as a plate in J. Vilcoq’s 1969 article in the Revue historique des Armées: one line of plain French, then 24 rows of cipher7. The plate carries the wrong date, and the standard list of unsolved ciphers filed it under 18078. Church redated it to the last days of March 1809, about two weeks before Austria crossed the Inn on 10 April1.

The decrypted text is not a copy of the printed order. It adds where the Austrian corps stood, counts Marmont’s own corps and the reserves, and fills a sentence that breaks off in the 1865 edition with a row of dots13.

Why could nobody read the Marmont cipher for 217 years?

Five obstacles stacked on top of each other, and none of them alone was new to cryptanalysis1910.

Homophonic substitution

In numbers
115 signs for 25 letters
Consequence
Frequency analysis fails

Nomenclator

In numbers
29 word-signs, 2 for doubled s, several nulls
Consequence
Letter-only solvers break on word-signs

One poor source

In numbers
One plate, about 19 px per sign, 175 hand-drawn marks to sort
Consequence
The transcription is itself a hypothesis

Partial key

In numbers
33 published values covering 435 of 1,300 units
Consequence
Two thirds of the text had to be recovered

No transcription

In numbers
None existed; the last solver notes said “nothing to work on”
Consequence
Work had to start from pixels

Simulated annealing against homophonic ciphers is published, peer-reviewed work910. Church himself writes that a patient specialist could have solved the letter in 1970, at the cost of weeks of combined work in period French, sign reading and statistics1. Evidence indicates the barrier was cost, not impossibility.

What GPT-6 Astra changed is that transcription and cryptanalysis, usually separate skills and often separate careers, ran as one loop1.

How did GPT-6 Astra decipher the letter?

GPT-6 Astra received one image and one goal and ran six stages in about six hours of execution time, according to the author1. The image stayed in the loop to the end: every statistical guess was sent back to the pixels.

Six stages from one scanned plate to a checkable keyPipeline used to decipher the 1809 Marmont letter: transcribe the plate, pin the 33 published values, search the key by simulated annealing, promote 29 word-signs, check every value against the plate, then rerun the solver without Napoleonic texts. The output is a key and a transcription that produce the literal text deterministically.Six stages from one scanned plate to a checkable keyGPT-6 Astra, about six hours of model time � Source: Church, 20261TranscribePlate cut into 24 row cropsEach distinct mark gets a label1,310 units � 155 cipher signs2Pin what is known33 values from Tant's partial tableCONSEQUENT kept as plaintextAbout a third of units fixed3Search the keySimulated annealing over sign valuesScored by French 3-, 4-, 5-gramsCorpus: Hugo, Dumas, Marmont4Promote word-signsSigns that break good Frenchare retested as whole words29 word-signs: de, que, vous&5Check against the plateEach proposed value is testedat every occurrence of the signKept only if it works everywhere6Attack the resultRerun from scratch withoutMarmont's memoirs or anyNapoleonic text � same readingOutput:key.tsv + transcription.txt � literal text (computed by script) � 29 documented edits � readingStage 6 is reported by the author; its run is not included in the published package v1.0.0.
The decipherment pipeline. Source: Church, 2026. Stage 6 is reported by the author.
  1. Transcribe. The plate was cut into row crops. Every visibly different mark got a provisional label, with possible pen variants kept apart. The final transcription has 1,310 units: 1,300 cipher units and 10 plain letters2.
  2. Pin what is known. Daniel Tant’s 33 published values were fixed as given4. The plain word CONSEQUENT in row 14 was kept as plaintext.
  3. Search the key. A simulated annealing (a randomized search that accepts worse candidates early to escape dead ends) assigned letters to the remaining signs. Candidates were scored with French 3-, 4- and 5-gram statistics from Hugo, Dumas and Marmont’s memoirs1.
  4. Promote word-signs. Signs that kept breaking otherwise good French were retested as whole words1.
  5. Check against the plate. A value that improved the French in one place was tested at every other occurrence of that sign. It was kept only if it worked everywhere1.
  6. Attack the result. The solver was rerun from scratch under conditions designed to make it fail (see below)1.

Is the decrypted text computed or written by the model?

The decrypted text is computed. A script applies the key to all 1,310 units in order and produces the literal text; no model is called during this step2. The literal output is already readable French, with period spelling and a few wrong letters.

The final reading then applies 29 documented editorial interventions. Each is recorded with its row, character position, old and new text, and a reason2:

  • period spelling normalized: I→J, U→V, VV→W (AUIOURDHUI → AUJOURDHUI);
  • elisions restored: DE ELITE → D’ELITE, QUE ILS → QU’ILS;
  • single-letter repairs: HOMMET → HOMMES (the key keeps q = T), QUSTRE → QUATRE, TDERGANISENT → S’ORGANISENT;
  • one contextual expansion: the unresolved sign TARGET is read as Sa Majesté.
The key writes 97% of the letter; editors touched about 3%Top bar: 1,300 cipher units by evidence class  427 match Tant's published table, 805 are supported in several word contexts, 54 are contextual or sparse, 14 are affected by defects on the plate. Bottom bar: the literal key output has 1,438 letters; about 44 letter positions were changed by 29 documented editorial interventions, about 3%.The key writes 97% of the letter; editors touched about 3%Marmont cipher, solution package v1.0.01,300 cipher units by strength of evidence427 units match Tant's published partial table805 units supported in several word contexts54 units: contextual or sparse evidence (48 signs)14 units affected by defects on the plateLiteral key output: 1,438 letters, produced by scriptLetters kept exactly as the key produces themH44 letter positions in 29 documented editsData: Church, Marmont Solution Package v1.0.0 (2026). Recomputed and verified by the author, 4 October 2026.
Evidence behind the reading. Data: Church solution package v1.0.0; recomputed by the author, 4 October 2026.

By our count the edits touch about 44 of 1,438 letter positions, about 3%. The package also grades every unit: 1,232 units are comparatively well supported, 54 rest on contextual or sparse evidence, and 14 are affected by defects on the plate2.

This separation is what makes the result auditable. A model’s free text cannot be traced back to evidence. A key can: change one cell and you see exactly which words break.

Did the solver try to break its own answer?

Yes, according to the author: the solver was rerun from scratch with Marmont’s memoirs and every Napoleonic text removed from its scoring corpus, and it recovered the same reading1.

The test targets the reading’s most dangerous weakness: it agrees with history too well. Napoleon’s printed order lists the same seven forces, in the same sequence, with the same figures13. A system that has read that order could produce a fluent “decryption” by remembering rather than decrypting. The better the match, the stronger the suspicion.

If the key had leaned on known history, removing that history should have made it drift or collapse. Church reports that it did not1.

The test has two limits. First, it cleans the n-gram corpus, not the weights of GPT-6 Astra, which almost certainly saw Napoleon’s correspondence during training. That memory could still tilt the value chosen for a sign that appears only once — and 50 signs appear only once2.

Second, the ablation run is not in the published package v1.0.0. We searched every file: there is no corpus, solver log or report for it2. The ablation is the author’s claim, not yet independently verifiable.

The format contains the residual risk. Because the text is a function of key and transcription, a “hint” from model memory can act only through individual sign values, each checked against the plate and listed among the soft spots when evidence is thin2. Content absent from every printed source, such as the Austrian positions, is a further signal that the key reads the cipher rather than the record1.

What did our independent check show?

Our check confirmed that the published package is safe, internally consistent and fully reproducible offline. We ran it on 4 October 2026 in an isolated Linux environment on a Mac (Apple Silicon), with Python 3.10.12 and Pillow 12.3.0.

Code review before running. We read verify.py, reproduce.py and the core module before execution. The scripts use only the Python standard library and Pillow. They make no network requests, launch no other programs, and write only inside the package’s own results/ folder. The single script on the offline reading page is a search filter for the key table.

Results.

File integrity (verify.py)

Result
1,833 files match the internal SHA-256 manifest
Time
2.1 s

Key × transcription → literal text

Result
Byte-identical to the published literal.txt
Time
—

Editorial layer

Result
All 29 interventions replay exactly to the published reading
Time
—

Image evidence

Result
155 glyphs and 1,310 unit crops match the source plate
Time
—

Full rebuild (reproduce.py)

Result
1,800 images identical pixel for pixel; 6 text files byte-identical
Time
3.8 s

Data: author’s run, 4 October 2026, n = 1 machine. Our results match the author’s own validation record dated 19 September 20262.

What we could not check. We verified the unpacked files, not the original archive, so the published SHA-256 hash of the ZIP file was not compared. The plate in the package measures 1,051 × 1,246 px, while the write-up describes a 1,202 × 1,836 px plate; the package does not explain the difference12. The credits list “GPT-6 Astra and Claude” as AI assistance, not Astra alone2.

What remains unproven?

The scripts prove reproducibility, not truth. The package states this itself: a passing check “does not establish unique decipherment or manuscript authentication”2.

  • Uniqueness. Unknown. No one has shown that no other key produces equally good French.
  • Five open readings. Sa Majesté or l’Empereur; “army of Friuli” or “in Friuli”; des or les troupes; a null or the word par; canailles singular or plural. None changes the meaning1.
  • Leakage from model memory. Preliminary: the corpus ablation is reported but unpublished, and model weights cannot be ablated.
  • Independent review. Satoshi Tomokiyo, who maintains the Cryptiana list of unsolved ciphers, reviewed the solution and marked it solved18. That is one expert, not a published peer review.

What makes an AI decipherment claim trustworthy?

An AI decipherment is trustworthy when its output is an artifact a script can check, not prose a model wrote. The Marmont package meets most of the criteria below; the last open item is the ablation.

  1. Artifact, not prose. Transcription, key and code are published, not just a plaintext. Met2.
  2. Deterministic output. The key is applied to every unit by script. Met, verified by us.
  3. Separate editorial layer. Every human repair is recorded and replayable. Met, verified by us.
  4. Per-sign evidence. Each value is checked against every occurrence on the source image. Met, verified by us.
  5. Leakage ablation. Known texts are removed from scoring and the solver is rerun. Reported, not published.
  6. Disclosed uncertainty. Single-occurrence signs and alternative readings are listed. Met2.
  7. Independent review. One expert review1.

Where the model’s own memory cannot be removed, these steps confine it to individual, inspectable decisions. That is the difference between a plausible text and a verified one.

Frequently asked questions

How long did the decipherment take? About six hours of GPT-6 Astra execution time, plus a few evenings of the author’s own work, according to Church1.

What does the letter say? It lists the French and allied armies, places the Austrian corps at Laibach, Klagenfurt, Villach and Salzburg, and tells Marmont not to be intimidated by “a few troops or a gathering of rabble”1.

Can I run the verification myself? Yes. Download the package from Church’s write-up, install Pillow and run python3 verify.py, then python3 reproduce.py; both work offline12.

Did Napoleon introduce the metric system? No. The Revolution adopted it in 1795–1799. Napoleon kept it for the state and schools, but in 1812 allowed traditional unit names, redefined in metric terms, in retail trade; full metric use returned in 184011.

What else did Napoleon build that the letter relied on? A centralized administration, the Civil Code of 1804, state lycées from 1802 with compulsory mathematics, and an extended Chappe optical telegraph reaching Milan, Venice and Amsterdam by 18101213.


  1. Church, C. Breaking the Marmont Cipher, 1809. 18 September 2026. ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎

  2. Church, C. Marmont Solution Package v1.0.0. 2026. Files used: README.md, METHODS.md, CREDITS.md, VERIFICATION.json, inputs/editorial_interventions.tsv, verify.py, reproduce.py. ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎ ↩︎

  3. Correspondance de Napoléon Ier, vol. 18. Paris, 1865, no. 14908, pp. 356–358. ↩︎ ↩︎ ↩︎ ↩︎ ↩︎

  4. Tant, D. Code d’Eugène de Beauharnais. Codes anciens no. 373, ARCSI. ↩︎ ↩︎

  5. Wikipedia. Substitution cipher: homophonic substitution. ↩︎

  6. Euronews. AI decodes 217-year-old Napoleonic letter in 6 hours. 2 October 2026. ↩︎

  7. Vilcoq, J. Le Chiffre sous le Premier Empire. Revue historique des Armées 25(4), 1969, pp. 22–27. ↩︎

  8. Tomokiyo, S. Cryptiana: Unsolved Historical Ciphers. ↩︎ ↩︎

  9. Dhavare, A., Low, R. M., Stamp, M. Efficient Cryptanalysis of Homophonic Substitution Ciphers. Cryptologia 37(3), 2013, pp. 250–281. ↩︎ ↩︎

  10. Kopal, N. Cryptanalysis of Homophonic Substitution Ciphers Using Simulated Annealing with Fixed Temperature. Proceedings of HistoCrypt 2019, pp. 107–116. ↩︎ ↩︎

  11. Wikipedia. French units of measurement. ↩︎

  12. Fondation Napoléon. The “masses of granite”: the new Napoleonic institutions. ↩︎

  13. Selin, S. Napoleonic Telecommunications: The Chappe Semaphore Telegraph. 2020. ↩︎