Skip to content

FIDO2 vs WebAuthn: Understanding the Differences

FIDO2 is the FIDO Alliance umbrella combining WebAuthn (W3C browser API) and CTAP2 (authenticator protocol). Learn the layering, registration and authentication ceremonies, RP ID binding, attestation, resident credentials, and how passkeys fit the spec.

A YubiKey 5A NFC security key inserted in a laptop with a finger on the touch button.
YubiKey 5A NFC · Credit: Yubico

FIDO2 is an open authentication standard that eliminates passwords by binding a public-key credential to a specific relying party, making credential theft and phishing structurally impossible regardless of network position.

Practitioners routinely conflate FIDO2 with WebAuthn, and the confusion has operational consequences. A developer who writes a navigator.credentials.create() call is implementing the browser half of FIDO2 authentication; the authenticator transport that finishes the loop is governed by a separate FIDO Alliance specification called CTAP2. Fast Identity Online 2 (FIDO2) is the umbrella that packages both, and the layering decides which library a backend team integrates, which hardware procurement supports, and which compliance ceiling the deployment can reach.

The architectural depth matters because the FIDO2 component split, the registration ceremony and authentication ceremony, the attestation statement formats, the RP ID binding primitive, and the discoverable credential model are the load-bearing parts of every phishing-resistant authentication rollout that has to satisfy NIST SP 800-63B AAL3 or the CISA phishing-resistant MFA baseline. Mass-market passwordless authentication is the consumer face of the same architecture.

The FIDO2 Component Model: WebAuthn and CTAP2

FIDO2 is the FIDO Alliance umbrella specification that packages two sub-specifications, and the layering is what every implementer has to internalize before writing a single line of integration code. The WebAuthn standard, published by the W3C, defines the JavaScript API that browsers expose to relying party websites. The CTAP2 protocol, published by the FIDO Alliance, defines how an external authenticator (a hardware security key) or an internal platform authenticator (a fingerprint sensor, Face ID, Windows Hello) communicates with the browser. Together, the WebAuthn standard plus the CTAP2 protocol equal FIDO2.

FIDO2 component model diagram with WebAuthn and CTAP2 authenticators
Credit:

A developer integrating FIDO2 authentication calls the WebAuthn API; the browser handles CTAP2 transport to the authenticator transparently. Practitioners therefore treat "I am using WebAuthn" and "I am using FIDO2" as interchangeable, and the equivalence breaks down the moment an enterprise has to specify authenticator policy, choose between roaming hardware keys and platform options, or document a credential attestation requirement against NIST guidance. The four terms anchor the rest of the discussion.

  • FIDO2. The FIDO Alliance umbrella specification combining the WebAuthn API and the CTAP2 transport protocol; not a single document but a project that references both.
  • WebAuthn. The W3C browser-side specification for the navigator.credentials API; defines PublicKeyCredentialCreationOptions, PublicKeyCredentialRequestOptions, the credential object, and the RP server verification algorithm.
  • CTAP2. The Client to Authenticator Protocol 2; defines the message format and transport bindings (USB HID, NFC, BLE) between an external authenticator and the browser platform.
  • Passkey. A FIDO2 resident credential stored on the platform authenticator and synced through the OS keychain (iCloud Keychain, Google Password Manager, Windows credential store).

The split has direct procurement implications: a backend team integrating a server library implements only the WebAuthn verification half, while the CTAP2 protocol layer lives inside the operating system and the authenticator firmware. For the cryptographic primitives that back the credential itself, the Difference Between Encryption And Tokenization hub explains the public-key cryptography on which the WebAuthn signature depends, and the MFA vs SSO comparison positions FIDO2 within the broader IAM stack as the phishing-resistant MFA implementation enterprises layer onto SSO.

What WebAuthn Defines

The WebAuthn standard, formally W3C Web Authentication Level 2, defines the navigator.credentials API surface and the RP server verification flow. It specifies the browser-facing data structures (PublicKeyCredentialCreationOptions for registration, PublicKeyCredentialRequestOptions for assertion), the AuthenticatorAttestationResponse and AuthenticatorAssertionResponse objects the browser returns, and the verification algorithm a server runs against an incoming credential. WebAuthn does not specify how the authenticator and the browser exchange the underlying message; that domain belongs to CTAP2.

