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

Implement WebauthnSigletonSigner PoC #228

Closed
nlordell opened this issue Jan 25, 2024 · 0 comments · Fixed by #254
Closed

Implement WebauthnSigletonSigner PoC #228

nlordell opened this issue Jan 25, 2024 · 0 comments · Fixed by #254
Assignees

Comments

@nlordell
Copy link
Collaborator

nlordell commented Jan 25, 2024

WebAuthn signature verification with the 4337 module is only implemented using the launchpad strategy, however the singleton signer strategy introduced in #159. could also be applied for WebAuthn signers. For some applications, the simplicity (and gas efficiency - no additional contract deployment!) of a singleton signer might outweigh the downsides (a singleton signer can only represent one signer for a Safe, so multiple deployments may be needed).

The expected outcome of this issue would be to create a WebAuthnSingletonSigner based on the TestSingletonSigner introduced in the aforementioned PR that works for verifying passkey signatures along with a test to verify its functionality. Optionally gas consumption for the new singleton signer scheme should be recorded so it can be easily compared with the "launchpad strategy" that we use for the current WebAuthn PoC integration.

Recommended Reading

@nlordell nlordell self-assigned this Feb 5, 2024
nlordell added a commit that referenced this issue Feb 8, 2024
This PR slightly refactors the WebAuthn signature validation logic in
preparation for sharing code when implementing #228.

Essentially, it creates a `SignatureValidator` abstract base class for
sharing that supports both legacy and current EIP-1271 functions. As a
consequence of the refactoring, `ISafeSingletonSigner` now uses
`bytes32` messages for signature validation instead of `bytes memory`,
in order to be more of an analogy to the current EIP-1271 standard
(instead of the legacy one).

---------

Co-authored-by: Mikhail <[email protected]>
nlordell added a commit that referenced this issue Feb 9, 2024
Fixes #228 

This PR implements a WebAuthn Singleton Signer and verifies it works
with the 4337 reference bundler.

In particular, this uses the same strategy introduced by #159, but
specific to Passkey + WebAuthn. Note that, unlike the Safe launchpad +
WebAuthn signer factory strategy, this requires a **staked factory**.
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

Successfully merging a pull request may close this issue.

1 participant