Mary, Queen of Scots’ cipher letters
Cipher letters hidden in beer barrels… and decoded by the enemy

Thomas Phelippes and Anthony Babington — Public domain — Wikimedia Commons
In brief
Held prisoner in England, Mary, Queen of Scots, wrote in secret to plotters who wanted to kill Queen Elizabeth I. Her cipher letters were intercepted and decoded by Elizabeth’s spies. In 1587 they sent her to the scaffold.
The story
In 1586, Mary was held at Chartley Hall. A young Catholic, Anthony Babington, was preparing a plot to free her. Their letters left hidden in the beer barrels delivered to the house, written with a “nomenclator”: symbols for letters and others for common words. But the messenger, Gilbert Gifford, worked for Francis Walsingham, Elizabeth’s spymaster.
The codebreaker Thomas Phelippes broke the code using frequency analysis. He even added a forged postscript to one of Mary’s letters asking for the names of the plotters. Mary was tried and executed on 8 February 1587. In 2023, three code enthusiasts, George Lasry, Norbert Biermann and Satoshi Tomokiyo, deciphered 57 more letters by Mary, found in the National Library of France, where they had been wrongly filed among Italian documents.
Did you know?
A poorly chosen code is more dangerous than no code at all: believing themselves safe, Mary and Babington wrote out their plans in full.
Sources: D. Kahn, The Codebreakers, 1967 (rev. ed. 1996); S. Singh, The Code Book, 1999; F. L. Bauer, Decrypted Secrets, 4th ed., 2007; C. P. Bauer, Secret History: The Story of Cryptology, 2nd ed., 2021; texts written for this site.
The Polybius square
The Caesar cipher
Trithemius’s tabula recta
The Vigenère cipher
The Great Cipher of Louis XIV
The Playfair cipher