constrain_sig() implemented, still have to test

This commit is contained in:
Brian Lawrence
2024-09-30 11:44:28 -07:00
parent 573f5bea2f
commit 910bebeeaf

View File

@@ -182,10 +182,12 @@ impl SchnorrBuilder {
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);
}