During the construction of a Point the coordinates must be reduced modulus the field prime to avoid computation problems like:
from fastecdsa.curve import secp256k1
from fastecdsa.point import Point
xs = 1
ys = 0x4218f20ae6c646b363db68605822fb14264ca8d2587fdd6fbc750d587e76a7ee
xt = secp256k1.p + 1
S = Point(xs, ys, curve=secp256k1)
T = Point(xt, ys, curve=secp256k1)
S+T
Which raise an exception:
ValueError: coordinates are not on curve <secp256k1>
x=fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2d
y=bde70df51939b94c9c24979fa7dd04ebd9b3572da7802290438af2a681895441
Because the equality test will not detect the two point are equal and a zero inversion will happen.
During the construction of a Point the coordinates must be reduced modulus the field prime to avoid computation problems like:
Which raise an exception:
Because the equality test will not detect the two point are equal and a zero inversion will happen.