Asymmetric Public-Key Encryption

First developed in the mid-1970s, asymmetric or public-key encryption solved the Key Distribution Problem by allowing keys to be shared openly.

Each user has a key pair: a widely shared public key for encrypting messages, and a secret private key that is never shared and is used only for decryption.

Interactive demo
See how public and private keys work together.
Step 1

Sender (Alice)

Generate a key pair, share your public key, then encrypt a message for Bob using his public key.

Private Key

Public Key

Bob's Public Key

Plaintext for Bob

Cyphertext for Bob

Step 2

Recipient (Bob)

Generate your key pair, share your public key, then decrypt Alice's ciphertext using your private key.

Private Key

Public Key

Alice's Public Key

Cyphertext from Alice

Plaintext from Alice

Attacker

Eavesdropper (Eve)

Eve can intercept public keys and ciphertext, but cannot decrypt without the private keys.

Alice's Public Key

Bob's Public Key

Cyphertext from Alice

Plaintext from Alice