package bls12-381

  1. Overview
  2. Docs
Implementation of BLS12-381 and some cryptographic primitives built on top of it

Install

Dune Dependency

Authors

Maintainers

Sources

ocaml-bls12-381-4.0.0.tar.bz2
md5=82faa0c51f5bf5c846c79f35963ef6f2
sha512=8b1620f3ccde4017e6205d18c7040b26f3b5affbc71237ffc263fe2d625a7276e20b44617a632736f1426bcc8eb184705360506ff88f0f1ecb28c7a0514fef29

doc/bls12-381/Bls12_381/Rescue/index.html

Module Bls12_381.RescueSource

Implementation of an instantiation of Rescue over the scalar field of BLS12-381 for a security of 128 bits and with the permutation x^5. The parameters of the instantiation are:

  • state size = 3
  • number of rounds = 14

These parameters have been generated using this script.

Sourcetype ctxt

Context of the permutation

Sourceval constants_init : Fr.t array -> Fr.t array array -> unit

constants_init ark mds initializes the constants for Poseidon.

Warnings:

  • The function does not verify the parameters are secured
  • This function must be called before calling init, apply_permutation and get
Sourceval init : Fr.t -> Fr.t -> Fr.t -> ctxt

init a b c returns a new context with an initialised state with the value [a, b, c].

Sourceval apply_permutation : ctxt -> unit

apply_permutation ctxt applies a permutation on the state. The context is modified.

Sourceval get : ctxt -> Fr.t * Fr.t * Fr.t

get ctxt returns the state of the permutation

OCaml

Innovation. Community. Security.