HKDF (RFC 5869), over any Hash #
RFC 5869 §2.2 Extract. An empty salt stands for digestSize zero bytes.
Equations
- Cryptlib.Primitives.KDF.HKDF.extract H salt ikm = Cryptlib.Primitives.MAC.HMAC.hmac H (if salt.size = 0 then { data := Array.replicate H.digestSize 0 } else salt) ikm
Instances For
RFC 5869 §2.3 Expand: iterated HMAC over (PRK, T(i-1) ‖ info ‖ i), truncated to len.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Cryptlib.Primitives.KDF.HKDF.expand.go H prk info 0 a✝² a✝¹ a✝ = a✝
Instances For
theorem
Cryptlib.Primitives.KDF.HKDF.expand_size
(H : Hash.Hash.Hash)
(prk info : ByteArray)
(len : Nat)
:
Expand-only HKDF as a KDF, the raw input keying material used directly as the PRK.
Equations
- Cryptlib.Primitives.KDF.HKDF.kdfOf H = { expand := Cryptlib.Primitives.KDF.HKDF.expand H, expand_size := ⋯ }