V'ir Tbg n Frperg V'ir Tbg n Frperg    This document as PDF 2 I'm a Substitute

# 1 Pleased to Meet You, Hope You Guessed My Name

People have been interested in writing secret messages almost as long as people have been able to write. During the twentieth century, it became clear that cryptography had a lot to do with mathematics, and the role of making and breaking codes has increased dramatically in the military since the First World War.2Although you may not know it, cryptography plays a role in most of our daily lives as well. When we make a purchase over the internet, our web browser uses encryption to keep our financial data secure. Automatic Teller Machines (ATMs), satellite TV, and a number of other everyday services use encryption. Secret codes are also just kind of fun to fiddle with, and fun is part of our main focus today.

First, let's introduce some terminology. The discipline of encoding and decoding secret messages is called cryptography, from the Greek words kryptos ( ), meaning hidden or secret, and graphia ( ), meaning writing. The original, readable message is referred to as the plaintext or clear text. Encoding the message is called encryption (or sometimes enciphering), and the hard-to-read result is called the ciphertext (or the encrypted message). Turning the ciphertext back into plaintext is called decrypting, deciphering, or decoding the message. Usually the conversion process depends on an additional piece of information, usually called the key or the password; the key forms the basis of the security and must be kept private. Sometimes there are different keys used to encrypt and decrypt messages. If it is infeasible to determine the key used for decryption without knowing the key used to encrypt, this method can be used for public-key cryptography (which we won't be able to discuss). Finally, decrypting a message without being told the corresponding key is called cracking or breaking the code.

Technically speaking, there is a difference between a cipher and a code: a code works at the level of meaning, replacing words or phrases with others (for example, when parents refer to a four-year-old's upcoming birthday party as the festivities'' to avoid exciting her prematurely), while a cipher replaces individual letters or groups of letters with others. Naturally, these are not mutually exclusive, and are often used together.3 While formally they are different things, one often informally uses the word code'' when speaking of ciphers. Since we will only be looking at ciphers, we will use the terms interchangeably.

One last bit of terminology we must cover is the choice of Alphabet for the plaintext (and the ciphertext). We need to agree up front which characters we will be writing our messages in. Prior to the advent of computers, messages typically consisted of only the 26 letters of the alphabet; all spaces, punctuation, numerals, and so on were removed from the message prior to encryption. No distinction was made between upper-case and lower-case letters. Today, a computer tends to do the enciphering and deciphering, and the alphabet is much larger, typically containing 128, 256, or more character codes. We'll adopt the more spy-like convention of using just 26 characters.

In this note, we'll write our plaintext in all lower case letters, as

abcdefghijklmnopqrstuvwxyz
and our ciphertext in all uppercase letters
ABCDEFGHIJKLMNOPQRSTUVWXYZ
Since we'll be leaving out the spacing and punctuation, it is traditional to group the text into blocks of letters (typically five), so that one doesn't get lost.

For example, if we wanted to encrypt the sentence Please do not read this.'', we would first represent it as

Note that the last group has only four letters, because the length of the message was not divisible by 5.

#### Footnotes

... World War.2
Many people have claimed that if the Allies hadn't broken the German Enigma code, the outcome of the Second World War would have been different.
... together.3
Another way to create a secret message is using steganography, which is the process of hiding the fact that a message exists at all. Using invisible ink'' is steganography, as is hiding messages within other messages. For example, looking at the second letter of each word in the message below (which was reportedly sent by a German spy during World War I [Kah, p. 521]),
Apparently neutral's protest is thoroughly discounted and ignored. Isman hard hit. Blockade issue affects pretext for embargo on byproducts, ejecting suets and vegetable oils.
one finds a rather different message, namely
Pershing sails from NY June I.
Steganography is often used to augment cryptography, and is also related to digital watermarking''.
 V'ir Tbg n Frperg V'ir Tbg n Frperg    This document as PDF 2 I'm a Substitute
Scott Sutherland
2005-10-26