Skip to content

Commit

Permalink
fix: negetion of x in serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
advaita-saha committed Sep 21, 2023
1 parent e659776 commit 90e81e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion constantine/serialization/codecs_banderwagon.nim
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func serialize*(dst: var array[32, byte], P: EC_Prj): CttCodecEccStatus =

let lexicographicallyLargest = aff.y.toBig() >= Fp[Banderwagon].getPrimeMinus1div2()

if lexicographicallyLargest.bool():
if not lexicographicallyLargest.bool():
aff.x.neg()

dst.marshal(aff.x, bigEndian)
Expand Down

0 comments on commit 90e81e7

Please sign in to comment.