One of the plot devices in The Realm of Silence turns out to involve a secret code. It’s a bit of a McGuffin, but I had fun with it, and particularly enjoyed finding out about cryptography, and the part it played during the Napoleonic wars.
Short form. Napoleon and his armies weren’t very good at codes and the British were.
Secret codes for military information have been used for a long time; at least since Julius Caesar encoded messages to his generals. Over the centuries, they’ve become more and more elaborate, until today, when they’ve spread into everyday use on computer systems, with elaborate encryption methods to prevent eavesdropping and theft of private information.
Types of code
Today, with computers, codes have become much more complex. But there are some common types, most of which have been around a long time. They fit into two main categories: versus codes and ciphers.
Versus codes are substitutions of a symbol for a meaning: a word or a phrase.
Ciphers work at a lower level. The symbol replaces an individual letter or small group of letters.
- Substitution ciphers replace a unit (one or more letters or numbers) with another. So March North might become 2oeqv 3aefv.
- With transposition ciphers, the order of the units are changed, but not the units themselves. So March North might become Tharn Morch.
- Polyalphabetic ciphers use a mixed alphabet to encrypt a message, switching alphabets during the message. The World War II enigma machine produced a polyalphabetic cipher.
The man who broke Napoleon’s code
After coming unstuck with sending messages in plain text, Napoleon tasked his army with creating a code. It used 150 numbers, each of which represented a letter or word, and a man called Major General Scovell broke the code within two days.
The Great Paris Cipher was the French answer. It was both a code and a cipher, with different numbers standing for either letters or words. It comprised 1400 numbers in a table, some of which stood for nothing to further confuse those attempting to decipher the messages. And it had no noticeable underlying patterns.
But a year later, Scovell had done it again, helped along by the carelessness of the French army. So complex a cipher took ages to use, both for those sending message and those using them. The French took the easy route, and only encoded part of their messages, which allowed Scovell to make educated guesses about what the encrypted words might mean.
The book cipher
My characters discover a book cipher, where words or letters of the message are replaced by words or letters of the chosen book. Both the sender of the message and its receiver need the same edition of the same book, and the code can be hard to break without the book.