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.1.tbz
sha256=922efdf80d35b8fcb0ec7d0143400f45bb986cb1c715d717d5402f111cf8f8e5
sha512=8584c24b249d9d264fc58e1cd8299968b6098fe915fe7c8f935937c7e3cb200bde0bd0fdb042fb000337fb0b6298866068933cd20b95e51a021cbf3e9e3c6456

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