constrain_sig() implemented, still have to test
Brian Lawrence tideofwords@gmail.com
Mon, 30 Sep 2024 11:44:28 -0700
1 files changed,
3 insertions(+),
1 deletions(-)
jump to
M
src/schnorr_prover.rs
→
src/schnorr_prover.rs
@@ -182,9 +182,11 @@ // note that it's safe to clone Targets since they just contain indices
let hash_input: Vec<Target> = std::iter::once(r) .chain(msg.msg.iter().cloned()) .collect(); - let e: Target = builder.hash_n_to_hash_no_pad::<PoseidonHash>( + let hash_output: Target = builder.hash_n_to_hash_no_pad::<PoseidonHash>( hash_input, ).elements[0]; // whoops have to take mod group order; + + let e: Target = Self::mod_65537(builder, hash_output); // enforce equality builder.connect(e, sig.e);