Skip to main content

Module hkdf_sha2

Module hkdf_sha2 

Source
Expand description

hkdf-sha2 derivation parameterization (RFC 5869 over the SHA-2 family).

This module mints no keys: prepare yields a DeriveInput, consumed through DeriveInput::derive_bits or a target interface’s derive_key (e.g. hmac_sha2::derive_key).

Enums§

Sha2Variant
The SHA-2 variants: FIPS 180-4 closes this set, so it is an enum. (Each algorithm interface names its closed set of parameterizations <algorithm>-variant.)

Functions§

prepare
Parameterize an HKDF derivation over imported keying material: HKDF-Extract runs with salt, and info is bound for the expand step.
prepare_from
Parameterize an HKDF derivation over another derivation’s output — the chaining step, e.g. from an AgreementSecretKey::agree (WebCrypto’s deriveKey(ECDH → HKDF) shape).