Skip to content

Commit

Permalink
T
Browse files Browse the repository at this point in the history
  • Loading branch information
Vectorized committed Feb 24, 2025
1 parent 3169ed9 commit bcb5a1b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/P256.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ contract P256Test is P256VerifierEtcher {
}

function testP256Normalized(uint256 privateKey, bytes32 hash) public {
while (privateKey == 0 || privateKey > P256.N) {
while (privateKey == 0 || privateKey >= P256.N) {
privateKey = uint256(keccak256(abi.encode(privateKey)));
}
(uint256 x, uint256 y) = vm.publicKeyP256(privateKey);
Expand All @@ -272,6 +272,7 @@ contract P256Test is P256VerifierEtcher {
} else {
assertTrue(P256.verifySignature(hash, r, s, bytes32(x), bytes32(y)));
}
assertTrue(P256.verifySignatureAllowMalleability(hash, r, s, bytes32(x), bytes32(y)));
}
}

Expand Down

0 comments on commit bcb5a1b

Please sign in to comment.