Overview
HKDF first extracts a pseudorandom key from input material, then expands it into one or more context-specific keys.
Derives strong key material from shared secrets using HMAC-based extract and expand steps.
Compact metadata for implementation and discovery.
HKDF first extracts a pseudorandom key from input material, then expands it into one or more context-specific keys.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n)
Worst
O(n)
Space
O(1) besides output
PRK = HMAC(salt, input_key_material)Turns input key material into a pseudorandom key.
T(i) = HMAC(PRK, T(i-1) || info || i)Generates each output block from the previous block and context info.
Show extract producing one pseudorandom key, then expand producing labeled output blocks.
The info field is important for separating keys used for different purposes.
What each reference supports for this entry.
IETF specification for the HMAC-based Extract-and-Expand Key Derivation Function.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
HKDF commonly derives keys from Diffie-Hellman shared secrets.
HKDF uses HMAC for extract and expand operations.