FIDO2 authentication uses public key cryptography to generate a unique cryptographic key pair, called a “passkey,” associated with a user’s account. The key pair consists of a public key that stays with the service provider and a private key that resides on the user’s device.
When the user logs in to their account, the service provider sends a challenge—typically a random string of characters—to the user’s device. The device prompts the user to authenticate themselves by entering a PIN or by using biometric authentication.
If the user successfully authenticates, the device uses the private key to sign the challenge and send it back to the service provider. The service provider uses the public key to verify that the right private key was used and grants the user access to their account.
A passkey stored on one device can be used to log in to a service on another device. For example, if a user sets up a passkey for their email account on their mobile device, they can still log in to their email account on a laptop. The user would complete the authentication challenge on the registered mobile device.
FIDO2 also supports the use of security keys, such as a YubiKey or Google Titan, as an authentication method.
Security keys, also called “hardware tokens,” are small physical devices that transmit authentication information directly to a service. They can connect through Bluetooth, near-field communication (NFC) protocols, or a USB port. Users can use a FIDO2 security key instead of biometric data or a PIN to authenticate themselves and sign a challenge.
Because the private key is stored on—and never leaves—the user’s device, the possibility of a security breach is minimized. Hackers cannot steal it by breaking into a database or intercepting communications. The public key that resides with the service provider contains no sensitive information and is of little use to hackers.