Mary Queen of Scots Letters Decrypted

This is a neat piece of historical research.

The team of computer scientist George Lasry, pianist Norbert Biermann and astrophysicist Satoshi Tomokiyo—all keen cryptographers—initially thought the batch of encoded documents related to Italy, because that was how they were filed at the Bibliothèque Nationale de France.

However, they quickly realised the letters were in French. Many verb and adjectival forms being feminine, regular mention of captivity, and recurring names—such as Walsingham—all put them on the trail of Mary. Sir Francis Walsingham was Queen Elizabeth’s spymaster.

The code was a simple replacement system in which symbols stand either for letters, or for common words and names. But it would still have taken centuries to crunch all the possibilities, so the team used an algorithm that homed in on likely solutions.

Academic paper.

EDITED TO ADD (2/13): More news.

Posted on February 9, 2023 at 7:15 AM13 Comments


Clive Robinson February 9, 2023 2:20 PM

@ Bruce,

Whilst they might well be “Mary Queen” of Scots’s –rightfull heir to the throne– letters the provinence has not yet been proven.

That said they are fairly hundrum letters of often little more than an administrative nature, suggesting she had reason to think Wallsingham was intercepting her mail. But the number and range of names mentioned within suggests it’s very unlikely they are fakes, unless drawn up by a real expert in the field..

JonKnowsNothing February 9, 2023 4:35 PM

@Clive, All

re: Historical diplomatic correspondence provenance

Eons ago, I read a historical account of diplomatic correspondence at the time of the American Civil War (1860s). It was translated and the account followed the reporting to one of the Courts of Europe about the activities, catastrophes and victories of the US War.

Being that it was a more scholarly work of non-fiction, I never questioned the authenticity of the reports as there were facsimiles of the documents, along with the translations printed in the book.

Forward about 40 years, and I read there are all sorts of academic, historical and cultural challenges to that particular period of US History and books written about that period. There were many claims that such books were (fill in the blank) inaccurate.

I don’t know for certain if the book I read at the time, was part of the tranche of suspect works. I would like to think it was not. It did make me more cynical about non-fiction and historical reports. Not just that they might have gotten a particular translation incorrect, or missed an important reference but that such works are used to deceptively mislead readers about historical events. Beyond the normally expected “The Victor writes the History”, but intended to do greater damage and inflict view points that maybe harmful, bigoted, intolerant and of dubious value.

Governments are more than capable of getting academics to write such works. The excesses of the Chinese Cultural Revolution (mostly now repudiated) are shocking enough. To envision that the same behavior from the US Government to influence in academia, was even more shocking to me.

Ted February 9, 2023 10:55 PM

That is really fun research!

A note to self: 1) plotting is risky, especially against reigning monarchs, even if it’s your cousin 2) spymasters are going to spy; also they may recruit moles in places like the French embassy.

God bless Mary, Queen of Scots. It would be tough to ascend to the throne at six days of age.

It’s wild that the incriminating message that really threw Mary on the wrong side of her cousin, Queen Elizabeth, was encrypted by an even less complex cipher than the one unravelled in this excellent research.

(The Babington Plot message only used a monoalphabetic substitution cipher with a small nomenclature.)

The cipher used to encrypt these recently discovered messages – a homophonic cipher with a nomenclature – is really fun to examine. You can see the complete reconstruction of the Mary-Castelnau cipher in Figures 13 and 14 of the paper. It has 219 distinct graphical symbols.

It’s fascinating how the researchers break the ciphertext down with a computer algorithm and contextual analysis. Looking at the key now, the cipher doesn’t seem absolutely preposterously complex, but it’s really fun and clever.

Solving those kinds of mysteries could be addictive!

JonKnowsNothing February 10, 2023 12:58 AM

@Ted, All

A few tidbits or bread crumbs…

Mary of Scotland, was Queen of France before she was Queen of Scotland.

Henry II of France was married to Catherine de’ Medici, and it was their son, The Dauphin Francis II of France that married Mary of Scotland. When Mary of Scotland married Francis II of France, he became King consort of Scotland.

After he died, Catherine de’ Medici remained as Regent and Mary returned to Scotland.

There is a beautiful place in the Loire Valley: Château de Chenonceau where Mary and many other powerful people of their time lived. Mary’s Scots guards carved their names on the chapel wall there.

If you ever have a chance to visit this Chateau, inside the walls, much of modern Europe was laid down, the rooms where Mary lived, the plans of Catherine de’ Medici, and the schemes of many nations evolved. The wars between Catholics and Protestants fomented and spread across Europe and England and remain as scars on many societies.

So much beauty, generated so much hatred.


htt ps://en.wikipedia .org/wiki/Ch%C3%A2teau_de_Chenonceau

(url fractured)

JonKnowsNothing February 10, 2023 1:08 AM


correction: Mary of Scotland, was also a Queen of France before she was moved back to Scotland.

Mary became a double queen: first of Scotland and then France on her marriage. But she lived from early age France, so I think of her as a French Queen but she was a Queen of Scotland from birth.

Clive Robinson February 10, 2023 2:02 AM

@ JonKnowsNothing,

You might want to look up why “Elephant and Castle” just to the south and east of Southwark central London is named the way it is (hint it’s from how French was heard by non French speakers).

Also the real story of why “London Bridge” came tumbling down (hint she was a shopaholic).

