InfoCenter Home >
5: Securing applications -- special topics >
5.5: Certificate-based authentication >
5.5.1: Introduction to public-key cryptography

5.5.1: Introduction to public-key cryptography

All encryption systems rely on the notion of a key. A key is the basis for a transformation, usually mathematical, of an ordinary message into a unreadable one. For centuries, most encryption systems have relied on what is called private-key encryption. Only within the last 30 years has a challenge to private-key encryption appeared: public-key encryption.

Private-key encryption

Private-key encryption systems use a single key. This requires the sender and the receiver to share the key. Both must have the key; the sender encrypts the message by using the key, and the receiver decrypts the message with the same key. Both must keep the key private to keep their communication private. This kind of encryption has characteristics that make it unsuitable for widespread, general use:

  • It requires a key for every pair of individuals who need to communicate privately. The necessary number of keys rises dramatically as the number of participants increases.
  • The fact that keys must be shared between pairs of communicators means the keys must somehow be distributed to the participants. The need to transmit secret keys makes them vulnerable to theft.
  • Participants can communicate only by prior arrangement. There is no way to send a usable encrypted message to someone spontaneously. You and the other participant must have made arrangements to communicate by sharing keys.

Private-key encryption is also called symmetric encryption, because the same key is used to encrypt and decrypt the message.

Public-key encryption

In the 1970s, a mathematical breakthrough led to the development of another major cryptographic system, public-key encryption. Public-key encryption uses a pair of mathematically related keys. A message encrypted with the first key must be decrypted with the second, and a message encrypted with the second key must be decrypted with the first. Each participant in a public-key system has a pair of keys. One of these keys is kept secret; this is the private key. The other is distributed to anyone who wants it; this is the public key .

To send an encrypted message to you, the sender encrypts the message by using your public key. When you receive it, you decrypt it by using your private key. When you wish to send a message to someone, you encrypt it by using the recipient's public key. The message can be decrypted only with the recipient's private key. This kind of encryption has characteristics that make it very attractive for general use:

  • Public-key encryption requires only two keys per participant. The total number of keys rises much less dramatically as the number of participants increases than it does in private-key encryption.
  • The need for secrecy is more easily met. The only thing that needs to be kept private is the private key, and since it does not need to be shared, it is less vulnerable to theft in transmission than the shared key in a private-key system.
  • Public keys can be published. This eliminates the need for prior sharing of a secret key before communication. Anyone who knows your public key can use it to send you a message that only you can read.

Public-key encryption is also called asymmetric encryption, because the same key cannot be used to encrypt and decrypt the message. Instead, one key of a pair is used to undo the work of the other. WebSphere Application Server uses the RSA public/private key-encryption algorithm.

With private-key encryption, you have to be careful of stolen or intercepted keys. In public-key encryption, where anyone can create a key pair and publish the public key, the challenge is in verifying that the owner of the public key really is the person you think it is. There is nothing to stop a user from creating a key pair and publishing the public key under a false name. The person listed as the owner of the public key will not be able to read messages encrypted with that key because he or she will not have the private key. If the creator of the false public key can intercept these messages, that person can decrypt and read messages intended for someone else. To counteract the potential for forged keys, public-key systems provide mechanisms for validating public keys (and other information) with digital signatures and digital certificates.

Go to previous article: Introduction to security certificates Go to next article: Digital signatures

 

 
Go to previous article: Introduction to security certificates Go to next article: Digital signatures