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

remove unnecessary functionality for testudo #15

Merged
merged 2 commits into from
Feb 7, 2023
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
4 changes: 2 additions & 2 deletions src/commitments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use super::group::{GroupElement, GroupElementAffine, VartimeMultiscalarMul, GROU
use super::scalar::Scalar;
use crate::group::CompressGroupElement;
use crate::parameters::*;
use ark_ec::{AffineRepr, CurveGroup};
use ark_ff::PrimeField;
use ark_ec::{AffineRepr};

use std::ops::Mul;

use ark_crypto_primitives::sponge::poseidon::PoseidonSponge;
Expand Down
2 changes: 1 addition & 1 deletion src/constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use ark_crypto_primitives::sponge::{
constraints::CryptographicSpongeVar,
poseidon::{constraints::PoseidonSpongeVar, PoseidonConfig},
};
use ark_poly_commit::multilinear_pc::data_structures::{Commitment, Proof, VerifierKey};
use ark_poly_commit::multilinear_pc::data_structures::{Commitment};
use ark_r1cs_std::{
alloc::{AllocVar, AllocationMode},
fields::fp::FpVar,
Expand Down
26 changes: 4 additions & 22 deletions src/dense_mlpoly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

use crate::poseidon_transcript::{AppendToPoseidon, PoseidonTranscript};


use super::commitments::{Commitments, MultiCommitGens};
use super::errors::ProofVerifyError;
use super::group::{
Expand All @@ -13,19 +12,13 @@ use super::math::Math;
use super::nizk::{DotProductProofGens, DotProductProofLog};
use super::random::RandomTape;
use super::scalar::Scalar;
use super::transcript::{AppendToTranscript, ProofTranscript};
use ark_bls12_377::{Bls12_377 as I, G1Affine};
use ark_ec::scalar_mul::variable_base::VariableBaseMSM;
use ark_ec::{pairing::Pairing, CurveGroup};
use ark_ff::{One, PrimeField, UniformRand, Zero};
use ark_poly::{DenseMultilinearExtension, MultilinearExtension};
use ark_poly_commit::multilinear_pc::data_structures::{
Commitment, CommitterKey, Proof, UniversalParams, VerifierKey,
};
use ark_bls12_377::Bls12_377 as I;
use ark_ff::{One, UniformRand, Zero};
use ark_poly::MultilinearExtension;
use ark_poly_commit::multilinear_pc::data_structures::{CommitterKey, VerifierKey};
use ark_poly_commit::multilinear_pc::MultilinearPC;
use ark_serialize::*;
use core::ops::Index;
use merlin::Transcript;
use std::ops::{Add, AddAssign, Neg, Sub, SubAssign};

#[cfg(feature = "multicore")]
Expand Down Expand Up @@ -465,16 +458,6 @@ impl Index<usize> for DensePolynomial {
}
}

impl AppendToTranscript for PolyCommitment {
fn append_to_transcript(&self, label: &'static [u8], transcript: &mut Transcript) {
transcript.append_message(label, b"poly_commitment_begin");
for i in 0..self.C.len() {
transcript.append_point(b"poly_commitment_share", &self.C[i]);
}
transcript.append_message(label, b"poly_commitment_end");
}
}

impl AppendToPoseidon for PolyCommitment {
fn append_to_poseidon(&self, transcript: &mut PoseidonTranscript) {
for i in 0..self.C.len() {
Expand Down Expand Up @@ -593,7 +576,6 @@ impl PolyEvalProof {

#[cfg(test)]
mod tests {


use crate::parameters::poseidon_params;

Expand Down
2 changes: 1 addition & 1 deletion src/group.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::errors::ProofVerifyError;
use ark_ec::scalar_mul::variable_base::VariableBaseMSM;
use ark_ec::Group;
use ark_ff::PrimeField;

use lazy_static::lazy_static;

use super::scalar::Scalar;
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ mod sparse_mlpoly;
mod sqrt_pst;
mod sumcheck;
mod timer;
mod transcript;
mod unipoly;

pub mod parameters;
Expand Down
14 changes: 7 additions & 7 deletions src/mipp.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
use super::macros::*;

use ark_ec::scalar_mul::variable_base::VariableBaseMSM;
use ark_ec::CurveGroup;
use ark_ec::{pairing::Pairing, AffineRepr};
use ark_ff::{BigInt, Field, PrimeField};
use ark_ff::{Field, PrimeField};
use ark_poly::{DenseMultilinearExtension, MultilinearExtension};
use ark_poly_commit::multilinear_pc::data_structures::{
CommitmentG2, CommitterKey, Proof, ProofG1, VerifierKey,
CommitmentG2, CommitterKey, ProofG1, VerifierKey,
};
use ark_poly_commit::multilinear_pc::MultilinearPC;
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, Read, SerializationError, Write};
use ark_std::cfg_iter;
use ark_serialize::{CanonicalDeserialize, CanonicalSerialize, SerializationError, Write};

use ark_std::One;
use ark_std::Zero;
use rayon::iter::ParallelIterator;
Expand All @@ -35,7 +35,7 @@ impl<E: Pairing> MippProof<E> {
y: Vec<E::ScalarField>,
h: Vec<E::G2Affine>,
U: &E::G1Affine,
T: &<E as Pairing>::TargetField,
_T: &<E as Pairing>::TargetField,
) -> Result<MippProof<E>, Error> {
// the values of vectors A and y rescaled at each step of the loop
let (mut m_a, mut m_y) = (a.clone(), y.clone());
Expand Down Expand Up @@ -266,7 +266,7 @@ impl<E: Pairing> MippProof<E> {

let mut point: Vec<E::ScalarField> = Vec::new();
let m = xs_inv.len();
for i in 0..m {
for _i in 0..m {
let r = transcript.challenge_scalar::<E::ScalarField>(b"random_point");
point.push(r);
}
Expand Down
Loading