package octez-libs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=c6df840ebbf115e454db949028c595bec558a59a66cade73b52a6d099d6fa4d4
sha512=d8aee903b9fe130d73176bc8ec38b78c9ff65317da3cb4f3415f09af0c625b4384e7498201fdb61aa39086a7d5d409d0ab3423f9bc3ab989a680cf444a79bc13
doc/octez-libs.bls12-381-polynomial/Octez_bls12_381_polynomial/G1_carray/index.html
Module Octez_bls12_381_polynomial.G1_carraySource
init n f returns a fresh C array of length n, with element number i initialized to the result of f i.
degree p returns the index of the last non-zero element of p. Returns -1 if all elements of p are zero.
get_inplace c i res copies the i-th element of a C array c in res
iter_copy_elt f a applies function f in turn to a **copy** of all the elements of a. It is equivalent to f a.(0); f a.(1); ...; f a.(length a - 1); ().
Same as iter_copy_elt, but the function is applied to the index of the element as first argument, and a **copy** of the element itself as second argument.
copy c copies len elements from a C array c starting from position offset
blit src src_off dst dst_off len copies len elements from src to dst starting at the respective offsets.
equal a offset1 b offset2 returns true if the segments of len elements of a and b are equal starting from their respective offsets offset1 (for a) and offset2 (for b).
to_array c converts a C array c to an OCaml array
fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f.
evaluation_ecfft domain points computes the ECFFT. domain can be obtained using Domain.build.
The ECFFT computes the G-linear map G^n -> G^n : (P_i)_{i=0,...,n-1} |-> (sum_{i=0}^{n-1} [domain.(i*j mod n)]P_i)_{j=0,...,n-1}.
where aP denotes the elliptic curve point multiplication.
Note:
- size of domain must be a power of two
- degree of polynomial must be strictly less than the size of domain
interpolation_ecfft_inplace domain points computes the inverse ECFFT. domain can be obtained using Domain.build.
It is the inverse function of evaluation_ecfft_inplace.
Note:
- size of domain must be a power of two
- size of a polynomial must be equal to size of domain
add_arrays_inplace a b writes the element-wise sum of the input vectors a and b into a
mul_arrays evaluations arrays computes the EC point multiplication given the scalar multipliers evaluations and the points arrays