Codes have been used for centuries and were the preferred method of secret communications well into the 20th century. The difference
between a cipher and a code is a cipher substitutes characters to hide the message while a code reduces a word or phrase into a usually
shorter group of numbers or letters to represent that word or phrase. Often, the code is a 4 or 5 digit number and the sender and receiver
must have a code book with thousands or up to many tens of thousands of codes. In the age of telegraph messages, codes were also used to
reduce the length of messages, with significant cost savings.
Example from an 1888 code book
The code book would typically list the codes in numerical sequence and then a second book would list the words or phrases alphabetically.
The first book was used to decipher a message and the second book would be used to encipher a message. While this made the enciphering
and deciphering of messages more user friendly, it also aided the cryptanalyst in guessing the words based on their relative position in
the code book compared to known words.
The use of codes was often combined with other ciphers, such as a transposition cipher, Vigenère cipher or some other cipher device. The
first Vigenère disks included the numbers 1-4 so that numeric codes could be used directly. Alternatively, the letters could be used to
represent the digits from 1-26.
Over the years, codes became more and more complex to counter the increasing sophistication of the codebreakers. Some codes were used as
dummy text with no meaning and often used words could have several codes to choose from. A code can provide a strong cipher, but if a code
book is lost or stolen, then decipherment of all communications is trivial until a new code book is created. Sometimes, years of messages
that remained secret can then be decrypted, yielding valuable intelligence even though the information is dated. Rewriting an entire
code book and sending that book to all users can be a very cumbersome and risky process.
After the invention of the telegraph, codes were used in order to reduce transmission costs. Telegraph companies charged based on the number
of words in a message, so 5 letter codes were used to replaced phrases or sentences, greatly reducing the cost of sending a message.
The added benefit of using codes was that the message was not immediately obvious to the code clerks who sent and received these messages.
Since the telegraph code books were published and available, they were not secure but most messages were business correspondence and of little
value, except possibly for business competitors.
Some telegraph code books were also designed to provide a true cipher code, as in the example above. The normal English word was used as
the cipher, which has a 4 digit number and a sentence associated with it. Each word in the message could have an agreed to number added
or subtracted, yielding a new or enciphered sentence in the book. So the key becomes the book, which is public, but also a private key of
numbers to be added or subtracted. For even more security, the words of the message could be transposed.
Bloomer's Commercial Cryptograph, A Telegraph Code and Double Index - Holocryptic Cipher was first published in 1874 and continued for
several reprintings. There were many telegraphic code books published in this timeframe, which were mainly used to reduce transmission
costs. Many of the code books were devoted to specific industries or companies, since they would share many of the same words used in
messages.
Bloomer's code book was more general and served the normal purpose of reducing transmission costs but also provided a strong cipher. From
the title of this book, it is evident that the author intended it to be used as a telegraph code to reduce transmission costs. It also
provided a "holocryptic" cipher, meaning the cipher is "completely cryptic" or could not be broken. The title page goes on to state:
"By the use of this work, business communications of whatever nature may be telegraphed with secrecy and economy."
The author claims that different parties can be in possession of this book and each have a different cipher, so they would not be able
to decipher each other's messages. He goes on to explain five different ways the book can be used to encipher messages:
The first way to use the book is as a plain Telegraphic Code, reducing the number of words transmitted by substituting a word for a
sentence. For example, on page 92 the word "Field" can be telegraphed in place of the sentence, "No change worth reporting; everything
is about the same".
To use the book as a true cipher, you can add or subtract an agreed upon number to each word in the message. For example, assume "No
change worth reporting; everything is about the same" is the intended message and the sender agreed to add 14 to the message. Looking up
that phrase on page 92 gives a four digit number next to that phrase, 2941. Adding 14 as agreed yields 2955, which is next to the word "Filch",
which is then transmitted. The receiver of the message looks up "Filch" and subtracts 14 to find the intended message. The number to be added
or subtracted can change daily or whenever desired.
To make the above cipher even stronger, the words can be reordered in some agreed to pattern, either before or after the addition or
subtraction of the words. For example, if the agreed reordering is "4,2,5,1,3" then the fourth word in the enciphered message is really the
first word of the message, etc. If the end of the message only has 3 words remaining, or the entire message is 3 words, simply ignore the
4 and 5 in the ordering and use "2,1,3" to reorder the message. Of course, any number of words can be used for the reordering. This is an
example of a transposition cipher combined with a code.
A holocryptic cipher may be obtained as follows: To the first word add 42; to the second add 17; to the third subtract 71. The receiver
of the message subtracts the number the sender added, and adds the number the sender subtracted. In this way, the same word may appear twice
in a message, with a different deciphered meaning.
Double Index - The author has provided two empty columns in the book to customize the ciphering, resulting in a double enciphered code.
There are six columns in the book. The first column is a sequential, four digit number, associated with a sentence, which is in column two.
The third column is blank, but another random word from elsewhere in the book can be selected and its corresponding 4 digit code can be
written here and this becomes the new code for the sentence. The fourth column is the number associated with the cipher word in column five.
Column six is blank, but can be customized to represent a new sentence by writing in the number of that sentence. The users of this ciphering
technique would require an exact copy of the numbers handwritten in each book.
To more conveniently look up the sentence required, the book is divided into categories set off by tabs on the right side of the pages,
with the following headings:
Miscellan's
Orders
Selling
Buying
Numerals
Market
Shipping
Arrivals / Advances
Insurance
Financial
$ - £
Commission / Per Cent / Interest
Time / Duties
Freight
Quality
Quantity / W'ts & M's / Articles
Embar'sm'ts
Corresp'd'ce
Our Business
The last heading is "Our Business" which starts with code "7427 - Quito" and ends with code "7700 - Roger". The sentences are left blank
so the book can be customized as needed. Also, if more codes are required, the numbers from 7700 to 9999 are available as are the words after
"Roger", such as those starting with "S" or "T" up to "Z".