Expand description
Authenticator data parsing.
The authenticator data (authData) is a binary structure defined in
WebAuthn §6.1.
It is produced by the authenticator hardware and carries the RP ID binding,
user-presence/verification flags, a sign counter, and (during registration)
the new credential’s public key encoded as a COSE_Key.
§Binary layout
Offset Len Field
────── ─── ─────────────────────────────────────────────────
0 32 rpIdHash — SHA-256 of the RP ID
32 1 flags — bitmask (UP / UV / AT / ED)
33 4 signCount — big-endian u32
37 * attestedCredentialData (present iff AT flag is set)
16 aaguid
2 credentialIdLength (big-endian u16)
* credentialId
* credentialPublicKey (CBOR-encoded COSE_Key)
* * extensions (CBOR map, present iff ED flag is set)Structs§
- Attested
Credential Data - Credential data embedded in the authenticator data during registration.
- Authenticator
Data - Fully parsed authenticator data.
- Authenticator
Flags - Decoded flags byte from authenticator data.
Enums§
- CoseKey
- A decoded COSE_Key from the credential’s authenticator data.
Functions§
- parse_
authenticator_ data - Parse the raw authenticator data bytes into an
AuthenticatorData. - parse_
cose_ key - Decode a CBOR-encoded COSE_Key and return it as a
CoseKey.