Skip to content

Commit

Permalink
GH-19 Use affine non-montgomery form of public key for proof of posse…
Browse files Browse the repository at this point in the history
…ssion
  • Loading branch information
heifner committed Dec 5, 2023
1 parent 3391cbb commit e749e4e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/signatures.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ bool aggregate_verify(
g2 pop_prove(const array<uint64_t, 4>& sk)
{
g1 pk = public_key(sk);
array<uint8_t, 96> msg = pk.toAffineBytesLE(true);
array<uint8_t, 96> msg = pk.toAffineBytesLE(false);
g2 hashed_key = fromMessage(vector<uint8_t>(msg.begin(), msg.end()), POP_CIPHERSUITE_ID);
return hashed_key.scale(sk);
}
Expand All @@ -640,7 +640,7 @@ bool pop_verify(
const g2& signature_proof
)
{
array<uint8_t, 96> msg = pubkey.toAffineBytesLE(true);
array<uint8_t, 96> msg = pubkey.toAffineBytesLE(false);
const g2 hashedPoint = fromMessage(vector<uint8_t>(msg.begin(), msg.end()), POP_CIPHERSUITE_ID);

if(!pubkey.isOnCurve() || !pubkey.inCorrectSubgroup())
Expand Down

0 comments on commit e749e4e

Please sign in to comment.