package ocaml-yescrypt

All checked builds pass
  1. Overview
  2. Docs
OCaml bindings for the Yescrypt KDF

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.1.1.tar.gz
md5=9df3f88e74f01d11c137fd802cf5fc30
sha512=37311ad2aa18e396861a7e5b3540753264b687515b78eda1c5f839371d21ab07880129f509b1e1d6b72981aaaef5d85b1f66c39d83a5e96046aa2d28614baec8

Description

OCaml bindings for the Yescrypt password hashing / key derivation function.

README

ocaml-yescrypt

What is Yescrypt?

Yescrypt is a scalable, password-hashing function and a key-derivation function (KDF) designed by Alexander Peslyak, also known as Solar Designer, to be highly resistant to hardware-accelerated brute-force attacks. As an evolution of the scrypt algorithm, it introduces enhanced memory-hardness and "strongly sequential" processing, which effectively thwarts large-scale cracking attempts using GPUs, FPGAs, and ASICs.

It has been adopted as the default password-hashing scheme for several major Linux distributions, including Debian, Ubuntu, and Fedora. In these systems, Yescrypt is identifiable in the /etc/shadow file by the $y$ prefix. (Wikipedia)

This library provides a relatively abstract and easy-to-use API for integrating Yescrypt into OCaml programs.

Documentation

You can find the API documentation here.

Example

Here's a quick example of how to use Yescrypt:

let () =
    let hash = Yescrypt.yescrypt ~passwd:"galaxy2galaxy" ~salt:"hitechjazz"
        ~n:4 ~r:8 ~p:1
    in
    Printf.printf "Result: %s\n" hash

Output:

Result: $y$j25..$cZ4RZB4Oe3aSu/$wE7WgfjiSoHWc95Ob0Z7SdhW9Ygqx3RtqKp8ngTKkL4

License

The C implementations used in this library are based on the work of Colin Percival (scrypt) and Alexander Peslyak (yescrypt).

Additional credit goes to Jeremy Yallop for the Ctypes library used to generate the bindings.

This project is licensed under the Apache 2.0 License - see the LICENSE file for details.

Dependencies (4)

  1. ctypes-foreign >= "0.23"
  2. ctypes >= "0.23"
  3. dune >= "3.16"
  4. ocaml >= "5.0"

Dev Dependencies (2)

  1. odoc with-doc
  2. ounit2 with-test

Used by

None

Conflicts

None

Build status

Results of building ocaml-yescrypt with each compiler on check.ci.ocaml.org, run of against opam-repository 7cdc698. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
0.1.1 (this version) n/a n/a good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure