hkdf-0.0.1.1: Implementation of HKDF (RFC 5869)

MaintainerJiri Marsicek <jiri.marsicek@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Crypto.HKDF

Description

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

Synopsis

Documentation

hkdfExtract Source

Arguments

:: 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

hkdfExpand Source

Arguments

:: 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)

hkdf Source

Arguments

:: 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.