HMAC-based Extract-and-Expand Key Derivation Function (RFC 5869)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

OCaml 50.5%
Python 37.9%
Dune 2.3%
Shell 1.6%
Other 7.7%
19 1 0

Clone this repository

https://tangled.org/gazagnaire.org/ocaml-hkdf https://tangled.org/did:plc:jhift2vwcxhou52p3sewcrpx/ocaml-hkdf
git@git.recoil.org:gazagnaire.org/ocaml-hkdf git@git.recoil.org:did:plc:jhift2vwcxhou52p3sewcrpx/ocaml-hkdf

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

ocaml-hkdf#

HMAC-based Extract-and-Expand Key Derivation Function (RFC 5869) for OCaml.

This is a rewrite of the upstream hkdf package (1.0.4) which depends on mirage-crypto and Cstruct.t. This version uses digestif for HMAC and plain bytes for all buffers, avoiding the mirage-crypto and cstruct dependency chain.

Installation#

Install with opam:

$ opam install nox-hkdf

If opam cannot find the package, it may not yet be released in the public opam-repository. Add the overlay repository, then install it:

$ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git
$ opam update
$ opam install nox-hkdf

Usage#

let key = Hkdf.derive
  ~hash:`SHA256
  ~salt:Bytes.empty
  ~ikm:(Bytes.of_string "input key material")
  ~info:(Bytes.of_string "application context")
  ~len:32

References#

Licence#

ISC