hn.today

A 1542 papal cipher cracked with simulated annealing

simonklee.dk33 points5 comments
Screenshot of A 1542 papal cipher cracked with simulated annealing

A 1542 papal dispatch from Cardinal Alessandro Farnese to nuncio Giovanni Poggio switches mid-page from clear Italian into a long run of cipher digits; the encrypted portion runs across several folios and frames operational instructions and news. Frequency counts show odd patterns - digit 7 dominates, certain pairs like 80, 57, 27, 03, 73 recur, doubled digits are rare, and digits alternate between two groups - suggesting a cipher where single digits and pairs encode letters with a null symbol and no consistent word divisions. Earlier catalog keys and puzzle challenges left the text unsolved; the recovered reading yields phrases such as "dopo la partita del Montepulciano," references to preparations against the Turk, "cento naui," Ungaria, Ridolfo Gonzaga, the fortress of Luzara, and named clerics, with the end of the letter returning to cleartext and a partly obscured Roman-numeral date in April 1542.

The solution combined a simulated-annealing outer search that varied assignments of digits to letters with an inner beam-search decoder that segmented digits into one- or two-digit codes and scored candidate readings by a five-gram Italian character model trained on 4.9 million letters (Machiavelli, Castiglione, Vasari, and nunciature OCR). The engine treated dotted/unreadable digits as fragment breaks, penalized nulls and undecodable tokens, and constrained keys to one code per letter. Repeated restarts converged on a stable key (single digits 4,5,6,8 as vowels o,a,i,e among others) that produced coherent Italian and exposed the substantive content of the ciphered instructions.

Read on simonklee.dk5 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Security

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.