What Is Public Key Encryption?

This section describes public key encryption, also called asymmetric encryption, which uses a pair of keys, a private key and a public key to encrypt and decrypt messages.

What Is Public Key Encryption? Public key encryption is also called asymmetric encryption, which uses a pair of keys, a private key and a public key. Text encrypted by one key can be decrypted the other key.

Public key encryption can be used to secure a two-way communication.

For example, Bob wants to communicate with Susan in a secure way. He will generate a private key and a public key. He will encrypt the message with the private key, and send the encrypted message and the public key to Susan. Susan will then decrypt the message with the public key.

If Susan wants to send a response, she will encrypt the response with the public key and send the encrypted response back to Bob. Bob will then decrypt the response with the private key.

This communication process can be illustrated with the following diagram:

```Bob          Bob              Internet       Susan           Susan
```
```           | Encryption  |                 | Decryption |
Original   | with        |    Encrypted    | with       |    Original
message  ->| private key | -> message   -> | public key | -> message

| Decryption  |                 | Encryption |
Original   | with        |    Encrypted    | with       |    Original
response <-| private key | <- response  <- | public key | <- response
```

The idea of public key encryption was invented in 1975 by two Stanford mathematicians, Whitfield Diffie and Martin Hellman. Diffie and Hellman failed to give any real algorithm and demonstrated only that public key encryption was possible in theory.

But one year later, in 1976, three MIT mathematicians, Ronald L. Rivest, Adi Shamir, and Leonard M. Adleman invented a real public key algorithm. Their algorithm, called RSA algorithm, is based on factoring theory. See next section for more details.

Last update: 2013.