HKDF: Extract-then-Expand
Defined in RFC 5869. Two-phase KDF:
HKDF-Extract(salt, IKM) → PRK
PRK = HMAC-Hash(salt, IKM) # "extract" randomness into a pseudorandom key
HKDF-Expand(PRK, info, L) → OKM
# Expand PRK into output keying material of length L
# "info" binds the output to a specific context
TLS 1.3 wraps this in HKDF-Expand-Label:
HKDF-Expand-Label(Secret, Label, Context, Length)
= HKDF-Expand(Secret, HkdfLabel, Length)
where HkdfLabel = len || "tls13 " || Label || Context