# A 1542 Papal Cipher Cracked with Simulated Annealing

> Hacker News story 49744036 · language: en · submitted 2026-09-17
> Web version: https://zeli.app/story/49744036
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 47 · by [grigolin](<https://news.ycombinator.com/user?id=grigolin>) · 💬 6
[original](<https://simonklee.dk/farnese-letter>) · [HN discussion](<https://news.ycombinator.com/item?id=49744036>)

## Summary

A 1542 letter from Cardinal Alessandro Farnese to the papal nuncio in Spain stayed unread for centuries, its digits hiding the key. By combining a beam-search decoder with a five-gram Italian language model and simulated annealing over possible keys, the cipher was broken. The recovered key assigns one or two digits per letter, with a single null; the opening reads 'Dopo la partita del Montepulciano', matching the cleartext on the same page.

## Key quote

> The difficulty is deciding where each code ends. `73` is _d_, but `7 3` is also two letters, _n m_. Even with the key, a run of digits can be read more than one way.

## HN discussion (6 comments)

### [userbinator](<https://news.ycombinator.com/item?id=49762137>)

> Mentally autocorrected the title to "paypal cipher" and got enticed to click...
>
> More seriously, this looks like the context modeling that advanced compression algorithms do, but in reverse.
>
> Recovering the key does not settle the text.
>
> That said, the Claudish in this article is only slightly annoying.

### [raphlinus](<https://news.ycombinator.com/item?id=49762278>)

> I had a sense. Pangram identifies this as AI.

### [esafak](<https://news.ycombinator.com/item?id=49762457>)

> I knew it was going to be cryptography. Everybody's cracking something these days. See also: https://news.ycombinator.com/item?id=49738551

---

## Cite

- Page: https://zeli.app/story/49744036
- Date: 2026-09-17
- Source: simonklee.dk (https://simonklee.dk/farnese-letter)
- Hacker News: https://news.ycombinator.com/item?id=49744036

## Other languages

- zh: https://zeli.app/zh/story/49744036 · markdown: https://zeli.app/zh/story/49744036.md
- ja: https://zeli.app/ja/story/49744036 · markdown: https://zeli.app/ja/story/49744036.md
- ko: https://zeli.app/ko/story/49744036 · markdown: https://zeli.app/ko/story/49744036.md
- de: https://zeli.app/de/story/49744036 · markdown: https://zeli.app/de/story/49744036.md
- es: https://zeli.app/es/story/49744036 · markdown: https://zeli.app/es/story/49744036.md
- ru: https://zeli.app/ru/story/49744036 · markdown: https://zeli.app/ru/story/49744036.md
