Browse Source

implement spartan verifier as a circuit and verify it with groth16

master
Mara Mihali 2 years ago
committed by maramihali
parent
commit
869bed65f4
3 changed files with 11 additions and 4 deletions
  1. +3
    -3
      src/constraints.rs
  2. +4
    -1
      src/r1csproof.rs
  3. +4
    -0
      src/sparse_mlpoly.rs

+ 3
- 3
src/constraints.rs

@ -23,10 +23,10 @@ use ark_r1cs_std::{
fields::fp::FpVar,
prelude::{Boolean, EqGadget, FieldVar},
};
<<<<<<< HEAD
use ark_relations::r1cs::{ConstraintSynthesizer, ConstraintSystemRef, Namespace, SynthesisError};
use ark_sponge::{
constraints::CryptographicSpongeVar,
poseidon::{constraints::PoseidonSpongeVar, PoseidonParameters},
=======
use ark_relations::{
};
use rand::{CryptoRng, Rng};

+ 4
- 1
src/r1csproof.rs

@ -11,7 +11,10 @@ use ark_bw6_761::BW6_761 as P;
use super::commitments::MultiCommitGens;
use super::dense_mlpoly::{DensePolynomial, EqPolynomial, PolyCommitmentGens};
use super::errors::ProofVerifyError;
use super::group::{
CompressGroupElement, DecompressGroupElement, GroupElement, VartimeMultiscalarMul,
};
use super::nizk::{EqualityProof, KnowledgeProof, ProductProof};
use super::r1csinstance::R1CSInstance;
use super::scalar::Scalar;

+ 4
- 0
src/sparse_mlpoly.rs

@ -1650,7 +1650,11 @@ impl SparsePolynomial {
#[cfg(test)]
mod tests {
<<<<<<< HEAD
use crate::parameters::poseidon_params;
=======
use crate::{parameters::poseidon_params};
>>>>>>> implement spartan verifier as a circuit and verify it with groth16
use super::*;
use ark_std::UniformRand;

Loading…
Cancel
Save