The authenticatorData byte layout and flag bits
In one line: Offsets for the 37-byte header, AAGUID, credential ID, COSE key and extensions, with a worked hex example and the meaning of every flag.
authenticatorData is the heart of a WebAuthn response. It appears in both registration and authentication, and its length alone tells you most of what it contains. The minimum is 37 bytes.
The fixed 37-byte header
| Offset | Length | Field | Meaning |
|---|---|---|---|
| 0 | 32 | rpIdHash | SHA-256 of the RP ID; the basis of site binding |
| 32 | 1 | flags | UP, UV, BE, BS, AT, ED bits |
| 33 | 4 | signCount | Big-endian unsigned 32-bit |
| 37 | variable | attestedCredentialData | Only when AT=1 |
| … | variable | extensions | Only when ED=1, a CBOR map |
The flag byte
| Bit | Name | Meaning |
|---|---|---|
| 0x01 | UP | The user really acted (a touch, for example) |
| 0x02 | RFU1 | Reserved; 1 is a specification violation |
| 0x04 | UV | The user proved who they are (PIN, biometrics) |
| 0x08 | BE | The credential may be backed up to another device |
| 0x10 | BS | It actually has been backed up; cannot be 1 when BE=0 |
| 0x20 | RFU2 | Reserved |
| 0x40 | AT | Attested credential data follows |
| 0x80 | ED | Extension data follows |
When AT is set
offset 37 16 bytes AAGUID authenticator model identifier (UUID) offset 53 2 bytes credIdLen big-endian offset 55 N bytes credId credential ID offset 55+N variable COSE key CBOR map
An all-zero AAGUID means the authenticator does not disclose its model, which is common on platform authenticators. A non-zero value maps to a model identifier in the FIDO Metadata Service.
Reading a real example
0000 3a 6e b0 2f 8b a0 14 0d 9f 8e 0c 3d 3e 71 2f 6d rpIdHash (example.com)
0010 c2 9c 1b 7f 91 76 65 4d ... (continues)
0020 5d 00 00 00 00 flags=0x5D counter=0
0025 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 AAGUID = 00000000-…
0035 00 20 credIdLen = 32
0037 00 01 02 … (32 bytes) credId
0057 a5 01 02 03 26 20 01 21 58 20 … COSE: {1:2, 3:-7, -1:1, -2:…}
Reading signCount
The authenticator increments it on each signature. Servers compare the new value with the stored one to detect cloned authenticators. Synced passkeys often keep it at 0, so skipping or downgrading the check when BE=1 is a common implementation choice.
Checking the parse in practice
A quick sanity check is that the bytes you consumed must equal the length of the buffer. After reading the three fixed fields, add 18 bytes when AT is set plus credIdLen, then parse the COSE map and note where it ends. If the ED bit is set, one CBOR map should remain. A leftover byte usually means a wrong credIdLen or a truncated credential ID, and both are common when a payload was copied from a log that mangled it.
Extensions (ED)
When the ED bit is set a CBOR map follows with authenticator extension output such as credProtect, hmac-secret or largeBlobKey. If you do not parse its length with a CBOR decoder, the boundary of the structure is lost.
Common mistakes
- Reading an AAGUID from an authentication response where AT=0 — there is no credential data there.
- Treating signCount as little-endian; it is big-endian.
- Calling UV=0 a failure — policy may not require UV. Synced passkeys with BE=1 usually do report UV=1.
Decoding happens right in the browser. The payload you paste is not stored.
Open the PasskeyLab decoderFrequently asked questions
Why is 37 bytes the minimum length?
32 bytes of rpIdHash, one flag byte and four bytes of signCount add up to 37. When AT or ED is set, variable-length data follows.
Is an all-zero AAGUID a problem?
No. It only means the authenticator does not disclose its model. It is common on platform authenticators and says nothing about the validity of the credential.
What if AT=1 but the COSE key will not parse?
Either credIdLen was read wrongly or the offset slipped before the COSE map. The map starts at 37 + 16 + 2 + credIdLen.
Sources
Read next
- The WebAuthn registration and authentication ceremoniesWhat the browser, server and authenticator each build and verify during create and get, field by field, and where implementations usually go wrong.
- Reading CBOR and COSE public keys: ES256, RS256, Ed25519How the attestationObject CBOR map and the COSE key map (kty, alg, crv, x, y, n, e) are laid out, with byte-level examples and reconstruction steps.
- RP ID and origin validation: why passkeys bind to the wrong siteHow rpIdHash is computed, the protocol, host and port rules for origins, and the subdomain and localhost exceptions, with real mismatch cases.