We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Public/Private Keys

Asymmetric cryptography uses two different keys to encrypt and decrypt messages.

  • Private Key: Is kept secret and is used to decrypt messages
  • Public Key: Is shared with the world and is used to encrypt messages

Why Two Keys?

With symmetric encryption, if I want to send a message to my friend, I need to give them a copy of my key. Not only is it hard to securely transmit a key to them, but I also might not want to trust them with my encryption keys.

Public key cryptography makes it easy to communicate securely over an untrusted medium (like the internet) with other parties. Symmetric encryption is generally only used to encrypt data for oneself.