mirror of
https://github.com/arnaucube/schnorr.git
synced 2026-01-12 17:01:29 +01:00
constrain_sig() implemented, still have to test
This commit is contained in:
@@ -182,10 +182,12 @@ impl SchnorrBuilder {
|
|||||||
let hash_input: Vec<Target> = std::iter::once(r)
|
let hash_input: Vec<Target> = std::iter::once(r)
|
||||||
.chain(msg.msg.iter().cloned())
|
.chain(msg.msg.iter().cloned())
|
||||||
.collect();
|
.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,
|
hash_input,
|
||||||
).elements[0]; // whoops have to take mod group order;
|
).elements[0]; // whoops have to take mod group order;
|
||||||
|
|
||||||
|
let e: Target = Self::mod_65537(builder, hash_output);
|
||||||
|
|
||||||
// enforce equality
|
// enforce equality
|
||||||
builder.connect(e, sig.e);
|
builder.connect(e, sig.e);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user