package octez-bls12-381-polynomial

  1. Overview
  2. Docs
type fr_array = Fr_carray.t
type ec_array = EC_point_array.t
val evaluation_ecfft_inplace : ec_array -> domain:fr_array -> log:int -> log_degree:int -> unit

evaluation_ecfft_inplace points domain log log_degree performs the ECFTT.

requires:

  • size p = size domain
  • size domain = 2^log
  • domain = [one; g; ..; g^{n-1}] where g is a primitive n-th root of unity and n = 2^log (as done by Domain.Stubs.compute_domain)
val interpolation_ecfft_inplace : ec_array -> domain:fr_array -> log:int -> unit

interpolation_ecfft_inplace p domain log performs the inverse ECFFT.

requires:

  • size p = size domain
  • size domain = 2^log
  • domain = [one; g; ..; g^{n-1}] where g is a primitive n-th root of unity and n = 2^log (as done by Domain.Stubs.compute_domain)
val add_arrays_inplace : ec_array -> ec_array -> int -> unit

add_arrays_inplace a b size writes the element-wise sum of the input vectors a and b into a.

requires:

  • size a = size b = size
val mul_arrays : ec_array array -> fr_array array -> ec_array array -> (int * int) -> unit

mul_arrays evaluations arrays (dim1, dim2) computes the EC point multiplication given the scalar multipliers evaluations and the points arrays.

requires:

  • size evaluations = size arrays = dim1
  • size evaluations.(i) = size arrays.(i) = dim2 for i=0, ..., dim1-1
OCaml

Innovation. Community. Security.