Skip to content

Commit

Permalink
Merge pull request #65 from stevieraykatz/fix-multiple-public-keys
Browse files Browse the repository at this point in the history
Fix incorrect check that point is not identity element
  • Loading branch information
rdubois-crypto authored Apr 4, 2024
2 parents ec7122f + 452f107 commit 4b52404
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion solidity/src/FCL_elliptic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ function SqrtMod(uint256 self) internal view returns (uint256 result){
* @dev Check if a point in affine coordinates is on the curve (reject Neutral that is indeed on the curve).
*/
function ecAff_isOnCurve(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;
}
unchecked {
Expand Down

0 comments on commit 4b52404

Please sign in to comment.