Expand description
HKDF (RFC 5869) over the SHA-2 hash family: the extract-then-expand key derivation function, as the Web Cryptography API serves it.
This interface mints no keys. It mints derive-inputs — parameterized
derivations — which the key-minting interfaces’ derive-key functions
consume (aes-gcm.derive-key, hmac-sha2.derive-key), and which
yield raw output through derivation.derive-input.derive-bits. The
ikm resource and its import stay hkdf’s, so one imported secret
can parameterize derivations of either hash family.
Functions§
- prepare
- Parameterize a derivation: HKDF-Extract with
saltruns over the material (eagerly, so the returned input retains the PRK rather than the IKM), andinfois bound for the expand step at use. An implementation not serving the variant failserror.unsupported(the truncated SHA-2 variants are unserved package-wide, as forhmac-sha2). - prepare_
from - Parameterize a derivation whose IKM is another derivation’s output — the chaining step (a future agreement’s shared secret fed to HKDF without transiting the caller).