Module threshold_secret_sharing::numtheory [] [src]

Various number theory utilities functions that are used in the library.

Structs

NewtonPolynomial

Holds together points and newton-interpolated coefficients for fast evaluation.

Functions

fft2

Compute recursively the 2-radix FFT of a_coef in the Zp field defined by prime.

fft2_inverse

Inverse FFT for fft2.

fft3

Compute recursively the 3-radix FFT of a_coef in the Zp field defined by prime.

fft3_inverse

Inverse FFT for fft3.

gcd

GCD euclidean recursive implementation. The first member of the returned triplet is the GCD of a and b.

lagrange_interpolation_at_zero

Performs a Lagrange interpolation at origin for a Zp polynomial defined by points.

mod_evaluate_polynomial

Evaluation of a polynomial on Zp at one given point using Horner's method.

mod_inverse

Inverse of k in the Zp field defined by prime.

mod_pow

x to the power of e in the Zp field defined by prime.

newton_evaluate
newton_interpolation_general

General case for newton interpolation in Zp.

positivise

Arrange all elements of values to be between 0 and prime to ease equality tests.