Skip to content

Commit

Permalink
🐛 point unicity in validity check
Browse files Browse the repository at this point in the history
co-authored-by: katzman <steve.katzman@coinbase.com>
  • Loading branch information
qd-qd and stevieraykatz committed Apr 4, 2024
1 parent 09d9b1c commit 204eec8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ECDSA256r1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 204eec8

Please sign in to comment.