I was running tests on a fork of the smart wallet and getting errors for some tests.
I was following the same signing procedure as in this repo, and eventually found that the signature malleability check in WebAuthn-Sol was returning the error due to s being too large.
This test shows that for some hashes the values returned from vm.signP256 are causing the problem. I added a test testValidateSignatureWithPasskeySignerWithSCheck which passes when we take the compliment of s.
Is this something that should be handled by signP256? Maybe I have misunderstood what webAuthn.messageHash should be and that is causing the wrong signatures?
I was running tests on a fork of the smart wallet and getting errors for some tests.
I was following the same signing procedure as in this repo, and eventually found that the signature malleability check in WebAuthn-Sol was returning the error due to
s
being too large.This test shows that for some hashes the values returned from vm.signP256 are causing the problem. I added a test
testValidateSignatureWithPasskeySignerWithSCheck
which passes when we take the compliment ofs
.Is this something that should be handled by signP256? Maybe I have misunderstood what
webAuthn.messageHash
should be and that is causing the wrong signatures?