|
|
|
|
|
by deathanatos
8 days ago
|
|
From the linked spec, > The authenticator data is a CBOR structure defined in the WebAuthn Level 3 specification, is returned by the getAuthenticatorData() method of the AuthenticatorAttestationResponse From TFA, > The payload is the authenticator data, a CTAP2 CBOR encoding of most of the credential record fields that is already specified by WebAuthn Both link to the same section of the WebAuthn spec, §6.1 Authenticator Data[1]. Unless I'm missing something, that section is describing a custom binary format, not a CBOR encoding of data. (Though n.b. that one of the items contained by the outer custom binary format is CBOR, but the 37(ish) byte array itself is not CBOR.) (…and it's stuff like that that just makes all of WebAuthn so impenetrable.) [1]: https://www.w3.org/TR/webauthn-3/#sctn-authenticator-data |
|
So the U2F bits like authenticator data are in a bespoke format using section lengths, while the newer features and extensions are CBOR.
One could translate the bespoke bits to CBOR, but care would be needed if you want to round-trip back to the bespoke format (e.g. so that attestations could be verified in the future off of the registration record.) Since CBOR isn't really as usable as say JSON as being an abstract object access API, and since CBOR is going to take up more space, I don't think this would really provide value over leaving it in the WebAuthn format for tooling to work on directly.