Apologies for not catching this in review before @Karce. When looking at the logic between Python and Go, it made sense and looked similar. However, the bugs weren't apparent at the time until I tried to make some demo code. So, again, apologies for not catching this earlier. :(
What this does:
GetNewPoint
to return a null ECPoint if anil
point is passed.GetNewModBN
return aModBigNum
with anil
BIGNUM
.ModBigNum.Neg
.What this needs:
[0] -- The reason for this can be demonstrated in the following example. Let's imagine that we need to generate a pubkey.
With the way the API is before this PR, it was as follows (somewhat pseudocode):
This can be fixed by doing
pubkey := G.Copy()
, but I don't think this is preferable.This PR allows for the following (same scenario):
Apologies for not catching this in review before @Karce. When looking at the logic between Python and Go, it made sense and looked similar. However, the bugs weren't apparent at the time until I tried to make some demo code. So, again, apologies for not catching this earlier. :(