liveBook · Manning

Hybrid encryption

As explained in Real-World Cryptography

Hybrid encryption is an encryption technique that combines asymmetric encryption or key exchange with symmetric authenticated encryption to protect messages of arbitrary practical size.

Hybrid encryption protects large messages by combining asymmetric encryption or key exchange with symmetric authenticated encryption. It keeps the convenient public-key interface while avoiding asymmetric encryption’s small message limits and slower performance. section 6.2 section 6.2.2

A basic hybrid-encryption exchange proceeds as follows:

  • Generate a fresh symmetric key and use authenticated encryption to encrypt the message. section 6.2.2
  • Encrypt the symmetric key with the recipient’s public key. section 6.2.2
  • Send the encrypted symmetric key and encrypted message together. section 6.2.2
  • Have the recipient decrypt the symmetric key with the private key, then decrypt the message with authenticated encryption. section 6.2.2

Authenticated encryption matters: plain symmetric encryption does not protect the ciphertext from tampering. Decryption can fail when an attacker modifies the encrypted key, public key, or message in transit. section 6.2.2

ECIES with an ephemeral key pair

ECIES uses an ephemeral elliptic-curve Diffie–Hellman key pair. The sender performs a key exchange with the recipient’s public key, uses the resulting shared secret with authenticated encryption such as AES-GCM, and sends the ephemeral public key with the ciphertext. The recipient repeats the exchange with the private key and ephemeral public key, then decrypts the ciphertext. section 6.4

Figure 6.9 Building on figure 6.8, (4) after you send both the encrypted symmetric key and the encrypted message to Alice, (5) Alice decrypts the symmetric key using her private key. (6) She then uses the symmetric key to decrypt the encrypted message. (Note that steps 5 and 6 can both fail and return errors if the communications are tampered with by a MITM attacker at step 4.)

Follow the complete recipient flow from transmission through private-key recovery and message decryption, including tampering failures. section 6.2.2

How Real-World Cryptography covers it

How deep it goes
Explains construction and decryption steps, then descends into ECIES with ECDH, ephemeral keys, and authenticated encryption.
Examples
Uses RSA-based key protection, ECIES with ECDH, AES-GCM, message-flow figures, and a Java Google Tink listing.
What it assumes
Assumes authenticated encryption and key exchanges, while introducing asymmetric encryption and hybrid construction.
What you can do after
Apply it via ECIES or a documented interoperable implementation to encrypt larger messages with authenticated symmetric protection.
How it connects
Connects asymmetric encryption, key exchange, authenticated encryption, ECDH, AES-GCM, RSA-OAEP, and ECIES.

Also explained in

Compare how 2 books explain hybrid encryption →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Real-World Cryptography. The section links point to the parts of the book it draws on.