Crate passkey_types

source ·
Expand description

Passkey Types

github version documentation

This crate contains the types defined in both the WebAuthn Level 3 and CTAP 2.0 specifications for the operations they define. They are each separated in their own modules.

Webauthn

In this module the type names mirror exactly those in the specifications for ease of navigation. They are defined in a way that allows interoperability with the web types directly as well as the JSON encoding for over network communication.

CTAP 2

In this module, since the method inputs are not given explicit names, the Request and Response types are defined in separate modules for each operation. These types make use of the same data structures from the webauthn module. In some cases though, the types have different constraits regarding required and optional fields, in which case it is re-defined in the ctap2 module along with a TryFrom implementation in either direction.

Modules

  • Collection of common cryptography primitives used in serialization of types.
  • The types defined here are a representation of types defined in the CTAP 2.0 specification along with authenticator specific types from the WebAuthn Level 3 specification.
  • Utilitie functions for encoding datatypes in a consistent way accross the passkey libraries with a mind on global webauthn ecosystem support.
  • Random number generator utilities used for tests
  • U2F Authenticator API
  • Implementation of the types defined in WebAuthn Level 3

Structs

  • A newtype around Vec<u8> which serializes using the transport format’s byte representation.
  • The string given for decoding is not base64url nor base64 encoded data.
  • The private WebAuthn credential containing all relevant required and optional information for an authentication ceremony.