Notes
The core idea
Here is the core idea. When you register, your device creates a new key pair just for that site. The private key stays on the device, protected by a secure chip. Only the public key goes to the server. This flips the password problem: the server now stores something that is useless to an attacker. When a passkey site is breached, what leaks is a list of public keys, which cannot be used to log in and cannot be cracked. There is no shared secret to steal, phish or reuse.
- at registration, your device creates a key pair for that site
- private key stays on the device (secure chip)
- public key goes to the server
- the server stores something that is useless to steal
- a breach of the server leaks public keys: no passwords to crack
Login by signature
Login works by signature, not by sending a secret. The server sends a random challenge. Your device asks you to confirm with a touch, your face or a PIN, which unlocks the private key locally. The device signs the challenge and sends the signature back. The server verifies it against the stored public key. Nothing secret ever crosses the network. And crucially, the browser binds the signature to the real site's origin, so a signature made for your bank cannot be used anywhere else.
- 1. server sends a random challenge
- 2. device asks you to confirm (touch, face, PIN)
- 3. device signs the challenge with the private key
- 4. server verifies with the stored public key
- nothing secret crosses the wire; the signature works only for this site
Why phishing fails
This is the property that matters most. When a passkey is created, the browser records which origin it belongs to, and it will only use that passkey on that exact origin. A phishing site that looks identical to your bank gets nothing: the browser does not offer the passkey, and there is no secret for you to type into the wrong box. Compare a password or a one-time code, which a user can be tricked into entering on a fake site. Passkeys remove that whole class of attack, by design, not by vigilance.
- the browser records which origin a passkey belongs to it only uses that passkey on that exact origin
- a look-alike site gets nothing: no passkey, no signature
- no secret for the user to type in the wrong place
- the key advantage over passwords and OTP codes
WebAuthn and FIDO2
The standards behind this: WebAuthn is the browser API, standardised by the web consortium, that lets a site ask the device to create and use key pairs. CTAP is the protocol browsers use to talk to external authenticators. Together they are called FIDO2. An authenticator can be a platform one, built into your phone or laptop, or a roaming one, like a plug-in security key. Passkey is simply the user-friendly name for a WebAuthn credential. When someone says passkey, they mean a WebAuthn key pair.
- WebAuthn: the browser API for public-key login (W3C)
- CTAP: how browsers talk to external authenticators
- FIDO2 = WebAuthn + CTAP
- authenticators: platform (phone, laptop) or roaming (a security key like YubiKey)
- passkey: a user-friendly name for a WebAuthn credential
Synced vs device-bound
There are two kinds. Synced passkeys are backed up to your platform account, Apple, Google, Microsoft or a password manager, so they work across your devices and survive a lost phone. Most consumer passkeys are synced, which solves the recovery problem. Device-bound passkeys never leave a single authenticator, such as a security key; they give the highest assurance with no cloud copy, for high-security use. You choose by whether recovery or maximum assurance matters more.
- synced: backed up to your platform account or password manager; work across devices; easy recovery
- device-bound: never leave one authenticator (a security key); highest assurance, no cloud copy
- most consumer passkeys are synced; high-security is device-bound
Adding it to an app
To add passkeys you implement two ceremonies. Registration: the server sends options and a challenge, the browser creates a key pair and returns the public key and a credential id, stored against the account. Authentication: the server sends a challenge, the browser signs it, the server verifies. Use a WebAuthn library, not hand-written cryptography. On the server, always verify the origin, the challenge you issued, and the signature counter that detects cloned authenticators.
- registration: server sends options + challenge; browser creates the key; server stores the public key + id
- authentication: server sends a challenge; browser signs; server verifies
- use a library (SimpleWebAuthn, Spring, platform SDKs)
- verify origin, challenge, signature counter server-side
Rollout in practice
In practice, passkeys arrive alongside existing login, not overnight. You offer them as an option, then make them the default. Keep a recovery path, and here is the catch: it must be strong, or you have just moved the weakness there, like the password reset problem from episode nine. Account recovery, not the cryptography, is the hard part. Passkeys can also serve as a strong second factor. And let a user register several, such as a phone and a backup key, so losing one is not a lockout.
- offer passkeys as an option, then as the default
- keep a recovery path (and make it strong, not a weak password reset)
- account recovery is the hard part, not the cryptography
- passkeys also work as a strong second factor
- allow several passkeys per account (phone + key)
Common mistakes
Mistakes. Implementing the WebAuthn cryptography by hand instead of using a library. Not verifying the origin, the challenge or the signature counter on the server, which throws away the guarantees. A weak recovery flow, which reintroduces exactly the phishing weakness passkeys remove. Allowing only one passkey per account, so losing the device means lockout. And treating an SMS one-time code as equivalent security, when it remains phishable and interceptable in ways a passkey is not.
- implementing WebAuthn crypto by hand
- not verifying origin, challenge or counter
- a weak recovery flow that undoes the phishing resistance
- only one passkey allowed, so loss = lockout
- treating SMS OTP as equivalent (it is phishable)
Say it like this
In the interview: passkeys give each site its own key pair, private key in the device's secure hardware, never transmitted. Login signs a server challenge instead of sending a secret, so there is nothing to steal or phish. Phishing resistance comes from the browser binding the passkey to the origin, so a look-alike site gets no signature. I implement both ceremonies with a library, verify origin, challenge and counter, and invest in strong recovery, where the risk moves.
- "Each site gets a key pair;
- the private key never leaves
- the device, and login signs a challenge rather than sending
- a secret. The browser binds
- the passkey to the origin, so a fake site gets no signature.
- I implement both ceremonies
- with a library, verify origin
- and counter, keep recovery
- strong."