Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: rename monomial.rs to poly_coeff.rs #283

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cryptography/erasure_codes/src/reed_solomon.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use bls12_381::{batch_inversion::batch_inverse, ff::Field, Scalar};

use crate::errors::RSError;
use polynomial::{domain::Domain, monomial::vanishing_poly};
use polynomial::{domain::Domain, poly_coeff::vanishing_poly};

/// ErasurePattern is an abstraction created to capture the idea
/// that erasures do not appear in completely random locations.
Expand Down
2 changes: 1 addition & 1 deletion cryptography/kzg_multi_open/src/fk20/cosets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ mod tests {
use std::collections::HashSet;

use bls12_381::Scalar;
use polynomial::{domain::Domain, monomial::poly_eval};
use polynomial::{domain::Domain, poly_coeff::poly_eval};

use crate::fk20::{
batch_toeplitz::transpose,
Expand Down
2 changes: 1 addition & 1 deletion cryptography/kzg_multi_open/src/fk20/h_poly.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::fk20::toeplitz::ToeplitzMatrix;
use bls12_381::{ff::Field, G1Projective, Scalar};
use polynomial::monomial::PolyCoeff;
use polynomial::poly_coeff::PolyCoeff;

use super::batch_toeplitz::BatchToeplitzMatrixVecMul;

Expand Down
2 changes: 1 addition & 1 deletion cryptography/kzg_multi_open/src/fk20/naive.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::commit_key::CommitKey;
use bls12_381::{g1_batch_normalize, G1Point, Scalar};
use polynomial::domain::Domain;
use polynomial::monomial::PolyCoeff;
use polynomial::poly_coeff::PolyCoeff;

use super::cosets::reverse_bit_order;

Expand Down
2 changes: 1 addition & 1 deletion cryptography/kzg_multi_open/src/fk20/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use crate::fk20::h_poly::take_every_nth;
use bls12_381::fixed_base_msm::UsePrecomp;
use bls12_381::group::prime::PrimeCurveAffine;
use bls12_381::{g1_batch_normalize, G1Point, Scalar};
use polynomial::{domain::Domain, monomial::PolyCoeff};
use polynomial::{domain::Domain, poly_coeff::PolyCoeff};

use super::h_poly::compute_h_poly_commitments;

Expand Down
2 changes: 1 addition & 1 deletion cryptography/kzg_multi_open/src/fk20/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use bls12_381::{
batch_inversion::batch_inverse, ff::Field, g1_batch_normalize, lincomb::g1_lincomb,
multi_pairings, reduce_bytes_to_scalar_bias, G1Point, G2Point, G2Prepared, Scalar,
};
use polynomial::{domain::Domain, monomial::poly_add};
use polynomial::{domain::Domain, poly_coeff::poly_add};
use sha2::{Digest, Sha256};
use std::mem::size_of;

Expand Down
4 changes: 3 additions & 1 deletion cryptography/kzg_multi_open/src/naive.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use crate::{commit_key::CommitKey, opening_key::OpeningKey};
use bls12_381::{ff::Field, multi_pairings, G1Point, G1Projective, G2Point, G2Prepared, Scalar};
use polynomial::monomial::{lagrange_interpolate, poly_eval, poly_sub, vanishing_poly, PolyCoeff};
use polynomial::poly_coeff::{
lagrange_interpolate, poly_eval, poly_sub, vanishing_poly, PolyCoeff,
};

/// This modules contains code to create and verify opening proofs in a naive way.
/// It is also general, meaning the points we are creating opening proofs
Expand Down
2 changes: 1 addition & 1 deletion cryptography/polynomial/benches/benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use bls12_381::Scalar;
use bls12_381::{ff::Field, group::Group, G1Projective};
use crate_crypto_internal_eth_kzg_polynomial::{domain::Domain, monomial::poly_eval};
use crate_crypto_internal_eth_kzg_polynomial::{domain::Domain, poly_coeff::poly_eval};
use criterion::{criterion_group, criterion_main, Criterion};

pub fn bench_polynomial_evaluation(c: &mut Criterion) {
Expand Down
4 changes: 2 additions & 2 deletions cryptography/polynomial/src/domain.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::monomial::PolyCoeff;
use crate::poly_coeff::PolyCoeff;
use bls12_381::ff::{Field, PrimeField};
use bls12_381::{
group::Group,
Expand Down Expand Up @@ -330,7 +330,7 @@ fn precompute_twiddle_factors<F: Field>(omega: &F, n: usize) -> Vec<F> {

#[cfg(test)]
mod tests {
use crate::monomial::poly_eval;
use crate::poly_coeff::poly_eval;

use super::*;

Expand Down
2 changes: 1 addition & 1 deletion cryptography/polynomial/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pub mod domain;
pub mod monomial;
pub mod poly_coeff;
Loading