From 90e81e7deb871fe1588cd83e4d2773a39e3017f3 Mon Sep 17 00:00:00 2001 From: Advaita Saha Date: Thu, 21 Sep 2023 20:51:47 +0530 Subject: [PATCH] fix: negetion of x in serialization --- constantine/serialization/codecs_banderwagon.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/constantine/serialization/codecs_banderwagon.nim b/constantine/serialization/codecs_banderwagon.nim index 998bd3ca..3a2309b1 100644 --- a/constantine/serialization/codecs_banderwagon.nim +++ b/constantine/serialization/codecs_banderwagon.nim @@ -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)