Asymmetric Encryption

Public Key Cryptography

Two Keys, One System

Asymmetric encryption uses a key pair: a public key (shareable) and a private key (secret). What one encrypts, only the other can decrypt.

Public Key Encryption
Encryption: Plaintext + Public Key → Ciphertext
Decryption: Ciphertext + Private Key → Plaintext

Anyone can encrypt with public key
Only private key holder can decrypt

Algorithms

RSA

Based on factoring large primes

Classic

ECC

Elliptic Curve - smaller keys, same security

Modern

Ed25519

Fast, secure curve for signatures

Signatures

X25519

Efficient key exchange

Key Exchange

RSA vs ECC

AspectRSAECC
Key Size (128-bit security)3072 bits256 bits
SpeedSlowerFaster
MaturityWell-studiedNewer
Quantum ResistanceNoNo

Use Cases

  • Key Exchange - establish shared symmetric keys
  • Digital Signatures - prove authenticity
  • TLS/SSL - secure web connections
  • PGP/GPG - email encryption
  • SSH - secure remote access

Limitations

!

Performance: Asymmetric encryption is 100-1000x slower than symmetric. In practice, it's used to exchange symmetric keys, which then encrypt the actual data (hybrid encryption).