In 1643, a young chaplain named John Wallis was at a London dinner party hosted by his patron when another guest mentioned a most intriguing bit of political gossip. England was several months into a Civil War between royalists and parliamentarians, and the latter group had intercepted a royalist letter after the December 1642 battle of Chichester. It could have been a priceless bit of strategic intelligence, if not for one rather thorny problem: The letter was written in code, and no one on the parliamentarian side could figure out what it said.

Not a little audaciously, Wallis, a young clergyman, offered to try his hand at deciphering the letter. If Wallis’s diary is to be believed, he cracked the code before going to bed that night, and so began a new career as one of England’s foremost cryptographers. On October 7, 2020, Dominic Winter Auctioneers in England sold a collection of 53 letters deciphered by Wallis, for £29,000 (roughly $37,000). The 1653 volume covers only what Wallis called “the late warres in England.” He would, however, decode many more texts before his death in 1703.

In an email, Dominic Somerville-Brown, a specialist at the auction house, describes the manuscript as “basically an exercise book with the workings already shown, rather than a theoretical manual of any kind.” Wallis even reprinted four undeciphered letters (though he’d presumably cracked them himself) at the end of the manuscript, as a challenge for readers who might be interested in learning the art and science. Though he was frustrated by the lack of guidance at the time regarding code-breaking—in this manuscript’s introduction, he calls out the texts that “onely … shew how to write in cipher,” not how to read it—Wallis wasn’t particularly revealing of his own methods. Researchers have had to infer quite a bit about how he approached his groundbreaking work.

Before and after.
Before and after. Courtesy Dominic Somerville-Brown, Dominic Winter Auctioneers

Then again, the process might have been deceptively simple, and more or less intuitive for someone with Wallis’s aptitude for numbers. Philip Beeley, a historian of mathematics at the University of Oxford who has written extensively on Wallis, says that all code-breaking simply comes down to patterns, that it’s “an innate skill you might have if you were numerically minded.” In these written letters, Beeley explains, each number (or combination of numbers) corresponds to an alphabetical character (or a combination of them), and it’s up to the decoder to ask: How frequently does a given alphabetical letter appear in this written language? (This common code-breaking practice is known as frequency analysis.)

Beeley points, for example, to a letter intercepted from the French envoy to Poland that begins, “125 300 28 395 349 398 28 54 24 331 332 20 269 358 325.” Using four pages of this, Wallis determined that this meant, “Copie d’une lettre escrite a Mr le Cardinal,” or “Copy of a letter written to M. the Cardinal.” So astute was Wallis’s breakdown that he detected the “325” as a typo: It didn’t jibe with the rest of the letter, which repeatedly used “335” as code for “Cardinal.”

Wallis might finish reading a letter and have tables upon tables of possible matches to sort through. With any luck, a few more passes would clear things up and reveal the patterns hidden in the text. Certain code words, however—including names and titles such as Rome, Paris, the Pope, and King Charles—could remain indecipherable even to someone like Wallis, as these would be indicated by highly specific numbers that don’t match the cipher, and would be known only to the code’s architects and recipients. But he was able to reason out “Cardinal” regardless.

John Wallis would eventually become the secretary of state's official decipherer.
John Wallis would eventually become the secretary of state’s official decipherer. Jeangagnon / CC BY-SA 3.0

This all helps explain why Wallis found such quick success with that first letter, handed to him at the dinner party. Frankly, it was none too specific, and not of much help to the parliamentarians’ cause. (It did, however, invoke a racist comparison to describe their brutality in battle, calling them “more like Turks than Christians.”) On the other hand, on strength of this early success, Wallis was given another letter that took him several months to deconstruct. Written by Charles I’s exiled secretary of state, Francis Windebank, it describes his preparations to escape and relocate should his situation become untenable—the kind of information an exile would want to keep secret.

Wallis’s reputation as a codebreaker grew to the point that adversaries began to assume his involvement even in the absence of evidence. “The greatest intelligence coup in the English Civil War,” writes Somerville-Brown, “was the capture of the King’s cabinet after the Battle of Naseby,” in 1645. The letters therein describe King Charles I’s positions on foreign assistance in the war, Irish rebellions, and laws regarding Catholicism. Thomas Hobbes himself pointed a surly royalist finger at Wallis, and accused him of helping to decode the letters. Beeley says that no proof of Wallis’s involvement exists. Most of his contributions to parliamentarian espionage, says Beeley, came through letters intercepted in the Netherlands, in which royalist exiles plotted to take back power.

These letters’ political utility may be long expired, but once it’s safe to do so, aspiring codebreakers may want to venture to Oxford’s Bodleian Libraries, where other copies of this manuscript are part of the collection. Wallis left those unsolved letters at the end for this specific purpose. Happy cracking.