CyberGlossary

Cryptography

Key Derivation Function (KDF)

Also known as: KDF, Key derivation

Definition

A cryptographic function that derives one or more strong cryptographic keys from a secret input such as a password, shared secret or master key.

A Key Derivation Function (KDF) takes a source of secret material — a password, a Diffie–Hellman shared secret, or an existing master key — and produces one or more cryptographically strong keys of a fixed length. KDFs split into two families: password-based KDFs designed to be slow and memory-hard (Argon2id, scrypt, bcrypt, PBKDF2) and extract-and-expand KDFs designed for high-entropy inputs (HKDF, defined in RFC 5869). HKDF is widely used in TLS 1.3, Signal, WireGuard, and Noise to derive multiple session keys from a single shared secret using HMAC. Good KDFs include salts and optional info/context strings to provide domain separation between derived keys, ensuring that derived keys cannot be linked or reused across contexts.

Examples

  • HKDF-Extract+Expand is used in TLS 1.3 to derive handshake and traffic secrets.
  • Argon2id derives a 32-byte AES key from a user passphrase to unlock an encrypted vault.

Related terms