As for historical “Diplomatic Documents” from that time, whilst they might be written by the diplomats secretary, more often than not they were not at all truthfull, but said what various others wanted to have said.

The classic was Henry VIII and a search for a new wife. He was lead to believe in both letters and paintings that his proposed bride was both fair and beautiful…

On first meeting her unexpectedly he thought she was an ugly maid.

(Henry thought most of the female servants were plain/ugly, apparently without realising they had been selected to be plain at best to protect both him and the servants).

Clive Robinson February 10, 2023 4:10 AM

@ Ted,

“plotting is risky, especially against reigning monarchs, even if it’s your cousin”

Mary’s known corespondance suggests she was not plotting but just wanted to get out of prison and away from both Scotland and England.

Also remember she was allegadly forced into marriage by rape by the man who again allegadlt had her husband murdered…

Or so the story goes… Put about by the “Protestant Lords” who were “in fighting” for a whole bunch of reasons (none of which make real sense when seen through modern eyes).

Further she was deposed from her monarchy by the very same lords and put in prison (because they needed her alive, and would have killed her otherwise).

Part of the problem is Mary having been brought up in France was a devout Catholic, could barely speak the toungs of england let alone Scotland and even though the only legitimate heir to both the Scottish and English crowns –unlike Elizabeth who was not– the “Evils of Popish ways” was not wanted in what later became mainland Britain.

Every few years “new evidence” about Mary and those around her turn up and is not helped by the fact that many of those involved were very much duplicitus, at the very least you had “Catholics” were pretending to be “protestants”, because Catholics were seen almost the same way witches were (look up the history of “Priest Holes”).

As for the letter that condemed Mary it is it’s self highly suspect…

The reason it used a weak “known code” is an object lesson from which we could @ALL still learn from in the modern world.

Mary had been imprisoned without the aid of a secretary who would traditionally have carried out the work of using codes for secrecy (note the similarty of secretary and secrecy).

She was approached by a bunch of Catholics who were going to “spring her from prison” they had no “shared secret” by which security could be achieved. The use of the code was like “pig-pen” was rather more to obscure the message from the message from a casual reader or untrustworthy carrier. They hoped to achive secrecy by using a supposadly trustworthy courier who smuggled the messages in and out in wine barrels. The reality “apparently” is Lord Walsingham planted the courier, and was copying the messages (which is doubtful due to the way they used to fold and cut letters to make them tamper proof). So what was read into court by Walsingham was probably a fabrication anyway.

modem phonemes February 10, 2023 9:16 AM

I’ve always wondered if a lot of the incriminating correspondence in the case of Mary Queen of Scots, and also other intrigues such as the deaths of Mary of England and Cardinal Pole, the Gunpowder plot, and so on, were really “stings” perpetrated by Walsingham and the Burghleys.

lurker February 10, 2023 2:35 PM

@Clive Robinson

The Chinese word for secretary is 秘书, the first character mi is secret or concealed, the second character shu means, depending on context book, document, writing. Secretaries usually wrote letters, because although the monarch was always literate, the secretary could write neater, faster, and smaller.

Codes were rarely used for official correspondence, the transmission channel was assumed secure.

Winter February 21, 2023 2:40 AM

A nice summary of Mary’s predicament:

What Mary, Queen of Scots, can teach today’s cybersec royalty
Tech has changed in 400 years. The rules haven’t

Fortunately for most of us, we don’t literally risk our necks or the fate of nations when we make security decisions. We also don’t create secrets that attract attention four hundred years later. Understanding risk and reward is the final truth of security engineering – that, and never working with family.

Clive Robinson February 21, 2023 5:45 AM

@ Winter,

With regards The Register piece on Mary Queen of Scots…

I think the writer should spend,

1, A little more time in reading basic history books.
2, A little more time in reading basic information theory books.

About the only advice given that most readers will see is “never working with family”.

“Understanding risk and reward is the final truth of security engineering – that, and never working with family.”

As for “understanding risk and reward” it is one of those glib statments that sound good but… It’s not something that can usually be done because you can not know the future only guess based on a distinct lack of information. It also sufferers from the “Defence Spending Paradox”.

Thus the advice realy boils down to,

“Don’t trust those who may be untrustworthy at any time.”

Which is kind of the same as,

“Never trust and be forever paranoid”.

If you look at the piece dispassionately you will see it’s a “pot boiler” badly stiched together on two recent news stories with a sprinkling of incorrect information.

I can go through it point by point and rip it appart, but there will be complaints about length or depth, and to be quite honest I’m getting fed up with ad hominem attacks from what is when all is said and done not even up to the standards of “The Troll p’nut gallery”.

Nathan Mariels February 23, 2023 9:17 AM

When does SHA256 (ivec,block) = ivec?
ivec: 2EC557A2 0B6E2499 0CF13E72 2CDD2309 CD4AB124 B54D3298 9FBAAA26 595767F4
block: 4E617468 616E4D61 7269656C 73800000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000068
hash: 2EC557A2 0B6E2499 0CF13E72 2CDD2309 CD4AB124 B54D3298 9FBAAA26 595767F4

to test block with a given ivec

Leave a comment


Allowed HTML <a href="URL"> • <em> <cite> <i> • <strong> <b> • <sub> <sup> • <ul> <ol> <li> • <blockquote> <pre> Markdown Extra syntax via

Sidebar photo of Bruce Schneier by Joe MacInnis.