From bcb5a1b61eea71c56bb6848433d80b722017cb0c Mon Sep 17 00:00:00 2001 From: Vectorized Date: Mon, 24 Feb 2025 14:33:46 +0000 Subject: [PATCH] T --- test/P256.t.sol | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/P256.t.sol b/test/P256.t.sol index f3805c7d9..b62d93113 100644 --- a/test/P256.t.sol +++ b/test/P256.t.sol @@ -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); @@ -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))); } }