How Sleuths Decoded the Secret Letters of a Scottish Queen
When codebreakers found cryptic letters in the French national library, they had no idea they were about to uncover a mystery of royal proportions.

In the second half of the 16th century, a series of encoded letters made their way via trusted couriers to the French embassy in London. These letters contained observations about the political situation in Europe, assessments about the character of figures such as Queen Elizabeth I, talk of spies, and even complaints about ill health.
They were presumably read and then stashed away by unknown hands, and, it seems, eventually forgotten. But in time, those letters made their way to the Bibliothèque Nationale de France, specifically to a folder related to Italy in the 1520s and 30s. As the digital age dawned, the letters were scanned and uploaded in crisp high resolution to the library’s website. And that’s how they came to the attention of a trio of modern codebreakers, who cracked the cipher wide open and made an astonishing discovery: they were written by the ill-fated Mary, Queen of Scots.
It’s the latest twist in the story of a royal whose life was full of them. Mary—also known as Mary Stuart—was born into a world that was turbulent and often downright chaotic. The 1500s were a time of enormous upheaval as the Protestant Reformation upended the stability of Europe, sending shockwaves through royal houses interconnected by a complex tangle of marriages, blood ties, and fierce rivalries. The letters offer a window onto this cataclysmic era marked by bitter religious conflict, irreconcilable political differences, and espionage.
Centuries later, Mary remains a figure of fascination. In the last decade alone, she’s been the subject of a film starring Saoirse Ronan (with Margot Robbie playing her chief rival and cousin, Elizabeth I) and a Gossip Girl-esque TV show on the CW (Reign). A major exhibition of her life and legacy is also being planned for next summer at the National Museum of Scotland. For codebreaker George Lasry, who’s solved many ciphers over the years—even ones penned by other kings and queens—there’s “nowhere near the level of interest that you have in the public like Mary Stuart.”
Now, the decoded letters are providing more insights into who Mary really was and helping push back against misconceptions about her—like the popular portrayals of her as a reckless romantic heroine, dominated by her passions. “My feeling is that she’s full of life, that she is intelligent, that she’s brave,” says Suzannah Lipscomb, co-host of National Geographic’s new series How the Tudors Lost Their Heads, which touches on Mary’s letters and her complex life and legacy. “She could have stayed in France and lived out a cushy life, but she goes back to Scotland to rule, as a queen.” Even 400 years after her death, it turns out Mary Stuart still has secrets to tell.

