Skip to content

Mod sign WebauthN

ModSignWebAuthnAccountDAppUserModSignWebAuthnAccountDAppUserInitiate credential registrationregister_credential_requestSelect appropriate sign moduleregister_credential_requestProvide registration dataReturn registration challengeDisplay challenge for biometric registrationSubmit signed registration dataregister_credential_response(signed_data)Verify signed dataregister_credential(signed_data)Store credential in user-specific storageConfirm registrationDisplay registration success

ModSignWebAuthnValidationModuleAccountDAppUserModSignWebAuthnValidationModuleAccountDAppUserRequest token transferexecute_user(token_transfer_operation)Select validation module based on scopeis_valid_operation(token_transfer_operation)is_valid_signature(signature)Select sign moduleis_valid_signature(WebAuthn_signature)Retrieve user credentialsVerify WebAuthn signature with public keyReturn (valid/invalid)Return (valid/invalid)Execute token transfer operationReturn transaction status

ModSignWebauthn is a module within the Veive protocol that introduces the WebAuthn standard for signing transactions. WebAuthn, part of the FIDO2 project, enables strong authentication using public key cryptography. This module allows users to register their devices and authenticate using passkeys, enhancing security and usability.

WebAuthn is a web standard for secure authentication, using devices like security keys, smartphones, or built-in platform authenticators (like Windows Hello or Touch ID). Passkeys are the credentials generated during the registration process, comprising a public-private key pair. The public key is stored on the server (or, in this case, on the blockchain), while the private key remains securely on the user’s device.

  • Credential ID: A unique identifier for each registered credential, used to retrieve the public key associated with a user.
  • Public Key: The public portion of the key pair, used by the server to verify signatures created by the private key.
  • Authenticator Data: Information provided by the authenticator, including the signature.
  1. Registration:
    • Users register their devices, generating a public-private key pair. The register method stores the public key and the credential ID on the blockchain, linking them to the user’s account.
  2. Signature Validation:
    • When a transaction is signed using WebAuthn, the is_valid_signature method is called to validate the signature. This method checks if the signature is valid by:
      • Decoding the transaction’s signature data to extract the credential_id, authenticator_data, and client_data.
      • Retrieving the stored public key using the credential_id.
      • Verifying the signature against the extracted message using the public key.