A computer scientist, a pianist and a physicist walk into an archive…and stumble upon over 50,000 words of encrypted letters, written by Mary, Queen of Scots, more than 400 years ago.
Or, more seriously: three cryptologists have, in their spare time, cracked the code on a stack of encrypted letters they found in an online archive – and discovered that the letters had been penned by Mary Stuart.
Their discovery is published in the journal Cryptologia.
Mary, Queen of Scots had a tumultuous life, concluding with a 19-year imprisonment in England by her cousin Queen Elizabeth I followed by a charge of treason and her execution on 8 February 1587.
During imprisonment, she had an extensive and largely secret correspondence with her supporters in the outside world. These newly decrypted letters were written between 1578 and 1584, and mostly addressed to Michel de Castelnau de Mauvissière, the French ambassador in England at the time.
The letters are held by the Bibliothèque Nationale de France (France’s national library) and available in their online archive, but they were listed in the catalogue as being from the 1520s and 1530s, and linked to Italian affairs.
“Upon deciphering the letters, I was very, very puzzled and it kind of felt surreal,” says first author Dr George Lasry, a computer scientist and member of the DECRYPT Project – a multidisciplinary group from several European universities, which aims to map, digitise and decrypt historical ciphers.
“We have broken secret codes from kings and queens previously, and they’re very interesting, but with Mary Queen of Scots it was remarkable as we had so many unpublished letters deciphered and because she is so famous.”
Lasry, along with cryptology enthusiasts Norbert Biermann and Satoshi Tomokiyo (who are a pianist and a physicist in their day jobs, respectively), used a combination of computer and manual techniques to decode the letters.
“The code was moderately complex compared to other ciphers of the time and took us a while to crack,” says Lasry.
“There are 191 distinct symbols, and this required multiple rounds of analysis, the first one being computerized (30-40% of the text decrypted), and the rest requiring manual work – linguistic and contextual analysis.”
Mary employed techniques like using multiple different symbols for common letters, which prevents people from using frequency analysis to break the code, as well as using single symbols to denote common names or places.
A computer algorithm called hill climbing got the researchers an initial key to work with, from which they could start to decrypt manually. But the most intensive work, according to Lasry, was transcribing the 150,000-some symbols in the letters for a computer to read in the first place.
“It took a few weeks to start cracking the code and reading some parts, but the transcription work and the deciphering & interpretation of the decrypted text – 50,000 words in total – took most of the time.
“We started this project in early 2022 and worked until the end of 2022, all in our free time. But this was a more rewarding effort, to read Mary Stuart’s secret correspondence for the first time after 400 years.”
As they began to decipher fragments, they noticed a few clues in the letters as to who may have written them.
“It emerged that the writer was in captivity, had a son, and was a woman, which could match Mary Stuart,” says Lasry.
“The definitive clue was the mention of Francis Walsingham, Queen Elizabeth’s first secretary and spymaster, who is well known for having spied on Mary during her captivity.”
British archives already had copies of a few of the letters, which helped confirm their source. But most of the 57 total letters found were unknown to historians.
The researchers suspect that inspecting physical documents, and more comprehensive online searches, would reveal yet more letters.
“These discoveries will be a literary and historical sensation. They mark the most important new find on Mary Stuart, Queen of Scots, for 100 years,” says Dr John Guy, a historian at the University of Cambridge, UK.
“I’d always wondered if Michel de Castelnau’s original versions of Mary’s 55 ciphered letters could turn up one day, buried in the Bibliothèque Nationale de France in Paris or perhaps somewhere else, unidentified because of the ciphering. And now they have.
“The letters show definitively that Mary, during the years of her captivity in England in the Earl of Shrewsbury’s custody, closely observed and actively involved herself in political affairs in Scotland, England and France, and was in regular contact, either directly, or indirectly through de Castelnau, with many of the leading political figures at Elizabeth I’s court.”
Read more: Maths, encryption, and quantum computing
An example of this is a letter dated 20 January, 1580, reproduced and translated in the paper.
“If in this next parliament the succession is dealt with, please remember to speak to the queen of England on my behalf and to make the same pleas that I previously wrote to you,” writes Mary.
While they’ve provided summaries of the letters and a few complete reproductions in their paper, the codebreakers didn’t analyse the letters in depth – they say that’s a job for historians, and will likely take some time.
“It would also be great, potentially, to work with historians to produce an edited book of her letters deciphered, annotated, and translated,” says Lasry.