Asymmetric · 07

Hybrid Encryption

No real system encrypts a file with RSA. They use asymmetric cryptography to wrap a small symmetric session key, then use a fast symmetric cipher on the actual data. This is the bridge between the two halves of cryptography, and it is in every secure protocol you have ever used.

01

Why Not Just RSA For Everything

Two answers: speed and message size.

OperationThroughput (rough order)
AES-256-GCM (hardware-accelerated)3,000+ MB/s per core
ChaCha20-Poly13051,500+ MB/s per core
RSA-2048 encryption~0.5 MB/s per core
RSA-2048 decryption~0.05 MB/s per core

RSA encryption is roughly 6,000 times slower than AES, and RSA decryption is 60,000 times slower. Streaming a 4 GB video file through raw RSA would take days. Through AES, it takes seconds.

Beyond speed, RSA has a hard size cap. With a 2048-bit modulus and OAEP padding, the largest message you can encrypt in one operation is 190 bytes. Any larger and the message does not fit, period. ECC native encryption has similar limits. Asymmetric crypto was never designed to encrypt files; it was designed to bootstrap secure channels.

02

The Hybrid Pattern

The pattern is six steps. Everything from PGP to TLS uses some form of it.

  1. Sender generates a fresh random session key (typically 256 bits for AES-256).
  2. Sender encrypts the session key with the recipient's public key, producing a small wrapped key.
  3. Sender encrypts the bulk message with the session key using a fast symmetric cipher (AES-GCM, ChaCha20-Poly1305).
  4. Sender transmits both: the wrapped key, then the encrypted bulk.
  5. Recipient decrypts the wrapped key with their private key, recovering the session key.
  6. Recipient decrypts the bulk message with the session key.

The fresh random session key is the keystone. Every message gets its own session key. Even if one session key leaks, only that one message is compromised.

03

Step Through The Hybrid Flow

Click Next to advance through the pattern one beat at a time. The animation tracks each artifact as it gets created, encrypted, and transmitted.

Interactive · Hybrid Flow

Watch the wrapped session key and bulk ciphertext come together

Each step shows what exists on Bob's side, what is being transmitted, and what Alice does with it. Notice that the asymmetric operation only ever touches the small session key, never the bulk data.

Step 1 of 7
Bob has a large plaintext file (say a 5 MB document) that he wants to send to Alice. He has Alice's public RSA key but no shared symmetric secret with her yet.
BOB WIRE ALICE
04

What TLS Actually Does

TLS has used the hybrid pattern since its inception, but the asymmetric mechanism evolved over time.

TLS versionAsymmetric stepSymmetric step
TLS 1.0 / 1.1 (legacy)RSA key transport: client encrypts a pre-master secret with server's RSA public key.RC4 or 3DES (now broken).
TLS 1.2Either RSA key transport OR ephemeral (EC)DH, depending on cipher suite.AES-CBC with HMAC, or AES-GCM, or ChaCha20-Poly1305.
TLS 1.3ECDHE only. RSA key transport removed entirely for forward secrecy.AES-GCM, ChaCha20-Poly1305, or AES-CCM (AEAD only).

TLS 1.3 also uses RSA or ECDSA signatures from the server's certificate to authenticate the server's identity, but those signatures are separate from the key agreement. The TLS Handshake page traces the full sequence.

05

Key Encapsulation Mechanisms (KEM)

The formal name for the hybrid pattern is a Key Encapsulation Mechanism. A KEM has three operations:

The clean separation matters because post-quantum cryptography is structured around KEMs. Kyber (now standardized as ML-KEM in NIST FIPS 203) is a KEM. It does not encrypt arbitrary messages; it encapsulates 256-bit shared secrets. The hybrid pattern then applies: use ML-KEM to establish a session key, switch to AES-GCM for the bulk data. The asymmetric algorithm changed; the architecture did not.

Hybrid post-quantum

Many TLS deployments in 2025-2026 are using hybrid post-quantum key exchange: ECDHE combined with ML-KEM, where the session key is derived from both. If either algorithm holds, the session is safe. Chrome and Cloudflare have shipped this since 2023. The name "hybrid" here is doing double duty: hybrid symmetric/asymmetric (the topic of this page) and hybrid classical/post-quantum.

06

Practical Examples