package octez-libs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=aa2f5bc99cc4ca2217c52a1af2a2cdfd3b383208cb859ca2e79ca0903396ca1d
sha512=d68bb3eb615e3dcccc845fddfc9901c95b3c6dc8e105e39522ce97637b1308a7fa7aa1d271351d5933febd7476b2819e1694f31198f1f0919681f1f9cc97cb3a
doc/octez-libs.bls12-381-polynomial/Octez_bls12_381_polynomial/G2_carray/index.html
Module Octez_bls12_381_polynomial.G2_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