Chapter 1, Part 1
People never cease to be particularly fascinated by “secret writing,” or secret codes. A “code,” in the broadest sense, is any word or symbol which we agree corresponds to an element of experience of either a physical or a conceptual nature. Codes form the basic units of our language and of our thoughts and dreams. Most of the codes we encounter are open, direct, and fulfill pragmatic purposes. Some, however, we discover are hidden behind, or underneath, our day-to-day traffic of ideas. The ones which are hidden usually reveal an ulterior intent or purpose.
Cryptography is the science of writing messages that no one except the intended receiver can read. Cryptanalysis is the science of reading them anyway. Ever since the earliest times, military, political, and personal messages have been communicated by various means to restrict their contents to those intended and deny them to others. From the ancient palaces of our earliest cultures to the super-secret “black chambers” of our most modern command posts, the art of secret writing – and the science of their decipherment – have determined the course of history.
Cryptology – the study of secret codes and ciphers – has also been stimulated by its use in literature. Edgar Allen Poe’s The Gold Bug probably remains unequaled as a work of fiction, his tale turning upon a secret coded message.1 Sir Arthur Conan Doyle’s Sherlock Holmes encounters ciphers three times in his uniquely distinguished career. He demonstrated his thorough knowledge of the subject in The Adventure of the Dancing Men, where he recognized the use of little stick figures as cipher symbols.2 Jules Verne heightened the excitement of three of his novels with the mysteries of secret writing.3 Carl Sagan exploited an extraterrestrial code in his novel Contact, the subject of a recent major movie. (Extraterrestrial codes will be explored in the next chapter.)
The amazing ability to break a seemingly unintelligible cipher has always appeared mystical to the uninitiated. It undoubtedly was a major source of power to the priesthoods of the ancient empires. It was not surprising that the famed American coup over the Japanese naval codes in World War II was called “MAGIC.”4 (It is interesting that the very word derives from the Persian Magi and that the most famous cryptanalyst of all history was ultimately appointed to head this ancient priesthood. This will be explored in Chapter 4.)
The best codes are those hidden behind an ostensibly innocuous message. Just how does one discover that such a code even exists? This is the very enigma that is taxing the greatest minds available today. But we are getting ahead of ourselves.
Every vocation has its unique vocabulary, and we should first review some basics. Plaintext refers to the message that will be put into a secret form. The message is hidden in two basic ways: methods of steganography, and cryptography. Steganography attempts to conceal the very existence of the message physically, with techniques such as invisible inks, microdots, hollow shoe soles, or satellite bursts, etc.
(However, sometimes the most effective codes are those which are “hidden in plain sight,” Edgar Allan Poe’s The Purloined Letter being a classic example from literature. The Cardano Grille and its close cousin, the equidistant letter sequences, can be considered as related cryptographic examples “hidden in plain sight,” to be discussed later in this chapter.)
Methods of cryptography, on the other hand, do not necessarily conceal the presence of the message but rather attempt to render it unintelligible to outsiders by various transformations of the plaintext.
To pass a plaintext through these transformations is to encipher or encode it, as the case may be. What results is the ciphertext; and the final secret message may also be called a cryptogram.
To decipher or decode involves persons legitimately possessing the key or system to reverse the transformations and thus reveal the original message. It contrasts with cryptanalysis, or codebreaking, in which persons who do not possess the key or system – a third party, the “enemy” – attempt to break down or solve the cryptogram.
Among systems of substitution, a code is distinguished from a cipher. In a cipher the basic unit is the letter, or group of letters. A code consists of a list of words, phrases, letters or symbols in which codewords, codenumbers, or codegroups, replace the plaintext elements. A portion of a code might look like this:
A code operates on linguistic entities, dividing its raw material into meaningful elements like words or phrases, whereas a cipher does not.5 A cipher operates at the letter level; it would split the t from the h in the, for example.
Perhaps the best known “code” was the one employed by Paul Revere:
1 = “one if by land”
2 = “two if by sea”
This couldn’t have been cracked by the British even if they had had the best of modern computers available.
A popular form of field code is the book code. Both the sender and the receiver obtain identical copies of the same edition of a published book. To encode a word, the sender uses its page/line/word number. (Rare or specialized words can be spelled out using some previously agreed-upon convention.) The ubiquitous Gideon Bibles in hotel rooms are obvious candidates (perhaps too obvious).
In contrast to cryptographic codes, ciphers involve transformations on the plaintext itself. Two basic cipher transformations exist: transposition, in which the letters of the plaintext are jumbled and their normal order is simply disarranged, such as in an anagram;6 and substitution, in which the letters of the plaintext are replaced by other letters, numbers, or symbols. And, of course, the two basic forms can be combined.
One of the earliest forms of transposition ciphers is called the Skytale. It employed a mechanical aid. The originator took a straight rod and wrapped around this rod a long, thin, narrow strip of parchment in spiral fashion, with the edges touching. He would then write his message on the text running along the rod, each line following around the rod, as suggested in Fig. 1-1:
Figure 1-1: Skytale sketch
The recipient would use a similar rod of exactly the same diameter to reassemble the stream of letters into words and sentences. This was simply a mechanical means of a rendering rows of the plaintext into a vertical (columnar) presentation. (It is, of course, an easy code to break, and it also happens to be, in the example, equivalent to a “skipped letter sequence” with an interval of six. These will be explored further in Chapter 11.)
(The Skytale is part of the logo of the American Cryptogram Association, the society of amateur cryptanalysts.)
Another simple form of a transposition cipher is called the Railfence Cipher and is shown below. The plaintext (“PLEASE HELP ME NOW”) is written in a series of “V’s” as shown, and the ciphertext is then read off in horizontal rows.
(In most ciphers it is common practice to eliminate the spaces between words as they can yield too many clues for the analyst attempting to break the cipher. It is also normal practice to segment the ciphertext letters in groups of five for ease in counting.)
Another form of transposition is the Skipping Tramp. (“Transposition” is awkward to abbreviate; “transp” is too hard to pronounce, so it has evolved to “tramp” as the trade slang equivalent.) The Skipping Tramp simply exploits an agreed-upon series of numbers, such as 2-3-4- 1-5, and the plaintext is excerpted applying this sequencing repeatedly until exhausted. It is a tedious and error-prone procedure that is also easily defeated. (The equidistant letter sequences being uncovered in the Biblical text can be considered one of the simplest forms of a Skipping Tramp.)
More sophisticated transposition ciphers can take the form of a columnar tramp. The example below is a message that is first written in six columns:
These columns are then shuffled in accordance with a previously agreed-upon keyword. The letters of the keyword are then alphabetized to determine the column order; e.g., a keyword like “DARKLY,” alphabetized as “ADKLRY,” would indicate six columns taken in the order of 2, 1, 4, 5, 3, 6:
The columns are then copied (vertically) in that order. It is usual to divide the resulting ciphertext into groups of five letters to mask any parsing information (such as column or word breaks) from an intruder. Thus, our example would encipher as:
Incidentally, when the last row is short, resulting in columns of unequal length, that is an advantage since an incomplete columnar tramp is more difficult to break.
Most letters have preferred positions within words. Techniques of cryptanalysis include vowel distribution methods,7 geometric means, analysis of variances, digram frequencies, and other sophisticated statistical tools.
One of the ways that the history of cryptography has advanced has been to recognize the regularity and patterns that remain. Another way to increase the difficulty of breaking a cipher is to employ double transposition – to impose the above process a second time on the resulting ciphertext.8
Other forms of transposition ciphers include the Cardano grille and its close cousin, the turning grill, which will be discussed shortly.
- Poe’s stories, employing an intellectual chain of logic to solve a central problem, resulted in their being regarded as the first detective stories. The Gold Bug remains a classic despite its being full of absurdities and errors: the survival of the parchment despite the decay of the timbers of the boat; the fact that the invisible ink – cobalt nitrate – would also be soluble in water; the intricate geometry between the skull sighted between the rift in the trees after 150 years of arboreal growth, etc. Still, it remains a classic.
- Holmes, having solved the cryptogram, composes a message out of the cipher symbols he has recovered that leads to the culprit’s arrest. Holmes may have borrowed this scheme from Thomas Phelippes, who had in 1587 forged a cipher postscript to a letter of Mary, Queen of Scots, to learn the names of the intended murderers in the Babington plot against Elizabeth. Holmes’ other encounters occur in The Gloria Scott, where the great detective discovers a secret message hidden within an open-code text as every third word, and in The Valley of Fear where he receives a numerical code message from an accomplice of his arch rival, Professor Moriarty.
- In Voyage to the Center of the Earth, Verne opens with a three-step cryptogram of runic letters.
- Named by Rear Admiral Walter S. Anderson, Director of Naval Intelligence. David Kahn, The Code Breakers, MacMillan, New York, 1967, pp. 3, 93.
- The Hebrew ה (heh) as a code for the Ruach Elohim, the Spirit of God, will be explored in Chapters 8 and 9.
- These, and related topics, will be explored in Chapter 6.
- English is about 40% vowels. That’s why the removal of vowels increases the difficulties in breaking a cipher.
- This is sometimes called the “U.S. Army transposition” because it was used as a field cipher during part of World War I.