polynomials-ecc

Crates.iopolynomials-ecc
lib.rspolynomials-ecc
version0.1.1
created_at2025-11-21 01:15:35.25294+00
updated_at2025-11-22 19:13:07.875639+00
descriptionA library for operating on polynomials over the BLS12-381
homepage
repositoryhttps://github.com/xevisalle/polynomials-ecc
max_upload_size
id1942913
size20,193
(xevisalle)

documentation

README

Polynomials ECC

Crates.io GitHub

This library allows to operate on polynomials over the BLS12-381. In particular, it allows to perform evaluations and interpolations using FFTs. It also offers tools such as efficient multi scalar multiplication, using the blst library as a backend.

DISCLAIMER: the code in this repository has NOT went through an exhaustive security review. Use at your own risk.

Example

use polynomials_ecc::{Domain, Polynomial};
use bls12_381::Scalar;
use rand::rngs::OsRng;
use ff::Field;

// Define our domain of size n = 2^14
let domain = Domain::new(14);

// Create an array of random coefficients
let mut coeffs = vec![];
for _ in 0..10000 {
    coeffs.push(Scalar::random(&mut OsRng));
}

// Define our polynomial
let polynomial = Polynomial::new(coeffs);

// Evaluate using the FFT
let evaluations = polynomial.evaluate(&domain);

// Interpolate using the IFFT
let polynomial_p = evaluations.interpolate(&domain);
Commit count: 0

cargo fmt