Skip to content

Commit

Permalink
Merge pull request #20 from AntelopeIO/GH-19-pop
Browse files Browse the repository at this point in the history
Use affine non-montgomery form of public key for proof of possession
  • Loading branch information
heifner authored Dec 5, 2023
2 parents 3391cbb + e749e4e commit b179f9b
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 b179f9b

Please sign in to comment.