package ocaml-yescrypt
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=9df3f88e74f01d11c137fd802cf5fc30
sha512=37311ad2aa18e396861a7e5b3540753264b687515b78eda1c5f839371d21ab07880129f509b1e1d6b72981aaaef5d85b1f66c39d83a5e96046aa2d28614baec8
doc/README.html
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" hashOutput:
Result: $y$j25..$cZ4RZB4Oe3aSu/$wE7WgfjiSoHWc95Ob0Z7SdhW9Ygqx3RtqKp8ngTKkL4License
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.