From c2dd897b7a5cbfc1d813c7caaee8bc0ceaa3bf18 Mon Sep 17 00:00:00 2001 From: Matej Penciak Date: Sat, 2 Mar 2024 08:05:39 -0500 Subject: [PATCH] fix: fix hashing order --- src/cyclefold/gadgets.rs | 6 +++--- src/cyclefold/snark.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cyclefold/gadgets.rs b/src/cyclefold/gadgets.rs index 4799c26db..460c1f487 100644 --- a/src/cyclefold/gadgets.rs +++ b/src/cyclefold/gadgets.rs @@ -458,12 +458,12 @@ pub mod emulated { where CS: ConstraintSystem<::Base>, { - self - .comm_E - .absorb_in_ro(cs.namespace(|| "absorb comm_E"), ro)?; self .comm_W .absorb_in_ro(cs.namespace(|| "absorb comm_W"), ro)?; + self + .comm_E + .absorb_in_ro(cs.namespace(|| "absorb comm_E"), ro)?; ro.absorb(&self.u); ro.absorb(&self.x0); diff --git a/src/cyclefold/snark.rs b/src/cyclefold/snark.rs index 5006bbbc9..08b26d415 100644 --- a/src/cyclefold/snark.rs +++ b/src/cyclefold/snark.rs @@ -521,10 +521,10 @@ where { absorb_commitment::(&U.comm_W, ro); absorb_commitment::(&U.comm_E, ro); + ro.absorb(U.u); for e in &U.X { ro.absorb(*e); } - ro.absorb(U.u); } #[cfg(test)]