Mary became queen of Scotland in 1542 at just six days old. The infant monarch was in a dangerous position: “Mary, Queen of Scots was a child of war,” explains historian Dr. Amy Blakeway, senior lecturer at the University of St. Andrews. Centuries of conflict with England had once again erupted into violence while Mary’s father, King James V of Scotland, was on the throne. This time it was turbocharged by the Reformation, thanks to King Henry VIII of England’s decision to break with Rome and divorce his first wife, Catherine of Aragon, in pursuit of an heir with Anne Boleyn. But Scotland, for the moment, remained officially Catholic.
When James died, Henry proposed a marriage between Mary and his son and heir, Edward, to absorb Scotland into England, and later attempted to force the issue with a brutal military campaign. Instead, Blakeway explains, the Scots cut a deal with Catholic France: Mary would marry the heir to the French throne, and France would support Scotland’s fight against the English Protestants. Mary sailed for France at five years old and settled into life at the country’s glittering royal court. Already fluent in Scots and French, she learned Latin and speechmaking as well as the soft skills of politics. At age 16, she became Queen Consort of France when her 15-year-old husband, Francis II, ascended the throne. But he died 18 months later of an ear infection and in 1561, Mary returned to Scotland to rule as Queen in her own right.
In the meantime, the Protestant Elizabeth I—daughter of Henry VIII and Anne Boleyn—had become ruler of England after the deaths of her brother, Edward, and her older sister, the Catholic Queen Mary I. But Elizabeth’s reign lay on shaky foundations. “The Tudor dynasty begins as a royal dynasty through a crown won on a battlefield” by Elizabeth’s grandfather Henry VII, says Lipscomb. “Because it has been gained in that way, there’s always the threat [that] might happen again.” Elizabeth also had a more immediate problem: Henry VIII had made her illegitimate when he condemned her mother and declared their marriage void. Though he eventually placed Elizabeth back into the line of succession, as far as Catholics were concerned, Henry’s marriage to Anne Boleyn had never been legal in the first place. So when Elizabeth took the throne in 1558, it wasn’t clear that she could hold on to it.
One of the tools she turned to in order to maintain her grip was the use of spies. This was common among rulers of her era, of course. “Everybody is trying to get intelligence that might give them an advantage over their enemies,” explains Lipscomb. But Elizabeth’s right-hand man, William Cecil, and her spymaster, Frances Walsingham, were pioneers at the art of espionage. They “established a network of spies and agents and informants who they call their intelligencers,” says Lipscomb. Together, they collected vast amounts of information about anything and anyone that might potentially threaten Elizabeth.
One person they watched very, very closely was Mary Stuart. That’s because Mary had a good counterclaim to the English throne. “If you’re searching for the next in line to the throne, by the principle of primogeniture, well, you go back up the family tree, you find Henry’s older sister, you follow that one down and you get to Mary, Queen of Scots,” explains Lipscomb. “From that point of view, she clearly ought to be on the throne and that's what Catholics believe at the time.”
When Mary returned to Scotland, it was still struggling under the toll of war with England and military mobilization. It was also an increasingly Protestant country. Almost as soon as she took power, things went wrong, one after another. She entered into an unpopular marriage with her half-cousin, Henry Stuart (Lord Darnley), angering both Elizabeth and many Scottish nobles. She became pregnant with a boy—potentially a further threat to Elizabeth’s rule—but rumors swirled that her private secretary was really the father, and Darnley was present when the man was dragged from Mary’s side and murdered. Mary gave birth to her son, James, in 1566 and the same year even discussed going so far as to divorce Darnley, though it was ultimately a nonstarter due to the implications for James’s legitimacy. A few months later, Darnley was found dead in a suspicious explosion. A leading noble, the Protestant Earl of Bothwell, was widely suspected of his murder; Bothwell soon abducted and raped Mary, essentially forcing her into marriage. By this point, outrage had built to such intensity that rebel lords seized their opportunity. In the end, Mary abdicated, the throne passed to her baby son, and she fled to England in hopes that Elizabeth would help her regain power. Her hopes were dashed: Elizabeth had her imprisoned instead.
But Mary had her own covert operations, too, even while in prison, and that’s where her enciphered letters come into play.
At first, the cache of letters in France’s national library just seemed like another cool mystery to crack. In 2021, codebreaker Satoshi Tomokiyo was combing through the library’s digitized archives, looking for unsolved ciphers. That’s how he found a batch of letters, tucked into a section related to early 16th-century Italy. The pages were a sea of tiny symbols, unfamiliar squiggles and letters with adjacent dots to transform their meaning. There was no key and no context clues like dates or signatures. Tomokiyo knew the find would be catnip for the modern-day international community of cryptographers who specialize in solving historical writings.
Tomokiyo posted the letters on his website, Cryptiana, on a page where he shares unsolved ciphers. One of the site’s readers, computer scientist George Lasry, decided to give the decoding a try. Using a computer program of his own design, Lasry first tried cracking the cipher on the assumption the underlying language was Italian—a dead end. Later, though, he went back to the letters and tried again, this time with French. The code began to give way.
But simply knowing the language wasn’t enough to unlock the letters. Lasry’s computer program only got him partway there. The rest of the codebreaking involved painstaking manual effort, and eventually he brought in both Tomokiyo and another codebreaker, Norbert Biermann. “Usually we compete,” explains Lasry, each person racing to find and crack unsolved cryptographs. But this time, they put their heads together.
Misdirection was built into the code, such as a symbol for “double the previous symbol.” That’s a way to hide a particularly useful clue for codebreakers: double letters. Another symbol meant “disregard the previous symbol.” Some symbols stood for letters, while others were entire words, such as “negotiation” or the names of specific people. “You build a concordance of all the instances of each symbol that you don’t understand, and then you say, OK, what can fit here and here and here,” says Lasry.
“Sometimes you make bad decisions,” Lasry admits. “You backtrack, and you say, let’s try something else.” The three men eventually puzzled out that they had more than 200 distinct symbols: “It’s not the most complex, but it’s quite complex,” says Lasry.
As the cipher began to unravel, clues emerged: references by the letter-writer to a son as well as talk about their “liberté,” plus gendered word endings that suggested the hand of a woman. “A woman, with a son, in captivity,” says Lasry, one who was sending letters in a sophisticated cipher. Mary was a prime candidate to fit the details piling up. And then they saw a name: Walsingham. Queen Elizabeth I’s fearsome spymaster. “It clicked immediately,” says Lasry. “Even now when I’m talking about that, I have goosebumps.”
The trio of codebreakers ultimately discovered that their cache of more than 50 letters was written between 1578 and 1584, during the 20 years that Mary spent imprisoned in England. Even though she was closely watched, Mary managed to slip letters in and out. “Mary also has her own network, her own spies, she is sending out messages secretly while she is in captivity, and she does so successfully for quite some time,” says Lipscomb.
The decoded letters offer an intimate glimpse of Mary at work, still a savvy operator attempting to play a part on the world stage. “What the enciphered letters have shown us is that she’s still gaining intelligence, she’s still making deductions about the geopolitics of the time, she’s being astute, she understands court machinations,” says Lipscomb. “She is doing everything she can in that situation.”
The letters show her wrangling supporters and allies—for instance, passing along bits of advice for her brother-in-law the Duke of Anjou as he arrived in England to court Elizabeth I. “Apologize to him on my behalf for not having written to him yet, for fear of putting him under suspicion and of harming his negotiations, which however I will not fail to assist with everything I can through my friends,” Mary wrote, according to the cryptographers’ initial translations. (She also insisted that, while she supported the marriage, the English weren't negotiating in good faith. The courtship ultimately didn’t pan out.)
She could also be quite frank, Lipscomb adds. “She talks about Walsingham as a cunning man who hides his true intentions under the pretense of friendship—I mean, say what you really think.”
In the end, Mary never made it out of prison, and enciphered letters—much like those in the rediscovered cache—precipitated her downfall. Her weakness wasn’t the cipher, but what modern cybersecurity experts would call human engineering. “As with detection today, all these systems, all this confidentiality is as strong or as weak as the trustworthiness of your force. So if someone leaks something or is a double agent, then everything is potentially in ruins,” says Lipscomb.
That’s what ultimately brought Mary down. Cecil and Walsingham had a man in the courier network she used to smuggle her secret correspondence out of prison to the French embassy in London. Elizabeth’s agents waited until Mary seemed to sign off on a poorly planned plot to assassinate Elizabeth, then pounced. In February 1587, in a shocking turn of events that reverberated across Europe, Mary went to the executioner’s block. Determined to set the narrative to the very end, she proclaimed herself to be dying for her faith and wore the red of Catholic martyrdom as she laid her head down for the axe.
In a final irony, though Elizabeth removed her rival, it was Mary’s bloodline that would inherit the throne. Elizabeth never married and never produced an heir; when she died, Mary’s son, James VI of Scotland, inherited the throne of England, named by Elizabeth as successor, paving the way for the unification of the two countries into Great Britain.
The decoded letters are currently being translated and prepared for publication with the assistance of scholars, to make them more widely available for study. There remain other mysteries about Mary to unravel, too, beyond what the letters can tell us. Blakeway, the St. Andrews historian, would like to know more about Mary’s time on the throne of Scotland—a topic that sometimes gets lost amid the focus on the tumult and her involvement in international politics. Mary’s reign was brief, but she oversaw projects like a comprehensive overview of laws published by the Scottish Parliament. “It’s a really crucial period for the development of the Scottish state, and it would be fascinating to know more about how that practically works under Mary,” she says.
There’s also no way to know what else might yet turn up from the life and times of Mary Stuart and her Tudor cousins. Tomokiyo wasn’t looking for Mary’s lost letters; he was simply seeking new ciphers. “For the most part, when we discover these things, we don't necessarily know that the gap is there,” says Lipscomb. “Because there are so many gaps, there are so many things we don’t have.”