diff --git a/src/ECDSA256r1.sol b/src/ECDSA256r1.sol index 1f051d7..62e9f1c 100644 --- a/src/ECDSA256r1.sol +++ b/src/ECDSA256r1.sol @@ -19,7 +19,7 @@ library ECDSA256r1 { /// @param y The y-coordinate of the point /// @return bool True if the point is on the curve, false otherwise function isPointValid(uint256 x, uint256 y) internal pure returns (bool) { - if (((0 == x) && (0 == y)) || x == p || y == p) { + if ((0 == x % p) && (0 == y % p)) { return false; }