Ambimat GroupAmbimatAmbiSecureSIMAuthAmbiAutomationEngineering BlogAhmedabad · India · Est. 1982

WebAuthn and FIDO2 encode public keys and signature algorithms using COSE (CBOR Object Signing and Encryption, RFC 9052). Each algorithm has a signed integer identifier registered in the IANA COSE Algorithms registry — for example -7 is ES256 (ECDSA P-256 with SHA-256), -257 is RS256 (RSASSA-PKCS1-v1_5 with SHA-256), and -8 is EdDSA. This reference lists the algorithm identifiers a relying party is likely to encounter in an attestation or assertion.

WebAuthn / FIDO2

WebAuthn COSE Algorithms

Reference for the COSE algorithm identifiers used by WebAuthn and FIDO2. ES256 (-7) is the default; EdDSA (-8) and the RS / PS family cover the rest. From RFC 8152 / IANA COSE Algorithms registry.

What this reference covers

Spec

RFC 8152 / IANA COSE Algorithms registry.

Usage notes

During registration a relying party advertises the algorithms it accepts as a list of these identifiers (pubKeyCredParams), most-preferred first; the authenticator picks one and returns the credential public key as a COSE_Key map inside the attestation object. At authentication time you verify the assertion signature with that stored key and algorithm.

  • ES256 (-7) is the near-universal default; include RS256 (-257) for older platform authenticators and TPMs.
  • The COSE_Key map carries the key type (kty), curve (crv), and coordinates — decode it rather than assuming a format.
  • Inspect a real credential with the COSE key decoder and the authenticatorData parser.

Frequently asked questions

What is a COSE algorithm identifier?

A signed integer naming a cryptographic algorithm in CBOR structures, drawn from the IANA COSE registry. WebAuthn uses these instead of the OIDs X.509 would use.

Which algorithms should a relying party accept?

ES256 (-7) at minimum, since practically every authenticator supports it. RS256 (-257) covers older TPM-backed platform credentials, and EdDSA (-8) appears on some hardware keys.

Why are the identifiers negative?

The COSE registry assigns negative values to algorithms and reserves positive space for other uses. It is a registry convention, not a property of the algorithm.

What happens if I request an algorithm the authenticator lacks?

It picks the first entry from your pubKeyCredParams list that it supports. If none match, credential creation fails, which is why the list should be ordered by preference and not be over-restrictive.

Where does the algorithm appear in a credential?

In the COSE_Key inside attested credential data, under the alg label — and it must be checked against your accepted set at registration.