HKDF (HMAC-based Key Derivation Function)
Что такое 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.
● Примеры
- 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"`.
● Частые вопросы
Что такое 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)?
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)?
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.
Как защититься от HKDF (HMAC-based Key Derivation Function)?
Защита от HKDF (HMAC-based Key Derivation Function) обычно сочетает технические меры и операционные практики, как описано в определении выше.
Какие есть другие названия HKDF (HMAC-based Key Derivation Function)?
Распространённые альтернативные названия: RFC 5869, HMAC KDF.
● Связанные термины
- cryptography№ 656
Функция деривации ключа (KDF)
Криптографическая функция, которая получает один или несколько стойких ключей из секретного входа — пароля, общего секрета или мастер-ключа.
- cryptography№ 533
HMAC
Конструкция MAC с ключом на основе криптографической хеш-функции, определённая в RFC 2104 и FIPS 198-1.
- cryptography№ 900
PBKDF2
Функция деривации ключа на основе пароля, определённая в PKCS #5 / RFC 8018, применяющая псевдослучайную функцию с настраиваемым числом итераций и солью.
- cryptography№ 068
Argon2
Современная memory-hard функция хеширования паролей и KDF, победитель Password Hashing Competition 2015 и стандарт RFC 9106.
- network-security№ 1279
TLS (Transport Layer Security)
Стандартизованный IETF криптографический протокол, обеспечивающий конфиденциальность, целостность и аутентификацию трафика между двумя сетевыми приложениями.
- cryptography№ 352
Обмен ключами Диффи–Хеллмана
Протокол с открытым ключом, позволяющий двум сторонам вырабатывать общий секрет по небезопасному каналу без его передачи; опирается на трудность задачи дискретного логарифма.