What CTAP2 Defines

CTAP2 (Client to Authenticator Protocol 2) defines the wire-level message format and transport bindings between a roaming external authenticator and the browser platform. USB HID is the dominant transport for desktop hardware keys, NFC covers tap-to-authenticate phone flows, and BLE handles wireless pairing. When a platform authenticator is used, CTAP2 is implemented internally within the operating system rather than over a physical interface. The distinction matters for enterprise authenticator policy: choosing between a roaming model (YubiKey, Feitian, Token2 over USB or NFC) and a built-in model (Touch ID, Windows Hello, Android biometric) is functionally a choice between external CTAP2 transport and internal CTAP2 transport.

Registration and Authentication Ceremonies

FIDO2 defines two protocol exchanges that the FIDO Alliance documents call ceremonies: the registration ceremony that binds a new credential to a user account, and the authentication ceremony that proves possession of that credential at login. Both ceremonies route through the relying party server, both rely on public-key cryptography, and neither transmits a secret across the network. The sequence is what makes FIDO2 authentication phishing-resistant by construction rather than by policy.

  1. Server issues a challenge. The RP server generates a cryptographic challenge and a creation options object that names the RP ID derived from its origin domain.
  2. Browser invokes the authenticator. The browser calls navigator.credentials.create() with the challenge; the authenticator generates a new public-private key pair scoped to the RP ID.
  3. Authenticator returns public material. The private key never leaves the authenticator; the public key, the credential ID, and an attestation statement return to the server.
  4. Server stores the public key. The RP binds the public key to the user account in its database. The registration ceremony is complete.
  5. Authentication ceremony begins. The browser calls navigator.credentials.get() with a fresh challenge; the authenticator signs the challenge plus the RP ID with the stored private key.
  6. Server verifies the signature. The RP verifies the assertion against the stored public key and the expected RP ID. The login succeeds only when both match.

RP ID binding is the anti-phishing primitive that the entire architecture rests on. The RP ID is derived from the origin domain (for example, techshooked.com), and the authenticator will only sign a challenge that names that exact origin. A phishing site at techsh00ked.com cannot obtain a valid credential assertion because the authenticator refuses to sign for any origin it does not recognize. That property contrasts directly with the TOTP shared-secret model defined in IETF RFC 6238, where an adversary-in-the-middle proxy can relay the one-time code within its 30-second validity window. For the SaaS-deployment view of how this enforcement works across federated apps, see How To Secure SaaS Applications At Scale, and for the transport layer that carries the WebAuthn assertion to the server, see Role of TLS/SSL in Data Protection (publication pending).

Attestation Statement Formats

The attestation statement returned during the registration ceremony proves the authenticator model and manufacturer to the verifying server. WebAuthn defines four production formats. The "none" format omits attestation and is the default for passkeys synced through OS keychains, where vendor binding is intentionally hidden. The "packed" format is the FIDO Alliance reference format used by most certified hardware security keys. The "tpm" format covers Windows Hello credentials backed by a Trusted Platform Module. The "android-key" format covers Android built-in authenticators with hardware-backed Keystore attestation. Enterprise deployments that require certified hardware (for example, FIPS 140-2 validated keys) must configure the RP server to reject the "none" format and validate the attestation chain against the FIDO Metadata Service. NIST SP 800-63B mandates hardware-bound authenticators for AAL3, which in practice means a packed or tpm format and a rejection policy for unattested credentials.

FIDO2 vs WebAuthn vs CTAP2: Key Differences

FIDO2, WebAuthn, and CTAP2 occupy three different layers of the same authentication architecture, and the comparison reduces cleanly to the attributes that decide how each layer touches application code, transport, and compliance. The table below isolates the eight attributes that matter most when an engineering team has to write specifications against any one of the three.

