Women's Health
   
Navigation Test Your Knowledge




View Flash









Columbia

Encrypt a Message

What is cryptography?

Cryptography is the science and art of encrypting a message so that no one can read it except the intended recipient. Cryptanalysis is the science and art of trying to defeat a cryptographic system, so that you can read encrypted messages that were not intended for you. The two fields together comprise the field of cryptology.

At first sight, encrypting a message does not seem very hard to do. You meet with your fellow collaborator and agree on a procedure for jumbling your messages. One of the simplest methods is to replace each letter of the alphabet with another letter or number.

For example, you agree in advance that each letter of the alphabet will be replaced by the letter that follows: "A" will be replaced by the letter "B," the letter "B" by the letter "C" and so on. Using this method, the message "MEET ME TOMORROW" becomes "NFFU NF UPNPSSPX" when encrypted.

Unfortunately, this system is very easy to crack using simple statistical rules. For example, code-breakers' keys can tell you how many times, on average, certain letters of the alphabet appear in different languages. "E" is the most common letter in English, so chances are that it will be the most common symbol in an encrypted message (if encrypted in English), followed closely by letters such as "S" and "T."

There are also statistical rules for the placement of similar letters that tell you, for example, that a certain percentage of the time a "G" is next to an "H" or that a vowel appears next to a certain consonant. You also have a good shot at deciphering small words quickly, because there are only two one-letter words in English (I and a) and very few two-letter words.

Making the code harder to break

Encoders had to find a more complicated approach to stymie these statistical rules. One option requires a two-step process. First, you rearrange the letters of your message according to a system so that you destroy their original position in the message, making it impossible for code-breakers to apply statistical rules regarding the placement of letters to decode the original. For example, you might agree with the recipient of your message to move the letters in your message according to this key:

Original Position
Encrypted Position
Original Position
Encrypted Position
First Letter
Third
Eighth Letter
Fourth
Second Letter
Fifth
Ninth Letter
Fourteenth
Third Letter
Eighth
Tenth Letter
Second
Fourth Letter
Ninth
Eleventh Letter
Tenth
Fifth Letter
Twelfth
Twelfth Letter
Thirteenth
Sixth Letter
First
Thirteenth Letter
Sixth
Seventh Letter
Eleventh
Fourteenth Letter
Seventh

The actual position of the encrypted letters does not matter and can be randomly generated. As long as the recipient of the encrypted message has this key, he can reverse the process and decode the message.

According to the key above, this is what might happen to our message "MEET ME TOMORROW":

Position
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Original
M
E
E
T
M
E
T
O
M
O
R
R
O
W
Encrypted
E
O
M
O
E
O
W
E
T
R
T
M
R
M

The encrypted result is thus: E O M O E O W E T R T M R M.

The second step is substitution, so that the statistical rules, which indicate the average occurrence of letters, cannot be used to decode the message. An easy means of substitution is to generate a list of all possible two-letter combinations, such as AD, CZ or GH, and replace them with numbers. (This list is actually fairly easy to generate by computer.)

This list may have already established that:

EO=55
MO=213
WE=9
TR=44
TM=60
RM=14

Substituting these letters with numbers finishes the encoding process, turning the original message, "MEET ME TOMORROW," into this opaque message "55 213 55 9 44 60 14."

Even this two-step process can be cracked, especially if enough messages are intercepted and analyzed. However, if you follow a process of encoding like this but use a different one for every message you send, you have a secure method for encryption that your enemies would find very difficult to crack. But, of course, if you have the key (the rules for encoding the message), it's a simple matter to decode the message back to its original form.

Until recently, the only known methods for encrypting a message were refinements of this approach, called private key cryptography. It's called "private key" because its success relies on keeping the "key"--the rules for encoding and decoding--only among those actually using it. They say that a secret is no longer a secret once you tell one person; clearly, the number of people who can have access to a private key must be quite small, and you must make sure it is not intercepted by a third party.

Why use cryptography?

Suppose you're an aspiring evil genius looking for a way to take over the world, steal a lot of money, or just create a lot of havoc. What's the easiest way to do this with a minimum of bloodshed?

Figure out how to factor a number really quickly.

You might remember learning about factoring numbers back in elementary school. Factoring a number is like multiplication in reverse. For example, to factor a number--say, 105--just find two smaller numbers that create 105 when you multiply them together.

Here, it's not hard to see that: 105 = 5 x 21. The numbers 5 and 21 are called factors. To factor a number completely, factor each of the factors and keep going until you can't go any further. Here, you can factor 21 as 3 x 7, so 105 = 3 x 5 x 7.

None of the factors--3, 5 and 7--can be factored into smaller whole numbers. They are called primes, numbers that can't be factored into anything other than one and the number itself. The expression 3 x 5 x 7 is called the prime factorization of the number 105.

Now, suppose you found a way to factor, say, 200-digit numbers quickly. What could you do then?

First, you would be able to decrypt virtually any secure message transmitted on the Internet, including credit-card numbers, banking records, tax returns, health care records, and stock market transactions. Further, you could gain access to the secure networks of banks, government agencies and brokerage firms.

These and similar systems safeguard their transactions through mathematically based systems of cryptography. The most commonly used system is public key cryptography, which works on the principle that although it might be easy to find the factors of a small number such as 105, it is virtually impossible to find the prime factors of very large numbers that have, say, a few hundred digits.

Copyright 2001 by The Trustees of Columbia University in the City of New York.

Back to Top





  © 2001, Fathom Knowledge Network Inc.