Pseudo Random Key
Instances2Eq, ByteArrayAccess
Eq (PRK a)Defined in cryptonite-0.30 · Crypto.KDF.HKDFByteArrayAccess (PRK a)Defined in cryptonite-0.30 · Crypto.KDF.HKDF
:: a typeCtrl KGHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27
Modulecryptonite-0.30Haskell2010
Key Derivation Function based on HMAC
See RFC5869
Pseudo Random Key
Eq (PRK a)Defined in cryptonite-0.30 · Crypto.KDF.HKDFByteArrayAccess (PRK a)Defined in cryptonite-0.30 · Crypto.KDF.HKDFextract :: (HashAlgorithm a, ByteArrayAccess salt, ByteArrayAccess ikm)=> saltSalt
-> ikmInput Keying Material
-> PRK aPseudo random key
Extract a Pseudo Random Key using the parameter and the underlaying hash mechanism
Create a PRK directly from the input key material.
Only use when guaranteed to have a good quality and random data to use directly as key. This effectively skip a HMAC with key=salt and data=key.
expand :: (HashAlgorithm a, ByteArrayAccess info, ByteArray out)=> PRK aPseudo Random Key
-> infoOptional context and application specific information
-> IntOutput length in bytes
-> outOutput data
Expand key material of specific length out of the parameters