Skip to content

Add WebAuthn library and SignerWebAuthn #117

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

Open
wants to merge 54 commits into
base: master
Choose a base branch
from
Open

Conversation

ernestognw
Copy link
Member

@ernestognw ernestognw commented Apr 23, 2025

Implements WebAuthn authentication verification for smart contracts using P256 signatures as an alternative to traditional secp256k1 ECDSA. This library enables strong authentication through WebAuthn Level 2 standard compliance.

Includes 3 verification levels:

  • verifyMinimal: Essential cryptographic checks
  • verify: Standard verification with user presence
  • verifyStrict: Enhanced security with user verification and backup state checks

@ernestognw ernestognw marked this pull request as ready for review April 23, 2025 06:07
@ernestognw ernestognw requested a review from a team as a code owner April 23, 2025 06:07
@ernestognw ernestognw changed the title Add WebAuthn Add WebAuthn library Apr 23, 2025
@ernestognw ernestognw marked this pull request as draft May 4, 2025 19:49
@ernestognw ernestognw marked this pull request as ready for review May 7, 2025 02:38
@ernestognw ernestognw requested review from arr00 and gonzaotc May 9, 2025 06:20
@ernestognw ernestognw changed the title Add WebAuthn library Add WebAuthn library and SignerWebAuthn May 9, 2025
ernestognw and others added 22 commits June 4, 2025 13:55
Co-authored-by: Gonzalo Othacehe <[email protected]>
Co-authored-by: Gonzalo Othacehe <[email protected]>
Comment on lines +217 to +219
function validateBackupEligibilityAndState(bytes1 flags) internal pure returns (bool) {
return (flags & AUTH_DATA_FLAGS_BE) != 0 || (flags & AUTH_DATA_FLAGS_BS) == 0;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would prefer consistency on how we are checking the value of a bit

flags & AUTH_DATA_FLAGS_BE) != 0 or flags & AUTH_DATA_FLAGS_BE) == AUTH_DATA_FLAGS_BE

Otherwise looks good

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering, is there a WebAuthn library/package we would be using ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 this pull request may close these issues.

5 participants