Skip to content

The Culper Codebook


 




 

Output:


 


Note: This program can't determine if a non-codeword is a letter or number while decoding. That's why the creators of the Culper Code instructed that a single underline indicates a letter translation, and a double underline is a number. This program supports the underlining while encoding but cannot determine which is which while decoding. I don't know what to do here.

The feature to prepend a ~ represent different moods, tenses, and plurals will come later, but it might be difficult without a dictionary.

Background

Most people know George Washington as the first president of the United States. They also know him as the head general in the Revolutionary War. Washington was also a spymaster. Some say that he outspied the British so well that that's why the U.S. won.

It didn't start that way, though. Washington learned a hard lesson when his "first" spy, Nathan Hale, was caught and hung by the British in 1776. Hale's capture was due to inexperience and rookie mistakes, including admitting he was a spy to a British Army Officer, Robert Rogers.

George Washington appointed Major Benjamin Tallmadge as Director of Military Intelligence in 1778. Tallmadge organized a network of spies known as the Culper Ring with the help of others. They were better trained and organized than two years ago.

The Culper Ring employed various methods of secret communication, including invisible ink, black petticoats, and handkerchiefs.

Anna Strong was a member who owned a farm where she hung a black petticoat on a clothesline to signal another spy, Caleb Brewster, that new spy documents were ready for him to pick up. Strong also hung assorted handkerchiefs to indicate which location to retrieve them.

The Culper Ring had another technique to convey messages; they created a secret code with a codebook.

The codebook contains 704 regular dictionary words and several symbols, each mapping to a unique number.

A casual observer can see that many of these words are politically and militarily centric, especially for a spy reporting on enemy troop movements, supply lines, battles, and fortifications.

It takes significant effort to create a codebook like this.

The codebook also contains mappings for 36 places and 16 names. Some names are aliases, like Culper Sam is actually Robert Townsend. Washington was 711. It would be very cool if he were 007.

The spy uses a letter and number substitution table if the right codeword doesn't exist or a number is used respectively. Unlike the codewords, letters are used instead of numbers, even if it's a number. Ideally, these mappings are periodically updated, but it doesn't appear this was the case.