Expand description
HMAC key minting (RFC 2104) over the SHA-2 hash family (FIPS 180-4).
Keys minted here drive mac.mac-key.sign and verify. Adding an
algorithm touches only an interface like this one: the generic mac
surface is closed.
Functions§
- derive_
key - Mint a key from a parameterized derivation: the derivation runs
at
lengthbits and the result is subject toimport-key-raw’s contract. - generate_
key - Generate a fresh random HMAC key over the declared SHA-2 variant.
- import_
key_ jwk - Import an RFC 7517 JSON Web Key as an HMAC key over the declared SHA-2 variant.
- import_
key_ raw - Import raw key material as an HMAC key over the declared SHA-2 variant.
- unwrap_
key_ jwk - Mint a key from unwrapped key material read as an RFC 7517 JSON
Web Key, subject to
import-key-jwk’s contract plus the unwrap-pathuse/key_opschecks (seeREADME.md, “JWK contract”).inputis consumed; seeunwrap-key-rawfor the options model. - unwrap_
key_ raw - Mint a key from unwrapped key material (see the
wrappinginterface):input’s bytes are read as raw key material, subject toimport-key-raw’s contract.inputis consumed.