Expand description
This module provides common utilities, traits and structures for group, field and polynomial arithmetic.
Structs§
- Coordinates
- The affine coordinates of a point on an elliptic curve.
- Sqrt
Tables - Tables used for square root computation.
Traits§
- Curve
Affine - This trait is the affine counterpart to
Curve
and is used for serialization, storage in memory, and inspection of $x$ and $y$ coordinates. - Curve
Ext - This trait is a common interface for dealing with elements of an elliptic curve group in a “projective” form, where that arithmetic is usually more efficient.
- Field
- This trait represents an element of a field.
- Field
Ext - This trait is a common interface for dealing with elements of a finite field.
- Group
- This represents an element of a group with basic operations that can be performed. This allows an FFT implementation (for example) to operate generically over either a field or elliptic curve group.
- Sqrt
Ratio - A trait that exposes additional operations related to calculating square roots of prime-order finite fields.
Functions§
- best_
fft - Performs a radix-$2$ Fast-Fourier Transformation (FFT) on a vector of size
$n = 2^k$, when provided
log_n
= $k$ and an element of multiplicative order $n$ calledomega
($\omega$). The result is that the vectora
, when interpreted as the coefficients of a polynomial of degree $n - 1$, is transformed into the evaluations of this polynomial at each of the $n$ distinct powers of $\omega$. This transformation is invertible by providing $\omega^{-1}$ in place of $\omega$ and dividing each resulting field element by $n$. - best_
multiexp - Performs a multi-exponentiation operation.
- compute_
inner_ product - This computes the inner product of two vectors
a
andb
. - eval_
polynomial - This evaluates a provided polynomial (in coefficient form) at
point
. - kate_
division - Divides polynomial
a
inX
byX - b
with no remainder. - lagrange_
interpolate - Returns coefficients of an n - 1 degree polynomial given a set of n points
and their evaluations. This function will panic if two values in
points
are the same. - parallelize
- This simple utility function will parallelize an operation that is to be performed over a mutable slice.
- recursive_
butterfly_ arithmetic - This perform recursive butterfly arithmetic
- small_
multiexp - Performs a small multi-exponentiation operation. Uses the double-and-add algorithm with doublings shared across points.