AttributeFIDO2WebAuthnCTAP2
Defined byFIDO Alliance (umbrella)W3C (browser API)FIDO Alliance (transport)
LayerFull specification setBrowser JavaScript APIAuthenticator-to-platform transport
Specification documentFIDO2 Project (fido2-specs)W3C WebAuthn Level 2FIDO Client to Authenticator Protocol 2
Developer touchpointEcosystem umbrella, not called directlynavigator.credentials.create() and .get()Handled by OS or browser, invisible to application code
Transport mechanismsArchitectural, no transport of its ownHTTPS for server assertionUSB HID, NFC, BLE, internal platform
Passkey supportYes, resident credential modelYes, discoverable credential flowYes, CTAP2.1 resident key storage
Phishing resistanceYes via RP ID origin-bindingYes, RP ID in assertionYes, RP ID validated by authenticator
AttestationSpecified across formatsConsumed by RP serverProduced by authenticator (packed, tpm, android-key, none)

The interchangeability practitioners encounter falls out of the developer touchpoint row. A server-side WebAuthn library (webauthn4j for Java, py_webauthn for Python, duo-labs/webauthn for Go, @simplewebauthn/server for Node.js) implements WebAuthn server verification but does not implement CTAP2; the protocol lives in the browser, the operating system, and the authenticator. A passkey credential is a FIDO2 discoverable record whose credential ID is stored on the authenticator itself alongside the private key, enabling usernameless authentication flows. A non-resident counterpart generates the same key pair but returns the credential ID to the server for storage, so the authenticator carries no local record and the relying party must hand the credential ID back on every login.

The layering decision flows directly into Zero Trust architecture and regulated-data compliance. For how FIDO2 slots into continuous identity verification under a Zero Trust model, see How To Implement Zero Trust Network Architecture, and for how the AAL3 phishing-resistant authentication requirement maps to regulated-data policy, see MFA evidence mapped across frameworks.

Resident vs Non-Resident Credentials and Passkeys

FIDO2 distinguishes two credential storage models, and the choice between them dictates the user-experience floor and the compliance ceiling of any deployment. A resident credential (called a discoverable credential in CTAP2.1) stores the credential ID and a copy of the user handle on the authenticator itself, allowing usernameless login: the RP server sends no user identifier in the get() call, and the authenticator selects the matching record from its local store. A non-resident equivalent generates the same key pair but returns the credential ID to the server for storage, leaving the authenticator stateless between sessions.

Passkeys are discoverable records synced through an OS cloud keychain. Apple syncs them through iCloud Keychain, Google through Google Password Manager, Microsoft through the Windows credential store, and third-party password managers like 1Password and Dashlane have added cross-platform passkey credential sync. The sync trades hardware binding for account recovery convenience, which is precisely the property that disqualifies synced passkeys from NIST AAL3. Hardware passkeys stored on a YubiKey or equivalent never leave the device, so they retain the AAL3-eligible hardware-bound property at the cost of recovery friction. The three deployment archetypes follow from these tradeoffs.

  1. Roaming hardware key with discoverable credential. Non-synced, hardware-bound, AAL3-eligible. Suited to privileged administrative access, federal systems, critical infrastructure, and any environment where account recovery is handled through an out-of-band identity-proofing workflow.
  2. Platform passkey synced through OS keychain. Synced, broadly compatible across iOS, Android, macOS, Windows, and Chrome, AAL2. Suited to consumer accounts, mid-assurance enterprise applications, and any flow where the recovery story has to scale to millions of users.
  3. Non-resident hardware key. Legacy FIDO2 deployment that requires a username step before the assertion call. Still in production at RPs that pre-date the discoverable credential extension; new deployments should pick one of the two patterns above.

The passkey model is what bridges FIDO2 from enterprise hardware-token territory into mass-market passwordless authentication. For how passkeys compare to the dedicated tooling enterprises also deploy, see Best Password Managers For Business, and for how passkey-based login fits inside a federated SSO flow, see the MFA vs SSO comparison again at its identity-provider layer.

Implementing FIDO2: Server Libraries and Compliance Requirements

