HKDF (HMAC-based Key Derivation Function)
¿Qué es HKDF (HMAC-based Key Derivation Function)?
HKDF (HMAC-based Key Derivation Function)An extract-then-expand key derivation function based on HMAC, specified in RFC 5869, designed to turn high-entropy but non-uniform secret material (DH shared secrets, master keys) into multiple cryptographically strong keys.
HKDF (HMAC-based Key Derivation Function), defined by Krawczyk in RFC 5869 (2010), is the default modern KDF for symmetric key derivation from already-high-entropy inputs such as Diffie-Hellman shared secrets, master keys, or pre-shared keys. It is built in two phases. Extract takes input keying material (IKM) and an optional salt and applies HMAC to produce a fixed-length pseudorandom key (PRK). Expand then applies HMAC iteratively, with a counter and an info-context parameter, to derive output keying material of arbitrary length. The info parameter is used to bind derived keys to a context, which makes it safe to derive many independent keys from one PRK without collision. HKDF is the KDF chosen for TLS 1.3, Signal, Noise, WireGuard, JWE, the IETF QUIC handshake, and most modern cryptographic protocols. It is not appropriate for low-entropy inputs such as passwords — use Argon2id, scrypt, or bcrypt for those — and it is not itself a MAC; the underlying HMAC is.
● Ejemplos
- 01
TLS 1.3 derives application and exporter traffic keys from the master secret via HKDF-Expand-Label, with separate info contexts per direction.
- 02
A protocol derives a 32-byte encryption key and a 32-byte MAC key from a single DH shared secret by calling HKDF with `info="enc-key"` and `info="mac-key"`.
● Preguntas frecuentes
¿Qué es HKDF (HMAC-based Key Derivation Function)?
An extract-then-expand key derivation function based on HMAC, specified in RFC 5869, designed to turn high-entropy but non-uniform secret material (DH shared secrets, master keys) into multiple cryptographically strong keys. Pertenece a la categoría de Criptografía en ciberseguridad.
¿Qué significa HKDF (HMAC-based Key Derivation Function)?
An extract-then-expand key derivation function based on HMAC, specified in RFC 5869, designed to turn high-entropy but non-uniform secret material (DH shared secrets, master keys) into multiple cryptographically strong keys.
¿Cómo funciona HKDF (HMAC-based Key Derivation Function)?
HKDF (HMAC-based Key Derivation Function), defined by Krawczyk in RFC 5869 (2010), is the default modern KDF for symmetric key derivation from already-high-entropy inputs such as Diffie-Hellman shared secrets, master keys, or pre-shared keys. It is built in two phases. Extract takes input keying material (IKM) and an optional salt and applies HMAC to produce a fixed-length pseudorandom key (PRK). Expand then applies HMAC iteratively, with a counter and an info-context parameter, to derive output keying material of arbitrary length. The info parameter is used to bind derived keys to a context, which makes it safe to derive many independent keys from one PRK without collision. HKDF is the KDF chosen for TLS 1.3, Signal, Noise, WireGuard, JWE, the IETF QUIC handshake, and most modern cryptographic protocols. It is not appropriate for low-entropy inputs such as passwords — use Argon2id, scrypt, or bcrypt for those — and it is not itself a MAC; the underlying HMAC is.
¿Cómo defenderse de HKDF (HMAC-based Key Derivation Function)?
Las defensas contra HKDF (HMAC-based Key Derivation Function) combinan habitualmente controles técnicos y prácticas operativas, como se detalla en la definición.
¿Cuáles son otros nombres para HKDF (HMAC-based Key Derivation Function)?
Nombres alternativos comunes: RFC 5869, HMAC KDF.
● Términos relacionados
- cryptography№ 656
Función de derivación de claves (KDF)
Función criptográfica que deriva una o varias claves criptográficas robustas a partir de un material secreto como una contraseña, un secreto compartido o una clave maestra.
- cryptography№ 533
HMAC
Construcción de MAC con clave basada en una función hash criptográfica, definida en RFC 2104 y FIPS 198-1.
- cryptography№ 900
PBKDF2
Función de derivación de claves basada en contraseña definida en PKCS #5 / RFC 8018 que aplica una función pseudoaleatoria con un número configurable de iteraciones y sal.
- cryptography№ 068
Argon2
Función moderna de hashing de contraseñas y KDF con coste en memoria, ganadora del Password Hashing Competition 2015 y descrita en RFC 9106.
- network-security№ 1279
TLS (Transport Layer Security)
Protocolo criptográfico estandarizado por el IETF que aporta confidencialidad, integridad y autenticación al tráfico entre dos aplicaciones en red.
- cryptography№ 352
Intercambio de claves Diffie–Hellman
Protocolo de clave pública que permite a dos partes derivar un secreto compartido sobre un canal inseguro sin transmitirlo, basado en la dificultad del logaritmo discreto.