A mysterious sheaf of coded letters tucked away in the National Library of France (BnF) has turned out to be never-before-seen correspondence from Mary, Queen of Scots.

Also known as Mary Stuart, the then deposed queen of Scotland, who was a contender for the English throne, wrote these 57 ciphered letters between 1578 and 1584. They were mostly addressed to Michel de Castelnau, French ambassador to England. At the time, Mary was in the custody of the Earl of Shrewsbury, imprisoned because Queen Elizabeth I feared Mary and her supporters intended to install her as queen of England. A later letter, written in 1586 and not part of this cache, would eventually spell Mary’s doom. One of Elizabeth’s spies, Sir Francis Walsingham, tricked Mary into believing her letters were secure and intercepted one supporting Elizabeth’s assassination. As a result, Mary would be beheaded for treason in 1587.

Cryptographer George Lasry of the DECRYPT Project, a multiuniversity collaboration that attempts to find and decode historical ciphers, and other scientists were combing through the archives at BnF when they came across pages of ciphers mixed in with documents from Italy dating to the early 1500s. The ciphered letters were believed to be Italian. But as the researchers began to try to crack the code, they realized that the deciphered words would have to be in French for them to make sense.

The letters used what’s known as a homophonic cipher, the researchers explain in a study published on Tuesday in the journal Cryptologia. In such a cipher, each letter of the alphabet is replaced with a particular symbol. But a simple substitution cipher is easy to crack because certain letters, such as “e,” appear much more often than others. So homophonic ciphers used multiple symbols interchangeably for high-frequency letters, Lasry says. And to further complicate things, like other ciphers of this type, Mary’s cipher also used dedicated symbols to replace some high-frequency words and common word segments.

“Working on the decryption was like working on an onion that you needed to peel,” Lasry says. “The cipher was quite complex, and we worked in phases.”

This figure shows the cipher used to decode Mary Stuart's letters.
The researchers deciphered the meaning of the symbols used in Mary Stuart's letters. Credit: Lasry, Biermann, Tomokiyo

The truth of the letters came out a little at a time: First, there was the realization that they weren’t in Italian. Then came the discovery of French phrases such as “ma liberté,” which suggested that the writer desired freedom. Finally, out popped a telltale name: Walsingham, Queen Elizabeth’s infamous spymaster.

Most of the 57 letters had never been seen before Lasry and his colleagues’ discovery. But seven of them had been intercepted and decoded by Walsingham’s network, so deciphered copies were in the U.K.’s National Archives. These matching copies helped confirm beyond a doubt that Mary was the writer, Lasry says. In the newly decoded letters, Mary frets over her health, tries to get the French ambassador to make requests of Elizabeth on her behalf and raises her suspicions that ongoing negotiations over her freedom may not be in good faith. The letters are largely diplomatic, with little sense of Mary’s personal feelings, Lasry says. That diplomatic focus is exciting for historians, says Susan Doran, a historian at the University of Oxford, who is working on a project on Mary but was not involved in the new study. Much of the content of the letters is about wider issues of diplomacy than simply Mary’s attempts to reclaim the throne of Scotland or make a play for the throne of England, Doran says.

“She’s negotiating with the Spanish, with the French—evident in these letters—with Scotland and with Elizabeth. And it really does deepen our sense of her as a political animal, not just as a captive queen,” Doran says. “There’s much more to Mary than the plotting.”

Historians will now need to pore over the letters and put them in the context of Mary’s life and situation, Lasry says. There are about 50,000 words worth of new material, a book’s worth of new words from Mary, Queen of Scots. “We have only scratched the surface,” Lasry says.