integrate with neptune's sponge (#105)

* integrate with neptune's sponge

* fix clippy warning

* add checks to ensure at most one squeeze

* add checks to ensure at most one squeeze
This commit is contained in:
Srinath Setty
2022-08-11 19:03:44 -07:00
committed by GitHub
parent ddd90f7373
commit 0a7cbf925f
8 changed files with 97 additions and 78 deletions

View File

@@ -1,6 +1,6 @@
//! This module implements various gadgets necessary for folding R1CS types.
use crate::{
constants::NUM_CHALLENGE_BITS,
constants::{NUM_CHALLENGE_BITS, NUM_FE_FOR_RO},
gadgets::{
ecc::AllocatedPoint,
utils::{
@@ -268,7 +268,7 @@ where
n_limbs: usize,
) -> Result<AllocatedRelaxedR1CSInstance<G>, SynthesisError> {
// Compute r:
let mut ro = G::ROCircuit::new(ro_consts);
let mut ro = G::ROCircuit::new(ro_consts, NUM_FE_FOR_RO);
ro.absorb(params);
self.absorb_in_ro(cs.namespace(|| "absorb running instance"), &mut ro)?;
u.absorb_in_ro(&mut ro);