Maintainer | Jiri Marsicek <jiri.marsicek@gmail.com> |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
This module provides implementation of HKDF function defined in RFC-5869 (http://www.ietf.org/rfc/rfc5869.txt), It is using HashAlgorithm from "cryptohash" as underlying implementation
- hkdfExtract :: HashAlgorithm a => a -> ByteString -> ByteString -> HMAC a
- hkdfExpand :: HashAlgorithm a => a -> ByteString -> ByteString -> Int -> Maybe ByteString
- hkdf :: HashAlgorithm a => a -> ByteString -> ByteString -> ByteString -> Int -> Maybe ByteString
Documentation
:: HashAlgorithm a | |
=> a | hash algorithm |
-> ByteString | optional salt value (a non-secret random value) |
-> ByteString | input keying material |
-> HMAC a | a pseudorandom key |
Extract function.
Synonym to hmacAlg
:: HashAlgorithm a | |
=> a | hash algorithm |
-> ByteString | pseudorandom key |
-> ByteString | info |
-> Int | length of output keying material in octets |
-> Maybe ByteString | output keying material |
Expand function.
Nothing is returned in case (length of output > 255 * hash length)
:: HashAlgorithm a | |
=> a | hash algorithm |
-> ByteString | optional salt value (a non-secret random value) |
-> ByteString | input keying material |
-> ByteString | info |
-> Int | length of output keying material in octets |
-> Maybe ByteString | output keying material |
Function combining extract and expand functions.