From 0c9aed3901c5d865343b71fd51ce5a3319d5f793 Mon Sep 17 00:00:00 2001 From: imduchuyyy Date: Tue, 25 Jun 2024 17:56:33 +0700 Subject: [PATCH] Update s if s > n/2 --- src/WebAuthn.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WebAuthn.sol b/src/WebAuthn.sol index 0df8506..dc0098d 100644 --- a/src/WebAuthn.sol +++ b/src/WebAuthn.sol @@ -109,7 +109,7 @@ library WebAuthn { { if (webAuthnAuth.s > _P256_N_DIV_2) { // guard against signature malleability - return false; + webAuthnAuth.s = FCL_Elliptic_ZZ.n - webAuthnAuth.s; } // 11. Verify that the value of C.type is the string webauthn.get.