However, there are a few basic types of cryptography which we will discuss in this document. Before we get into any of these types, there are a few terms which we need to define for you.
Now, we get to the basic types of cryptography. While reading about these types of cryptography, it may be helpful to think of a key as a key to a door.
Everybody who is supposed to be able to read the information must have the key. The problem with this sort of code is that the key has to be given to them over a secure line. If you're able to give a key securely, why not send the whole message securely?
Thinking of the key as the key to a room may help explain this better. Everybody who should have access to the room is given a copy of the key. Anybody who has that key can go in, put new information in, take old information out, and lock the room again when they leave. Without the key, you can't enter the room. Furthermore, if you send somebody a copy of the key by way of the Post Office, somebody working at the Post Office could intercept this key, make a copy of it, and then send it along. This would allow them to access this same locked room, and do the same things with it. Now, think of sending the key over the Internet. That key could be intercepted by anybody between you and the other machine, letting them read everything you locked up with that key, even letting them modify it.
This type of code is a bit more complex, but it is the most commonly used type of code for exchanging email today.
The best way to explain this is by using an analogy. In this case, let's think of the public key as a key to a public drop box, and the private key as a key which lets you take things out of the drop box. When people want to send information to the owner of the drop box, they get the public key, which lets them into the room with the drop box. They put their information directly into the drop box. After that, not even they can get it back out. Only the holder of the private key can get it back out.
In reality, you can also use these keys for other purposes, such as verifying the identities of everybody involved. We will talk more about verification later in this HOWTO.