Skip to content
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

Change WebAuthn Signer Structure #311

Closed
nlordell opened this issue Mar 7, 2024 · 2 comments
Closed

Change WebAuthn Signer Structure #311

nlordell opened this issue Mar 7, 2024 · 2 comments

Comments

@nlordell
Copy link
Collaborator

nlordell commented Mar 7, 2024

Currently, we have a call structure where WebAuthnSigner calls WebAuthnVerifier which calls a P256Verifier implementation. Overall, the call structure is nice because:

  • It avoid deploying large amounts of code in WebAuthnSigner related to computing the WebAuthn signing message at the cost of an extra call. In theory, it would take many signatures before the additional signing gas overhead outweighs the deployment costs (TBD)
  • It allows multiple P256Verifier implementations to be deployed and used.

However, there are some drawbacks to exactly how it is implemented. Namely, we require a single WebAuthnVerifier deployment for each P256Verifier that is deployed, but without much benefit (namely, we do an external call anyway - so this can be parameterized in the signature verification and does not need to be an immutable). Additionally, this does not need to be a separate contract to the WebAuthnFactory; in fact the WebAuthnSigners can call the WebAuthnFactory contract in order to perform the signature verification, so all the WebAuthn logic lives in one place.

This issue proposes:

  1. Changing WebAuthnVerifier to receive the P256 verifier to use instead of using an immutable
  2. Combining the WebAuthnVerifier and WebAuthnSignerFactory into WebAuthn contract for general WebAuthn signature verification using the P-256 curve (names TBD, as we would also want to support EdDSA for example).
@nlordell
Copy link
Collaborator Author

Implemented in #320

@rmeissner
Copy link
Member

Can this be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants