-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Multiple EC Verifier Implementations #285
Comments
nlordell
added a commit
that referenced
this issue
Mar 7, 2024
Partially addresses #285 This PR adds new tests that verify multiple P-256 verifiers are supported by our code. The `webauthn` shim code now moved to the `passkey` package and is imported by the `4337` package, as this made more sense to me. @mmv08 moved E2E tests for Passkey+4337 to the `passkey` project, so once they both merge, the dependency can be removed. Note that for now, we use a `TestWebAuthnSignerFactor` contract just for implementing the tests, but it should be switched to using the canonical signing factory from #306 once merged. The additional verifier that is being used is the one from [Daimo-eth](https://github.com/daimo-eth/p256-verifier). The artifact was vendored into the project, as it is a Foundry project, and this is the easiest way to include the dependency without building it (giving us identical bytecode to what is deployed on-chain). Adding a test for using the precompile will be done in a separate PR. --- Note that this PR contains some unrelated changes to the deployment and E2E setup. This was a result of rebasing onto changes introduced in #306 to get things working as well as some nits leftover from the aforementioned PR.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The WebAuthn signer implementation should support multiple elliptic curve (EC) verifier implementations. Ideally, we would be able to test against the EIP-7212 precompile, but that is currently not available in Harhat. Instead, we can use both the Daimo.eth and an FCL-based verifier to check that signature validation functions in the same way for both verifier implementations.
The expected outcome is the required code and tests ensuring that the EC verfier implementation can be changed. Since this is already the design introduced in #223, most of the work will be around testing.
For bonus points, it would be nice to also include a test using the EIP-7212 P-256 precompile as a verifier, if we can find a way to run a chain that supports this precompile in CI.
The text was updated successfully, but these errors were encountered: