package bls12-381-hash

  1. Overview
  2. Docs
Implementation of some cryptographic hash primitives using the scalar field of BLS12-381

Install

Dune Dependency

Authors

Maintainers

Sources

ocaml-bls12-381-hash-0.0.2.tar.bz2
md5=e858f6d093fd5ea10a3be56b0f2ec0f8
sha512=f5fbeaefa182d4f7cee78a19e6503933002c12caf84ede29b501965a7e95c2e38c797af22fbdee4747ea629a6852ed5e9292c9950c3de5fa2ea053171a768b84

Description

Published: 26 Sep 2022

README

OCaml implementation of BLS12-381

Use with caution before release 1.0.0

This library provides a fast implementation of:

  • an instantiation of Poseidon providing a security of 128 bits. See the documentation for more information on the used parameters.

  • an instantiation of Rescue providing a security of 128 bits. See the documentation for more information on the used parameters.

  • an instantiation of Anemoi providing a security of 128 bits. See the documentation for more information on the used parameters.

Install

Use a local switch for development

opam switch create ./ 4.14.0
dune build

Install in an existing local switch

# for the latest published version in ocaml/opam-repository
opam install bls12-381-hash
# for the dev version
opam pin add bls12-381-hash.dev git+https://gitlab.com/dannywillems/ocaml-bls12-381-hash\#main

Run tests

dune runtest

To get the coverage:

dune runtest --instrument-with bisect_ppx --force
bisect-ppx-report html

Run the benchmarks

Install core_bench:

opam install core_bench

See files listed in the directory benchmark and execute it with dune exec. For instance:

dune exec ./benchmark/bench_anemoi.exe

Documentation

opam install odoc
dune build @doc

Dependencies (3)

  1. bls12-381 >= "5.0.0" & < "6.0.0"
  2. dune >= "2.8.4"
  3. ocaml >= "4.12"

Dev Dependencies (2)

  1. bisect_ppx with-test & >= "2.5"
  2. alcotest with-test

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.