Charles V’s encrypted letter: a centuries-long riddle solved

Changed on 10/05/2023
Thanks to the combined efforts of four researchers from Inria, Loria (CNRS, Inria, University of Lorraine) and University of Picardie Jules-Verne, an encrypted letter from Charles V has been decrypted and confirmed remarkable historic facts, five centuries after being written. This is the story of an unusual yet successful collaboration between computer scientists and historians.
Lettre cryptée de Charles Quint à son ambassadeur, Jean de Saint-Mauris
Bibliothèque Stanislas Nancy - Licence ouverte Etalab


It is not at all surprising that Charles V, the most powerful monarch of the first half of the 16th century, wrote a letter to his ambassador at the French Court. Nor is the fact that he took care to write it in cipher to protect it from unwelcome eyes, given the diplomatic tension between the two countries at the time. On the other hand, the kind of cipher he used certainly is. Seemingly created by the Imperial Chancellery, the cipher is so complex that the letter kept its secrets for almost 500 years, until a team of four French researchers managed to crack it.

It all began when Cécile Pierrot, Inria research fellow in the Caramba team (a joint undertaking involving Inria and Loria, where she studies modern cryptographic techniques), heard by chance of a “mysterious” letter by Charles V. Mysterious, because, while some scholars had taken a look, none had been able to decode it. However, that is what Cécile Pierrot set out to do, after tracking down the missive at Stanislas Library in Nancy.

Portrait de Charles Quint, d’après Le Titien
Juan Pantoja de la Cruz, Portrait of Charles V, after Titian (approx. 1550), approx. 1605,
Palacio del Buen Retiro.


The four-leaf document features a collection of symbols divided into three short paragraphs, which were originally written in Middle French. Cécile Pierrot started by identifying and associating each symbol with a four-letter word that could then be input into a computer program. She then classified the symbols to determine how many times they appeared. This method is usually able to crack basic ciphers in a few days, by establishing a correspondence between the cipher’s symbols and the letters in the hidden source language.

A highly resistant cipher

The problem in this case came from the number of symbols (120) and the number of letters in the French alphabet (26): the estimated computing time to automatically explore the potential combinations would take billions of years... The researcher therefore decided to seek the help of two of her team colleagues: Pierrick Gaudry (CNRS) and Paul Zimmermann (Inria). They soon got on board to offer their skills in complex analysis and algorithmic logic.

Based on the text’s components, the trio formulated multiple hypotheses that they then tested using algorithms made especially for the project. The first hypothesis involved establishing matches between how often certain symbols appeared and how often certain letters are used in French. Another was based on creating associations between symbols that could correspond to common letter pairings (for example, the letter “Q” is almost always followed by a “U” in French). A third was related to sequences of identical symbols. There was a sequence of eleven symbols repeated twice in the text studied, which was compared to words presenting similar formats or distributions, using dictionaries of Middle French.

All that opened up a few avenues for us,” explained Paul Zimmermann, “but nothing was really conclusive. It was the first time that we experienced a text resisting decoding to this extent.” After six months of work, Charles V’s letter had still not been decrypted.

History to the rescue

At this point, the three scientists thought that perhaps putting the letter back in its historical context could help them better understand the logic behind the cipher’s creation. After activating their networks, they contacted Camille Desenclos (CHSSC), lecturer in Early modern history at the University of Picardie Jules Verne and specialist in relations between France and the Holy Roman Empire, as well as 16th and 17th century cryptography. She quickly started investigating the letter’s recipient, Jean de Saint-Mauris. In the archives kept at the Besançon Library, multiple letters from Saint-Mauris were found, including a letter written in 1545 using the same cipher. For the research team, this document would be what the Rosetta Stone was for Champollion, as in the margins, it presented a plain-language transcription of certain encrypted passages. By matching these new elements with those gathered from the earlier phase of their research, the team was finally able to create the much sought-after encryption key.

However, part of the text remained a mystery. It referred to the death of a king, but none was reported in 1546, the year indicated at the end of the letter. But in the mid-16th century, the new year can start in Easter. Transposed to our current calendar, the letter therefore dates not from 22 February 1546, as written, but 1547, and the death in question is that of Henri VIII, king of England. The last mystery of Charles V’s letter was finally revealed.

An unprecedented collaboration

As for the contents of the letter, they are no less notable than its composition. Charles V speaks of his distrust of Francis I, who supported the Schmalkaldic League, more or less officially, an alliance of German Lutheran princes who entered into rebellion against the Emperor. He also expresses his concerns around keeping the peace established between the two states after another campaign of the Italian wars, which had opposed them since 1494, as if hostilities resumed, their armies would be fighting on two fronts at the same time. Furthermore, he mentions rumours of an assassination plot against him fomented by Piero Strozzi, an Italian mercenary warlord in the service of the French sovereign. This plot seemed to have the king’s indirect agreement as, while he didn’t support it, he never formally spoke against it. Chronologically, this letter is the first to report the rumour, which furthermore, proved to be unfounded.

Decoding this letter was important for two reasons,” said Camille Desenclos. “The first is historic, as it provides better understanding of relations between Charles V and Francis I. The second relates to the history of cryptography.” During their work, the four researchers found many letters addressed to Saint-Mauris or written by him that use all or part of the key that they recovered. This correspondence covers a huge part of Europe, with people writing to each other who were located at the heart of the Holy Roman Empire as well as in Paris, Brussels and Madrid. “Six users and four different countries for a single encryption key, this is a rare case of the scale of European practices at the time,” enthused the historian.

Clé de chiffrement des correspondances entre Charles V et son ambassadeur en France, Jean de Saint-Mauris, 1547
@Cécile Pierrot
Encryption key for the correspondence between Charles V and his ambassador in France, Jean de Saint-Mauris, 1547. When a consonant is followed by a vowel within a word, this syllable is encoded by using the complex symbol associated with the consonant next to the diacritical vowel. For example, NU in plain language becomes O in code, while DO becomes U and BE becomes C. The unique aspect of this code is that it makes a large number of Es disappear, thereby making it more difficult for an adversary without the key to decode it. Simple symbols are used in the following two cases: for vowels, when they start a word or follow another vowel; and for consonants not followed by a vowel.


Encouraged by the success of their enterprise, which resulted in large part from the unprecedented collaboration between historians and computer scientists, the team now plans to repeat the experiment. “We are used to working in isolation, each in our own area of research,” explained Paul Zimmermann. “The multidisciplinary project was highly enriching and particularly stimulating. And what’s more, we had a lot of fun.”

Read more