FIDO2 authentication on the server side reduces to integrating a WebAuthn verification library and configuring an authenticator policy that matches the deployment's compliance ceiling. The library implements the W3C verification algorithm; the policy decides which attestation formats are acceptable, whether discoverable credentials are required, and which user verification level is enforced. Four production-grade libraries cover most language stacks.

  • py_webauthn for Python, maintained by Duo Security, covers the full WebAuthn Level 2 RP verification algorithm.
  • webauthn4j for Java, the reference implementation cited by Keycloak and Spring Security integrations.
  • duo-labs/webauthn for Go, broadly deployed in cloud-native services and the basis for several commercial WebAuthn-as-a-service products.
  • @simplewebauthn/server for Node.js, paired with @simplewebauthn/browser on the client for full-stack integration.
  • FIDO Metadata Service for attestation chain validation; required when the verifier rejects "none" attestation and validates authenticator provenance.

Compliance mapping flows from the same library configuration. NIST SP 800-63B AAL2 accepts any FIDO2 deployment with a platform authenticator or a roaming hardware key. AAL3 requires a hardware-bound, verifier-impersonation-resistant credential, which restricts the deployment to roaming hardware keys or TPM-backed platform keys with packed or tpm attestation. The CISA Implementing Phishing-Resistant MFA fact sheet classifies FIDO2 and WebAuthn passkeys as the recommended phishing-resistant MFA baseline, preferred over TOTP and push notification, and CISA names FIDO2 as the canonical example of passwordless authentication for federal workloads. The OWASP Authentication Cheat Sheet recommends FIDO2 authentication as the strongest credential type available for web applications. FIDO2 does not replace an identity provider or a session-management layer; it replaces only the credential verification step inside the IdP flow, which is why enterprises layer it onto an existing SAML 2.0 or OIDC SSO deployment rather than substituting it for one. For how this enforcement integrates into a data privacy impact assessment, see Conducting A Data Privacy Impact Assessment, and for cloud-side enforcement against AWS-hosted workloads, see Best CSPM Tools for AWS (publication pending).

Further reading

Frequently Asked Questions

If I implement WebAuthn, am I implementing FIDO2?

Implementing the WebAuthn standard on both client and server means implementing the browser-side component of FIDO2, but not the complete FIDO2 specification. FIDO2 also includes the CTAP2 protocol, which governs how external hardware authenticators communicate with the browser. In practice, the browser and operating system handle CTAP2 transparently, so a WebAuthn integration automatically gains CTAP2 support for hardware keys without any additional code. The distinction matters when configuring enterprise authenticator policy: restricting to built-in authenticators only is a WebAuthn RP configuration choice, not a FIDO2 limitation.

Are FIDO2 passkeys backward compatible with FIDO U2F security keys?

FIDO2 authenticators that speak CTAP2 are not backward compatible with FIDO U2F (CTAP1) by default, but most hardware security key vendors ship devices that support both CTAP1 and CTAP2 on the same hardware. A FIDO U2F key registered on a site that only supports the older U2F JavaScript API cannot be upgraded to a FIDO2 passkey credential for that site without re-registration; the credential types are distinct. Enterprises migrating from U2F to FIDO2 should plan an explicit re-enrollment window, because existing U2F credentials cannot be converted in place.

Do passkeys make hardware security keys unnecessary?

Passkeys make hardware security keys unnecessary for most consumer and SMB use cases, but not for environments that require NIST SP 800-63B AAL3 assurance. Synced platform passkeys (iCloud Keychain, Google Password Manager) satisfy AAL2 but are not hardware-bound and cannot reach AAL3 because the private key leaves the device through cloud sync. Hardware security keys with CTAP2 discoverable credentials store the private key in a certified hardware element that never exports it, satisfying AAL3 requirements for federal systems, critical infrastructure, and high-assurance regulated environments. CISA recommends hardware security keys specifically for privileged administrator accounts.

Share this guide

Daniel Brandt

Daniel Brandt covers threats, malware and vulnerability disclosure for techshooked, written for the people who have to respond. A story names the affected products and versions, says whether an exploit is a proof of concept or active in the wild, links the vendor advisory and the patch, and puts the most urgent fix first, so a defender can act on it before reading to the end.