We Value Your Privacy

This site uses cookies to improve user experience. By continuing to browse, you accept the use of cookies and other technologies.


Criminal Codes: Ciphers in Classic Mystery Tales

Can you solve the riddles? 

mysteries with ciphers and codes

September 2022 marks the 200th anniversary of the deciphering of the Egyptian hieroglyphs on the Rosetta Stone. The solving of the so-called “Riddle of the Sphinx” by Jean-Francois Champollion was a real-life tale of masterful detection. Unsurprisingly, it sparked a horde of fictional imitators. Here we present a list of classic mystery books with ciphers and codes.

The Gold-Bug

The Gold-Bug

By Edgar Allen Poe

Typically, it was that literary trailblazer and inventor of the detective story, Edgar Allen Poe, who got the idea of using codes in a mystery tale first. Inspired by reading about Champollion’s work, Poe became an expert on codes and ciphers. He even ran a successful newspaper competition in which he challenged readers to outfox him with substitution cryptograms of their own devising. None succeeded.

In 1843 Poe capitalized on the public craze he’d helped create with his short story The Gold Bug. In it, an adventurer named William Legrande discovers a piece of parchment bearing coded directions to a horde of Captain Kidd’s pirate treasure buried on the coast of South Carolina. Poe entered the story into a competition and landed some bounty of his own in the shape of a $100 prize.

adventures of the dancing men

The Adventure of the Dancing Men

By Arthur Conan Doyle

The first appearance of a cipher in the Sherlock Holmes canon comes in this story from 1903. The consulting detective is called in by an Englishman whose young American wife is has been thrown into a panic by a series if peculiar messages. These missives feature childlike stick-drawings of people apparently dancing. Holmes quickly determines that this is a hieroglyph and unravels the code via a method of letter frequency analysis that closely resembles the one used by Legrande in The Gold Bug. The case unexpectedly brings the Chicago underworld to the English countryside and for once Holmes lags a little behind the criminal.

The Valley of Fear

The Valley of Fear

By Arthur Conan Doyle

A decade later, Holmes is back wrestling with another code. This one uses a more complex method than the “dancing men” pictograms—a book cipher. It’s a method familiar to us today through spy movies—the numbered code related to pages of a specific text, in this case a popular British almanac. Holmes is quickly onto it, but things take an evil turn when it emerges the message is from a confederate of Holmes’ nemesis, the math genius turned criminal mastermind, Professor James Moriarty.  The subsequent adventure involves Pinkerton Men and US organized labor. It is notable that both incidents of codes in Sherlock Holmes involve Americans. It’s possible this was Conan Doyle’s small tribute to Poe, a writer who had inspired the creation of Holmes.

perplexing puzzle mysteries

Postern of Fate

By Agatha Christie

Featuring two of the Queen of Crime’s less celebrated detectives, Tommy and Tuppence Beresford, Postern of Fate was published in 1973. It was the last novel Christie completed. The once sprightly Beresford’s are now in their seventies, retired, and living in a seaside resort. Life is dull and predictable until one day, Tuppence discovers a coded message in an Edwardian children’s book. This gets the aging couple back into the sleuthing game and they are soon trying to crack a cold case murder dating back to World War 1 that involves espionage and poison.

Have His Carcase

Have His Carcase

By Dorothy L. Sayers

In this 1932 mystery, Lord Peter Wimsey and his future wife Harriet Vane investigate the brutal murder of a Russian gigolo who believed himself to be the heir to Tsar Nicholas I. The key to his murder lies in a series of cipher messages that appear to be calling the young man back to Moscow to reclaim his throne. Are Bolshevik agent provocateur behind them, or is it someone with a more personal motive, living closer to the English hotel where the victim worked? Dorothy Sayers borrowed the mathematical Playfair cipher used in the novel from fellow crime writer John Rhodes. Rhodes (pen name of Cecil Street) had deployed it in his 1930 mystery Peril at Cranbury Hall featuring armchair detective Lancelot Priestley.

the division bell mystery

The Division Bell Mystery

By Ellen Wilkinson

In 1924 Ellen Wilkinson—a left-wing firebrand—became one of the first women elected to the British Parliament. She was also a talented mystery writer. This 1932 crime classic takes place in a setting the author knew well—the Houses of Parliament. When a US financier is found shot dead in an empty room in the House of Commons the police rule it a suicide. Young politician Robert West, urged on by the financier’s beautiful granddaughter, takes a different view. His investigation into the slaying involves hidden papers, shady characters lurking in the corridors of power, and a notebook filled with coded messages that will eventually reveal the truth about the murder. 

policemans evidence

Policeman’s Evidence

By Rupert Penny

Rupert Penny (pen name of Ernest Basil Thornett) is one of the forgotten figures of Britain’s Golden Age of Detective Fiction. An expert on crossword puzzles, Penny wrote a small series of code-oriented and elaborately plotted mysteries between 1937 and 1941 featuring Chief Inspector Edward Beale, a detective who shares Penny’s passion for puzzles.

In Policeman’s Evidence (1938) a party of guests gathers at a ramshackle manor house in an attempt to solve a centuries-old riddle that will lead—shades of The Gold Bug—to buried treasure. Their deliberations are derailed by the discovery of a dead body in a locked room. Beale is soon on hand and using all his skills—including a knowledge of acrostics—to catch the killer and find the chest of jewels hidden in the house.