Skip to content

Commit

Permalink
Schnorr test fix (#1920)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rumata888 authored Dec 6, 2022
1 parent ce09454 commit ee9a3c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/aztec/crypto/schnorr/schnorr.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ TEST(schnorr, hmac_signature_consistency)
ASSERT_NE(account_a.private_key, account_b.private_key);
ASSERT_NE(account_a.public_key, account_b.public_key);

// same message signed twice should produce identical sigs due to identical k
// k is no longer identical, so signatures should be different.
auto signature_a =
construct_signature<KeccakHasher, grumpkin::fq, grumpkin::fr, grumpkin::g1>(message_a, account_a);
auto signature_b =
construct_signature<KeccakHasher, grumpkin::fq, grumpkin::fr, grumpkin::g1>(message_a, account_a);

ASSERT_EQ(signature_a.e, signature_b.e);
ASSERT_EQ(signature_a.s, signature_b.s);
ASSERT_NE(signature_a.e, signature_b.e);
ASSERT_NE(signature_a.s, signature_b.s);

// same message, different accounts should give different sigs!
auto signature_c =
Expand Down

0 comments on commit ee9a3c2

Please sign in to comment.