Menu
Latest
12 meetings · Prague, Jeju · 12–16 Oct
Reports
RAN1#126-bis · SA2#177

Glossary term · Security

HKDF

HMAC-based Key Derivation Function

Security →

HKDF is a cryptographic key derivation function standardised in RFC 5869 that extracts and expands keying material from input secrets, and is referenced by 3GPP security specifications for deriving keys in 5G and related architectures.

Introduced
Rel-16
Where
Security
Specifications
2 specs
HKDF Description Purpose Neighbours Specifications

Description

HMAC-based Key Derivation Function (HKDF) is a cryptographic construction defined in RFC 5869 that derives one or more cryptographic keys from an input secret and optional context information. It is built on HMAC (Hash-based Message Authentication Code) and operates in two distinct stages: extract and expand. The extract stage takes input keying material (IKM), which may be of variable length and not uniformly random, together with an optional salt, and produces a fixed-length pseudorandom key (PRK) using HMAC with the chosen hash function. The expand stage then takes the PRK and optional context information (the 'info' parameter) and produces output keying material of the desired length, again using HMAC in a counter-based construction.

In 3GPP security architecture, HKDF is used as a key derivation function to generate keys for specific purposes from master or intermediate secrets. Specification 33.841 covers security aspects of 5G system architecture, including key derivation and key hierarchy, while 33.938 addresses security for specific 5G features. HKDF provides a standardised, well-analysed method for deriving purpose-bound keys, ensuring that compromise of one derived key does not expose others and that keys are bound to their intended context through the 'info' parameter. This supports the 5G key hierarchy, in which keys are derived at each level for specific interfaces and functions.

The two-stage design of HKDF is important for security. The extract stage compresses input keying material of arbitrary quality into a uniformly random PRK, which is essential when the input secret is a Diffie-Hellman shared secret or other value that may not be uniformly distributed. The expand stage then produces output keys bound to context, so that the same PRK can safely generate multiple independent keys for different purposes. The 'info' parameter acts as a domain separator, preventing key reuse across different contexts. The salt, when provided, adds randomness and can be used to bind the derivation to a session or protocol transcript.

HKDF is designed to be simple and robust. It relies only on HMAC, which is widely implemented and well understood, avoiding the complexity of dedicated key derivation primitives. It supports arbitrary output lengths and arbitrary input lengths, making it suitable for diverse protocol requirements. Its security properties are well analysed, and it is widely deployed in protocols such as TLS 1.3, where it is used for key schedule derivation. In 3GPP networks, this proven construction provides confidence in the derived keys used to protect signalling and user plane traffic.

Operationally, HKDF is implemented in the security functions of network elements and user equipment. When a new key is required, the relevant entity supplies the input keying material, salt, and context information according to the 3GPP key derivation specification, and HKDF produces the output key. Because the derivation is deterministic given the inputs, both ends of a security association can independently derive the same key from shared secrets and agreed context. This supports key refresh, separation of keys per interface or purpose, and the overall 5G security key hierarchy.

Purpose & Motivation

HKDF exists to provide a standardised, secure, and flexible way to derive cryptographic keys from shared secrets. In modern security protocols, a single shared secret, such as a Diffie-Hellman result or a long-term key, must be transformed into multiple keys for different purposes: encryption, integrity protection, and different interfaces or directions. Naively reusing the shared secret directly as a key is insecure, and ad hoc derivation methods risk subtle flaws. HKDF solves this by defining a rigorous two-stage process that extracts uniform randomness from potentially non-uniform input and expands it into purpose-bound keys.

Earlier approaches often used simple hash functions or proprietary constructions to derive keys, which lacked formal analysis and could be misused. HKDF, standardised in RFC 5869, offers a well-analysed construction based solely on HMAC, which is already widely implemented. Its extract-then-expand structure handles inputs of varying quality and supports context binding through the info parameter, preventing key reuse across different purposes.

3GPP adopted HKDF in its 5G security specifications to support the complex key hierarchy of 5G networks, where keys are derived at multiple levels for different network functions and interfaces. By relying on a standard, proven key derivation function, 3GPP ensures interoperability and security assurance across vendors and deployments, and aligns its security architecture with best practices used in other major protocols such as TLS 1.3.

Release Timeline

Evolution Across Releases

An overview written from the defining specifications, not a verified change history. For the exact text, open the specifications listed below.

Rel-16 Initial

Introduced into 3GPP security specifications 33.841 and 33.938 as a key derivation function for the 5G security architecture. The initial adoption established HKDF as a standardised method for deriving purpose-bound keys within the 5G key hierarchy.

The definition text carried over unchanged from Rel-16; HKDF remains referenced in the same security specifications without a documented revision to its definition in the available wording.

Defining Specifications

3GPP specifications that define or reference HKDF, with the latest known release. Sourced from the 3GPP document catalog — see methodology.

SpecificationTitleRelease
TR 33.841 vg10 Security aspects; Study on 256-bit algorithms for 5G Rel-16 read
TS 33.938 vj30 5G Standalone Cryptographic Inventory Rel-19 read