Skip to content
/ hkdf Public
forked from schnef/hkdf

Erlang HMAC-based Extract-and-Expand Key Derivation Function (HKDF)

License

Notifications You must be signed in to change notification settings

irccloud/hkdf

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Erlang based HMAC-based Extract-and-Expand Key Derivation Function (HKDF)

See RFC 5869 for details. This is a very straigth forward implementation, including the tests from RFC5869 as eunit tests. It supports the hash functions md5, sha, sha224, sha256, sha384, sha512.

Usage

  • Hash = md5 | sha | sha224 | sha256 | sha384 | sha512.
  • IKM = input keying material.
  • salt = optional salt value (a non-secret random value)
PKR = hkdf:extract(Hash, IKM).

or

PKR = hkdf:extract(Hash, IKM, Salt).

Next, expand the PKR to the required length

  • info = optional context and application specific information,
  • L = length of output keying material in octets.
OKM = expand(Hash, PRK, Info, L)

About

Erlang HMAC-based Extract-and-Expand Key Derivation Function (HKDF)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Erlang 100.0%