package octez-libs

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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.

module Parameters : sig ... end

Set of parameters for BLS12-381, and parameters for specific instantiations given in the reference paper

type parameters = Parameters.t

Parameters for a specific instance

type ctxt

Context of the permutation

val allocate_ctxt : parameters -> ctxt

allocate_ctxt parameters. Allocate a context for a specific instance of the permutation.

val get_state : ctxt -> Bls12_381.Fr.t array

Return the current state of the context

val get_state_size : ctxt -> int

Return the state size of the context

val set_state : ctxt -> Bls12_381.Fr.t array -> unit

set_state ctxt state. Set the context state to the given value. The value state must be of the same size than the expecting state

val apply_permutation : ctxt -> unit

Apply a permutation on the current state of the context

OCaml

Innovation. Community. Security.