elliptic
elliptic copied to clipboard
How does point comparison work for the identity / point at infinity?
Point equality is implemented as: https://github.com/indutny/elliptic/blob/43ac7f230069bd1575e1e4a58394a512303ba803/lib/elliptic/curve/mont.js#L163-L165
The identity (aka point at infinity) is any point that has 0 in its z-coordinate: https://github.com/indutny/elliptic/blob/43ac7f230069bd1575e1e4a58394a512303ba803/lib/elliptic/curve/mont.js#L77-L80
How would point comparison give the correct result when comparing against the point at infinity?