Expand description
Key derivation under a profile: HKDF (RFC 5869; SP 800-56C Rev. 2 §5) and the hash-based one-step KDF (SP 800-56C Rev. 2 §4.1, option 1).
Structs§
- Derived
Key - Derived keying material, zeroized on drop.
Debugprints its length only.
Enums§
- Spec
- A key derivation: the KDF and every input but the secret.
Functions§
- derive
- Derives
lenbytes fromsecretasspecsays. Refuses, in this order:Spec::Dhkem, which needs the keys onlyecdh’sagreehas, and aspecwhose algorithm is not of its kind (CryptoError::KdfSpecMismatch); an algorithma’s profile does not admit, or its module line lacks (Admitted::admit_kdf); an emptyinfoorfixed_infounlesskdf_info_may_be_empty; an output outside1..=algorithm.max_output_len()bytes; an emptysecret.