upstream: github.com/robur-coop/kdf
0
fork

Configure Feed

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

OCaml 83.8%
C 6.1%
Dune 3.5%
Other 6.6%
21 1 0

Clone this repository

https://tangled.org/gazagnaire.org/kdf https://tangled.org/did:plc:jhift2vwcxhou52p3sewcrpx/kdf
git@git.recoil.org:gazagnaire.org/kdf git@git.recoil.org:did:plc:jhift2vwcxhou52p3sewcrpx/kdf

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

Download tar.gz
README.md

kdf - Key Derivation Functions#

This repository provides multiple already specified key derivation functions in and for OCaml:

Documentation#

API Documentation

Installation#

Install with opam:

$ opam install nox-kdf

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

Example#

Derive protocol-specific keys with HKDF or password-derived keys with PBKDF2/scrypt, depending on the secret material you start with:

let salt = "deployment-2026"
let ikm = "shared input key material"

let key =
  let prk = Hkdf.extract ~hash:`SHA256 ~salt ikm in
  Hkdf.expand ~hash:`SHA256 ~prk ~info:"api-token" 32