#cryptography #finite-fields #fft #polynomials

ark-poly

A library for efficient polynomial arithmetic via FFTs over finite fields

2 unstable releases

0.3.0 Jun 6, 2021
0.2.0 Mar 24, 2021

#926 in Cryptography

Download history 9462/week @ 2022-06-15 10227/week @ 2022-06-22 9586/week @ 2022-06-29 9212/week @ 2022-07-06 8447/week @ 2022-07-13 8254/week @ 2022-07-20 8691/week @ 2022-07-27 8666/week @ 2022-08-03 7202/week @ 2022-08-10 8049/week @ 2022-08-17 10231/week @ 2022-08-24 8756/week @ 2022-08-31 9462/week @ 2022-09-07 8225/week @ 2022-09-14 8976/week @ 2022-09-21 7582/week @ 2022-09-28

35,755 downloads per month
Used in 23 crates (15 directly)

MIT/Apache

435KB
10K SLoC

ark-poly

This crate implements traits and implementations for polynomials, FFT-friendly subsets of a field (dubbed "domains"), and FFTs for these domains.

Polynomials

The polynomial module provides the following traits for defining polynomials in coefficient form:

  • Polynomial: Requires implementors to support common operations on polynomials, such as Add, Sub, Zero, evaluation at a point, degree, etc, and defines methods to serialize to and from the coefficient representation of the polynomial.
  • UVPolynomial : Specifies that a Polynomial is actually a univariate polynomial.
  • MVPolynomial: Specifies that a Polynomial is actually a multivariate polynomial.

This crate also provides the following data structures that implement these traits:

  • univariate/DensePolynomial: Represents degree d univariate polynomials via a list of d + 1 coefficients. This struct implements the UVPolynomial trait.
  • univariate/SparsePolynomial: Represents degree d univariate polynomials via a list containing all non-zero monomials. This should only be used when most coefficients of the polynomial are zero. This struct implements the Polynomial trait (but not the UVPolynomial trait).
  • multivariate/SparsePolynomial: Represents multivariate polynomials via a list containing all non-zero monomials.

This crate also provides the univariate/DenseOrSparsePolynomial enum, which allows the user to abstract over the type of underlying univariate polynomial (dense or sparse).

Evaluations

The evaluations module provides data structures to represent univariate polynomials in lagrange form.

The evaluations module also provides the following traits for defining multivariate polynomials in lagrange form:

This crate provides some data structures to implement these traits.

Domains

TODO

Dependencies

~2.1–3MB
~65K SLoC