liveBook · Manning

HKDF-Extract

As explained in Real-World Cryptography

HKDF-Extract is the HKDF function that extracts a uniformly random pseudorandom key from input keying material and an optional salt.

HKDF-Extract turns potentially biased input keying material into a uniformly random pseudorandom key. It uses HMAC rather than a plain hash and accepts an optional salt. section 8.6

Use HKDF-Extract as the first step when:

  • The input secret has enough entropy but is not uniformly random. section 8.6
  • A protocol needs repeated, deterministic rederivation of a limited number of keys. section 8.6
  • Different protocol uses should produce different results: use distinct salts, which need not be secret. section 8.6

Same secret, different salt

Feeding the same input secret to HKDF-Extract with different salts produces different uniformly random outputs. If no salt is supplied, the salt is an all-zero byte string, although using a salt is recommended. section 8.6

How Real-World Cryptography covers it

How deep it goes
Explains HMAC, salt handling, and output uniformity, while deferring arbitrary-length generation to HKDF-Expand.
Examples
Uses same-secret comparisons with different salts and an optional all-zero salt.
What it assumes
Builds on HMAC and hash-function basics while explaining salt use and extraction behavior.
What you can do after
Apply HKDF-Extract to obtain uniformly random key material from an input secret and optional salt.
How it connects
Connects HKDF-Extract with HMAC, KDFs, PRNGs, HKDF-Expand, and domain separation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Real-World Cryptography. The section links point to the parts of the book it draws on.