WIPIVERSE All articles

Key Exchange

Key exchange (also referred to as key establishment) is a method in cryptography by which cryptographic keys are exchanged between two parties, thereby enabling the use of a cryptographic algorithm for secure communication.

Overview and Purpose

If two parties wish to exchange encrypted messages, each must be equipped to encrypt messages to be sent and decrypt messages received. The specific equipment required depends on the encryption technique used. If the parties use a symmetric key cipher, both will need a copy of the same key. If they use an asymmetric (public/private) key cipher, both will need the other's public key. The process of distributing these keys—through an in-band or out-of-band channel—constitutes key exchange.

The Key Exchange Problem

Historically, before the invention of public-key (asymmetric) cryptography, symmetric-key cryptography relied on a single shared key for both encryption and decryption. This required parties to exchange the secret key through a secure channel—such as trusted couriers or diplomatic bags—before secure communication could begin. If an attacker intercepted the key during this initial exchange, they could decrypt subsequent messages. This challenge is known as the key exchange problem.

Public-key cryptography addressed this problem by introducing a two-key system comprising a public key (which may be openly shared) and a private key (known only to its owner). Depending on the algorithm, one key is used for encryption and the other for decryption, meaning the public key can be transmitted over insecure channels without compromising message confidentiality.

Diffie–Hellman Key Exchange

In 1976, Whitfield Diffie and Martin Hellman published the Diffie–Hellman key exchange protocol, based on earlier concepts developed by Hellman's PhD student Ralph Merkle. The protocol allows two parties to securely compute a shared secret key over a public channel, even if an opponent is monitoring the communication. The Diffie–Hellman protocol does not by itself provide authentication, leaving it vulnerable to man-in-the-middle attacks when an attacker can both monitor and alter messages.

Authentication and Related Systems

To address the authentication problem, several mechanisms have been developed:

  • Public Key Infrastructure (PKI): Users obtain digital certificates from a trusted certificate authority (CA), which authenticate the identity of key holders. PKI is secure unless the CA itself is compromised, though its trustworthiness depends on the reliability of the CA.
  • Web of trust: Used by systems such as PGP and GPG, this avoids central certificate authorities; each user personally verifies and vouches for other users' certificates.
  • Password-authenticated key agreement: Algorithms that perform key exchange using knowledge of a user's password.
  • Quantum key distribution: Exploits properties of quantum physics; because measuring a quantum state perturbs it, such systems can detect man-in-the-middle attacks.

Key exchange is a fundamental and active area of cryptographic research, with ongoing work on both unauthenticated and authenticated protocols and their security models.

Browse

More topics to explore

    Browse all articles