Testing
Essay Preview: Testing
Report this essay
[1.1] BASIC CONCEPTS
* The oldest means of sending secret messages is to simply conceal them by one trick or another. The ancient Greek historian Herodotus wrote that when the Persian Emperor Xerxes moved to attack Greece in 480 BC, the Greeks were warned by an Greek named Demaratus who was living in exile in Persia. In those days, wooden tablets covered with wax were used for writing. Demaratus wrote a message on the wooden tablet itself and then covered it with wax, allowing the vital information to be smuggled out of the country.
The science of sending concealed messages is known as “steganography”, Greek for “concealed writing”. Other classical techniques for smuggling a message included tatooing it on the scalp of a messenger, letting his hair grow back, and then sending him on a journey. At the other end, the recipient shaved the messengers hair off and read the message.
Steganography has a long history, leading to inventions such as invisible ink and “microdots”, or highly miniaturized microfilm images that could be hidden almost anywhere. Microdots are a common feature in old spy movies and TV shows. However, steganography is not very secure by itself. If someone finds the hidden message, all its secrets are revealed. That led to the idea of obscuring the message so that it could not be read even if it were intercepted, and the result was “cryptography”, Greek for “hidden writing”. The result was the development of “codes”, or secret languages, and “ciphers”, or scrambled messages.
* The distinction between codes and ciphers is commonly misunderstood. A “code” is essentially a secret language invented to conceal the meaning of a message. The simplest form of a code is the “jargon code”, in which a particular arbitrary phrase, for an arbitrary example:
The nightingale sings at dawn.
— corresponds to a particular predefined message that may not, in fact shouldn
have, anything to do with the jargon code phrase. The actual meaning of this might be:
The supply drop will take place at 0100 hours tomorrow.
Jargon codes have been used for a long time, most significantly in World War II, when they were used to send commands over broadcast radio to resistance fighters. However, from a cryptographic point of view they
e not very interesting. A proper code would run something like this:
BOXER SEVEN SEEK TIGER5 AT RED CORAL
This uses “codewords” to report that a friendly military force codenamed BOXER SEVEN is now hunting an enemy force codenamed TIGER5 at a location codenamed RED CORAL. This particular code is weak in that the “SEEK” and “AT” words provide information to a codebreaker on the structure of the message. In practice, military codes are often defined as “codenumbers” rather than codewords, using a codebook that provides a dictionary of code numbers and their equivalent words. For example, this message might be coded as:
85772 24799 10090 59980 12487
— where “85772” maps to BOXER SEVEN, “12487” maps to “RED CORAL”, and so on. Codewords and codenumbers are referred to collectively as “codegroups”. The words they represent are referred to as “plaintext” or, more infrequently, “cleartext”, “plaincode”, or “placode”.
Codes are unsurprisingly defined by “codebooks”, which are dictionaries of codegroups listed with their corresponding their plaintext. Codes originally had the codegroups in the same order as their plaintext. For example, in a code based on codenumbers, a word starting with “a” would have a low-value codenumber, while one starting with “z” would have a high-value codenumber. This meant that the same codebook could be used to “encode” a plaintext message into a coded message or “codetext”, and “decode” a codetext back into plaintext message.
However, such “one-part” codes had a certain predictability that made it easier for outsiders to figure out the pattern and “crack” or “break” the message, revealing its secrets. In order to make life more difficult for codebreakers, codemakers then designed codes where there was no predictable relationship between the order of the codegroups and the order of the matching plaintext. This meant that two codebooks were required, one to look up plaintext to find codegroups for encoding, the other to look up codegroups to find plaintext for decoding. This was in much the same way that a student of a foreign language, say French, needs an English-French and a French-English dictionary to translate back and forth between the two languages. Such “two-part” codes required more effort to implement and use, but they were harder to break.
* In contrast to a code, a “cipher” conceals a plaintext message by replacing or scrambling its letters. This process is known as “enciphering” and results in a “ciphertext” message. Converting a ciphertext message back to a plaintext message is known as “deciphering”. Coded messages are often enciphered to improve their security, a process known as “superencipherment”.
There are two classes of ciphers. A “substitution cipher” changes the letters in a message to another set of letters, or “cipher alphabet”, while a “transposition cipher” shuffles the letters around. In some usages, the term “cipher” always means “substitution cipher”, while “transpositions” are not referred to as ciphers at all. In this document, the term “cipher” will mean both substitution ciphers and transposition ciphers. It is useful to refer to them together, since the two approaches are often combined in the same cipher scheme. However, transposition ciphers will be referred to in specific as “transpositions” for simplicity.
“Encryption” covers both encoding and enciphering, while “decryption” covers both decoding and deciphering. This should also imply the term “cryptotext” to cover both codetext and ciphertext,