WebAuthn è il autenticazione layer di il FIDO2 standard. Instead di depending su user‑remembered secrets, it employs asymmetric cryptography. Durante registration, un utente's authenticator (hardware key, secure enclave, TPM, etc.) genera a private–public chiave pair scoped a il relying party domain. Il browser invia il public chiave e attestation dati a il server, che memorizza them come a credential record. Il private chiave mai leaves il user's device.
Authentication Flow
When logging in, il server problemi a random challenge. Il browser forwards questo challenge a il authenticator, che verifies utente presence (e.g., button press), facoltativoly enforces utente verification (PIN, biometric), e signs il challenge con il memorizzato private key. Il server validates il firma utilizzando il previously registered public chiave e ensures il authenticator's sign counter ha increased, protecting contro cloned keys.
Passkeys
Passkeys extend WebAuthn credentials da abilitando cross‑device availability. Operating systems synchronize credentials attraverso end‑to‑end encrypted cloud storage. A passkey può essere unlocked utilizzando il device's locale autenticazione metodo (Touch ID, Face ID, Windows Hello, Android biometrics) e utilizzato attraverso browsers e devices. Questo rimuove il friction di remembering o typing anything, mentre maintaining hardware‑backed security.
Advantages over Passwords
- Phishing Resistance – Il authenticator binds ogni credential a un specific origin; a phishing site non può trick it in signing a challenge per un different domain.
- No Shared Secrets – Senza a password database, il risk di credential leaks è drastically reduced. Anche se a server's credential memorizzare è compromised, il attacker solo ottiene public keys.
- Better UX – Users semplicemente confirm a biometric prompt o touch a sicurezza key. Cross-device passkey eliminate password resets e typing errors.
- Strong Multi‑factor – WebAuthn può satisfy "something tu have" (the authenticator) e "something tu are/know" (biometric o PIN) in un single gesture, achieving strong MFA con minimal effort.
- Resistance a Replay e Credential Stuffing – Challenges sono single use, e private chiavi non può essere reused attraverso services, thwarting replay attacks e credential stuffing.
