Expand description
Cryptographic backend abstraction for KDF and MAC operations.
Provides unified API for key derivation and message authentication, with compile-time selection between:
- Default: Blake3 (fast, modern, ~10+ GB/s with SIMD)
- FIPS mode: HKDF-SHA256 + HMAC-SHA256 (NIST-approved)
§Feature Flags
- Default: Blake3
derive_key()andkeyed_hash() fips: HKDF-SHA256 (SP 800-56C) and HMAC-SHA256 (FIPS 198-1)
Functions§
- derive_
key - Derive a 32-byte key from input material with domain separation.
- keyed_
mac - Compute a 32-byte keyed MAC.
- keyed_
mac_ truncated - Compute a 16-byte truncated keyed MAC (for wire format).
- keyed_
mac_ truncated_ parts - Multi-part variant of
keyed_mac_truncated— authenticates the concatenation ofpartswithout allocating a joined buffer.