The hard part of encryption is not scrambling a message. It is agreeing on the secret that scrambles it. Two families of cryptography answer that question in opposite ways, and the interesting fact is that no serious system picks just one.

The idea

A symmetric cipher uses a single secret key that both sides share, and it is fast. An asymmetric scheme uses a public/private keypair, so no shared secret has to be arranged in advance, but the math is slow. Real systems use the asymmetric half only to move a symmetric key, then let the symmetric half carry the data.

The two families

In symmetric cryptography, the same key both encrypts and decrypts. It is efficient and it is what actually protects bulk traffic, but it inherits the oldest problem in the field: before you can talk, both parties must already hold the same secret, and getting it to them securely is its own puzzle. That is the chicken-and-egg problem public-key cryptography was invented to break.

Asymmetric cryptography splits the key in two. A public half anyone may use to encrypt to you, and a private half only you hold to decrypt. Nobody has to share a secret first. The cost is speed: as Wikipedia’s description of hybrid systems puts it, public-key schemes “often rely on complicated mathematical computations and are thus generally much more inefficient than comparable symmetric-key cryptosystems.”

Why one alone is never enough

Symmetric is fast but cannot bootstrap a conversation between strangers. Asymmetric bootstraps trust between strangers but is too slow to encrypt a video stream or a database. The two weaknesses are exactly complementary, which is the whole reason the hybrid design exists rather than being a mere optimization.

The hybrid that actually runs

A hybrid cryptosystem “combines the convenience of a public-key cryptosystem with the efficiency of a symmetric-key cryptosystem.” The trick is to spend the expensive asymmetric operation on nothing but a short key: “for very long messages the bulk of the work in encryption/decryption is done by the more efficient symmetric-key scheme, while the inefficient public-key scheme is used only to encrypt/decrypt a short key value.” This is not a niche pattern. Every practical deployment of public-key cryptography today is a hybrid, TLS and SSH included, pairing a public-key mechanism for key exchange (such as Diffie-Hellman) with a symmetric cipher for the data (such as AES).

A TLS session in one line

The handshake uses asymmetric cryptography to agree on a fresh symmetric key that neither an eavesdropper nor the other party can predict, and every byte of the actual page after that is encrypted with fast symmetric AES under that key.

Sources

  • “Hybrid cryptosystem,” Wikipedia. https://en.wikipedia.org/wiki/Hybrid_cryptosystem . Supports the definition of a hybrid system combining public-key convenience with symmetric-key efficiency, that public-key schemes are much more inefficient, that the bulk of long-message work is done symmetrically while the public-key scheme encrypts only a short key value, and that all practical deployments (TLS, SSH) pair a public-key key exchange like Diffie-Hellman with a symmetric cipher like AES.