From 869bed65f43d906bb7cbf353daa53d99d2d87f32 Mon Sep 17 00:00:00 2001 From: Mara Mihali Date: Mon, 1 Aug 2022 14:02:45 +0100 Subject: [PATCH] implement spartan verifier as a circuit and verify it with groth16 --- src/constraints.rs | 6 +++--- src/r1csproof.rs | 5 ++++- src/sparse_mlpoly.rs | 4 ++++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/constraints.rs b/src/constraints.rs index c8db59a..4604793 100644 --- a/src/constraints.rs +++ b/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}; diff --git a/src/r1csproof.rs b/src/r1csproof.rs index bd60df1..1de8581 100644 --- a/src/r1csproof.rs +++ b/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; diff --git a/src/sparse_mlpoly.rs b/src/sparse_mlpoly.rs index 1ec511a..009639e 100644 --- a/src/sparse_mlpoly.rs +++ b/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;