Skip to content
StackDecode
System Design
13. Security ArchitectureAnimated

Asymmetric Encryption

A public key encrypts; a private key decrypts.

The idea

Public and private key pairs allow secure exchange and digital signatures without sharing a secret.

Watch it work

Press play, pause, or step through. Some animations have settings you can change.

BrowserServerClientHello: versions, ciphers, random
  • current message
  • earlier
  • failure or attack

The browser lists what it supports and sends a random value.

step:
1/6
from:
Browser
to:
Server
1/6

Time runs downward. Solid arrows are requests, dashed arrows are replies.

Step by step

  1. 1Publish the public key
  2. 2Others encrypt with it
  3. 3Only the private key decrypts
  4. 4Sign with the private key to prove identity

Where it is used

Key exchange and certificates.

Watch out for

Slow, so it is used to exchange symmetric keys.

Related