HKDF (HMAC-based Key Derivation Function)
O que é 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.
● Exemplos
- 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"`.
● Perguntas frequentes
O que é 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. Pertence à categoria Criptografia da cibersegurança.
O que 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.
Como 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.
Como se defender contra HKDF (HMAC-based Key Derivation Function)?
As defesas contra HKDF (HMAC-based Key Derivation Function) costumam combinar controles técnicos e práticas operacionais, conforme detalhado na definição acima.
Quais são outros nomes para HKDF (HMAC-based Key Derivation Function)?
Nomes alternativos comuns: RFC 5869, HMAC KDF.
● Termos relacionados
- cryptography№ 656
Função de derivação de chaves (KDF)
Função criptográfica que deriva uma ou mais chaves criptográficas robustas a partir de material secreto como uma palavra-passe, segredo partilhado ou chave-mestra.
- cryptography№ 533
HMAC
Construção de MAC com chave baseada numa função de hash criptográfica, definida nas RFC 2104 e FIPS 198-1.
- cryptography№ 900
PBKDF2
Função de derivação de chaves baseada em palavra-passe definida na PKCS #5 / RFC 8018, que aplica uma função pseudoaleatória com número configurável de iterações e salt.
- cryptography№ 068
Argon2
Função moderna de hashing de palavras-passe e KDF com custo de memória, vencedora do Password Hashing Competition 2015 e padronizada na RFC 9106.
- network-security№ 1279
TLS (Transport Layer Security)
Protocolo criptográfico padronizado pelo IETF que fornece confidencialidade, integridade e autenticação ao tráfego entre duas aplicações em rede.
- cryptography№ 352
Troca de chaves Diffie–Hellman
Protocolo de chave pública que permite a duas partes derivar um segredo partilhado sobre um canal inseguro sem o transmitir, baseado na dificuldade do logaritmo discreto.