CODEBREAKERS have cracked the secrets of Mary, Queen of Scots’s lost letters more than 430 years after she wrote them in captivity.

The content of the coded letters, penned by Mary while she was imprisoned by her cousin Queen Elizabeth I and believed for centuries to have been lost, were uncovered by an international team after they found them in a French library.

Using computerised and manual techniques, the research team decoded the letters which show the challenges Mary faced maintaining links with the outside world, how the letters were carried and by whom.

Key themes referred to in Mary’s correspondence include complaints about her poor health and conditions in captivity, and her negotiations with Queen Elizabeth I for her release, which she believed were not conducted in good faith.

Her mistrust of Elizabeth’s spymaster Sir Francis Walsingham is also apparent, as well as her animosity for Robert Dudley, Earl of Leicester and a favourite of Elizabeth are also evident in the letters.

READ MORE: Alex Salmond faces criticism for calling self-ID 'daft ideology'

Mary also expressed her distress when her son James – the future King James I of England – is abducted in August 1582, and her worry that they had been abandoned by France.

George Lasry, a computer scientist and cryptographer, Norbert Biermann, a pianist and music professor, and Satoshi Tomokiyo who is a physicist and patents expert, stumbled upon them while searching the national library of France’s – Bibliotheque nationale de France’s (BnF) – online archives for enciphered documents. The trio only discovered Mary was the author after solving her highly sophisticated cypher system.

Their decipherment work of 57 letters, published in the journal Cryptologia on the 436th anniversary of Mary’s execution, aged 44, at Fotheringhay Castle in Northamptonshire, reveals around 50 new scripts previously unknown to historians.

Mary’s correspondences, written from 1578 to 1584, expose fascinating new insights into her captivity.

Most are addressed to Michel de Castelnau de Mauvissiere, the French ambassador to England. He was a supporter of Catholic Mary who was under the Earl of Shrewsbury’s custody when she wrote them.

Lead author Lasry said: “Upon deciphering the letters, I was very, very puzzled and it kind of felt surreal.

“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.

“This is a truly exciting discovery. Together, the letters constitute a voluminous body of new primary material on Mary Stuart – about 50,000 words in total, shedding new light on some of her years of captivity in England.

“Mary, Queen of Scots has left an extensive corpus of letters held in various archives.

“There was prior evidence, however, that other letters from Mary Stuart were missing from those collections, such as those referenced in other sources but not found elsewhere.

“The letters we have deciphered ... are most likely part of this lost secret correspondence.”

One of the 16th century’s most famous historical figures, Mary was first in line to the English throne after her cousin Elizabeth.

Catholics considered Mary to be the legitimate sovereign and Elizabeth had her imprisoned for 19 years because she was seen as a threat. Mary was eventually executed for her alleged part in a plot to kill Elizabeth.

During her time in captivity, Mary communicated with her associates and allies through extensive efforts to recruit messengers and to maintain secrecy.

The existence of a confidential communication channel between Mary and Castelnau is well-known to historians, and even to the English government at the time.

READ MORE: Classical star Riopy who escaped French cult to play first show in Edinburgh

But Lasry and his fellow codebreakers provide new evidence that this exchange was already in place as early as May 1578 and active for six years until at least mid-1584.

Lasry and his colleagues described how they first came across the letters. Some were in a large set of unmarked documents in cipher and using the same set of graphical symbols.

The BnF catalogue listed them as from the first half of the 16th century, and related to Italian matters. However, the team “quickly realised” – after starting to crack the code – they were written in French and “had nothing to do” with Italy.

Their detective work revealed verbs and adverbs often in the feminine form, several mentions of captivity, and the name “Walsingham” which arose the suspicion that they might be from Mary.

The fact was confirmed by comparing them with the plain text of letters in Walsingham’s papers in the British Library and through other methods. A search for similar letters in BnF collections unearthed 57 letters with the same cipher.

Lasry and his colleagues suggest that other enciphered letters from Mary which are known to have existed may still be missing. He added that a physical inspection of documents, as well as online searches, are needed to uncover them.

Lasry Dr Lasry, who is also part of theDECRYPT Project involving several universities in Europe, with the goal of mapping, digitising, transcribing, and deciphering historical ciphers,added:

“In our paper, we only provide an initial interpretation and summaries of the letters. A deeper analysis by historians could result in a better understanding of Mary’s years in captivity. It would also be great, potentially, to work with historians ... to produce an edited book of her letters deciphered, annotated, and translated.”