Read this lesson as text
Hybrid Encryption
Cryptography · Axiom Academy
Combining symmetric and asymmetric encryption for practical, secure communication Public-key cryptography (like RSA) provides incredible security properties: anyone can encrypt, only the private key holder can decrypt. But there's a critical flaw for practical use. AES-256 (symmetric): ~1-2 GB/sec on modern hardware RSA-2048 (asymmetric): ~1-2 MB/sec on the same hardware Performance gap: 1000x+ difference! Imagine encrypting a 1 GB video file: Even worse, RSA has strict size limits. RSA-2048 can only encrypt messages up to 245 bytes directly. Larger messages must be broken into tiny chunks, further degrading performance. Hybrid encryption combines symmetric and asymmetric cryptography to achieve both performance and secure key distribution . Step 1: Generate a random symmetric key K (e.g., 256-bit AES key) Step 2: Encrypt the data M with K using fast symmetric encryption (AES, ChaCha20, etc.) Step 3: Encrypt K with the recipient's public key using asymmetric encryption (RSA, ECDH, etc.) Step 4: Send both the encrypted key and encrypted data to the recipient The recipient decrypts the symmetric key with their private key, then uses that key to decrypt the actual data. 3. Key Encapsulation Mechanism (KEM) Modern hybrid encryption often uses a construction called Key Encapsulation Mechanism (KEM) , which is a more refined approach than simply encrypting a random key. Why KEM instead of simple RSA encryption? Better security proofs: KEMs have cleaner security models (IND-CCA2)
This is the written version of the interactive lesson above. See the full Cryptography course.