# Basic Concepts & History of Cryptography

* 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”. 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 manipulating the message so that it could not be read even if it were intercepted, and the result was “cryptography”, Greek for “hidden writing”.

Cryptography takes two forms: “codes” and “ciphers”. 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’t 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’re 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, traditional military codes are often defined using “codenumbers” instead of codewords, listed in 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`

Codewords and codenumbers are referred to collectively as “codegroups”. The words they represent are referred to as “plaintext” or, more infrequently, “cleartext”, “plaincode”, “placode”, or “plaindata”.

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 crack.

* 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 also implies the term “cryptotext” to cover both codetext and ciphertext, though the term “encicode” is sometimes seen instead. The science of creating codes and ciphers is known, as mentioned, as “cryptography”, while the science of breaking them is known as “cryptanalysis”. Together, the two fields make up the science of “cryptology”.

## 6 thoughts on “Basic Concepts & History of Cryptography”

1. Nice ! Again, Sid linked me up here…Pretty good…Bet ur a Dan Brown fan ! 🙂

2. shammee says:

Thx ,
Bingo , u got me …..
A huge fan indeed…..

• shammee says:

I really appreciate you , for asking permission , to re-publish this posts ,
with a linkback , i don’t have any problem with that.
permission granted e-stave .
🙂

3. life assurance
Nice post. I was checking constantly this blog and I’m impressed! Extremely helpful info specifically the last part about life assurance.

4. Pingback: History cryptography | Lifegenix