arnaucube
arnaucube/schnorrPublic Self-hosted repository
constrain_sig() implemented, still have to test
Brian Lawrence tideofwords@gmail.com
Mon, 30 Sep 2024 11:44:28 -0700
commit

910bebeeaf7a8cfbf42c8ff2cd79700aa0c827ce

parent

573f5bea2fa79f1e42d2f8f004426c22366cb495

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);