package kdf

  1. Overview
  2. Docs
Key Derivation Functions: HKDF RFC 5869, PBKDF RFC 2898, SCRYPT RFC 7914

Install

dune-project
 Dependency

Authors

Maintainers

Sources

kdf-1.1.2.tbz
sha256=a327e1daab2d367d75b2fba85f5e827886295225f94c09e68e24a2e2a7508100
sha512=1f644f6a3dc734d981e1867ad6b5662c0d5e10b71b02029f7998cb54aaf037f2e03e9b5f1562e98862ba3d492d5b78b898d126fab46ed030653adbb43ff509dd

doc/kdf.pbkdf/Pbkdf/module-type-S/index.html

Module type Pbkdf.SSource

RFC 2898 specifies two password-based key derivation functions (PBKDF1 and PBKDF2), which are abstracted over a specific hash/pseudorandom function.

Sourceval pbkdf1 : password:string -> salt:string -> count:int -> dk_len:int -> string

pbkdf1 password salt count dk_len is dk, the derived key of dk_len octets. The salt must be eight octets, count the iteration count.

  • raises Failure

    when either salt is not eight octets long or either count or dk_len are not valid.

Sourceval pbkdf2 : password:string -> salt:string -> count:int -> dk_len:int32 -> string

pbkdf2 password salt count dk_len is dk, the derived key of dk_len octets.

  • raises Failure

    when either count or dk_len are not valid