From 204eec86ef5856ca52a389c9b170cbb8922e02d9 Mon Sep 17 00:00:00 2001 From: qd-qd Date: Thu, 4 Apr 2024 11:09:30 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20point=20unicity=20in=20validity?= =?UTF-8?q?=20check?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit co-authored-by: katzman --- src/ECDSA256r1.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }