Notes

HKDF

HMAC-based Extract-and-Expand Key Derivation Function

Example of HKDF1:

ghci> import Crypto.KDF.HKDF
ghci> import Crypto.Hash (SHA256)
ghci> let pkr = extract ("salt" :: ByteString) ("secret" :: ByteString) :: PRK SHA256
ghci| in expand pkr ("payload" :: ByteString) 32 :: ByteString
"\DC4\147\223\v%\175\f\177\143\132\202\142\233\236\135\153\253\CANs\213wh\149\193\128\240\192t\DC1\UST,"