toolhq.io

All posts
7 min readby Jameel Haider

Passkeys vs passwords: what a passkey actually is, and what is still awkward

A passkey is often described as a password you cannot forget. That undersells it and also hides how it works. A passkey is not a secret you know. It is a key pair, and the half that matters never leaves your device or your keychain.

This post covers what a passkey is, how it differs from a password with a TOTP code on top, and the parts that are still awkward in practice.

What a passkey is

A passkey is a public key credential created through WebAuthn, the browser API for this. When you register one, an authenticator generates a key pair. The authenticator can be a phone, a laptop or a hardware security key. It keeps the private key and hands the site the public key.

Signing in works like this:

  1. The server sends a random challenge.
  2. The authenticator asks you to confirm, usually with a fingerprint, a face scan or a device PIN.
  3. It signs the challenge with the private key.
  4. The server checks the signature against the public key it stored at registration.

The fingerprint or PIN unlocks the key locally. It is never sent to the site. If the idea of a key pair is new, symmetric vs asymmetric encryption explains the underlying idea.

Nothing reusable crosses the network. Each signature is only valid for the challenge it answers, so capturing one gains an attacker nothing. There is also no shared secret for the site to store. A breach of the credential table leaks public keys, which are useless to an attacker. A leaked password database is a problem even when the passwords are hashed well, because weak passwords can still be guessed offline and tried on other sites.

Why origin binding matters most

The property that matters most is origin binding. The browser will only use a credential with the origin that created it. You do not check the address bar. The browser does, and it does not get tired or fooled by a convincing lookalike domain. A phishing page on the wrong domain asks for a passkey and the browser has nothing to offer it.

Compare that with a password plus a TOTP code. Both are strings you can type, which means both are strings you can be tricked into typing somewhere else. A fake login page can forward your password and code to the real site within the validity window. A caller pretending to be support can ask you to read the code out, and whoever is on the other end of the phone call can replay it. TOTP stops an attacker who only has your password. It does not stop one who has your attention. The mechanism is described in how TOTP authenticator codes work.

Each credential is also scoped to one relying party, identified by the registrable domain. A passkey for one site cannot be used on another, so the reuse problem that plagues passwords does not exist.

Password plus TOTPPasskey
What the site storesPassword hash and a shared TOTP secretA public key
What crosses the networkThe password and a short lived codeA signature over a one time challenge
Works on a lookalike domainYes, if you type it inNo, the browser refuses
Reusable across sitesPasswords often areNo, scoped to one relying party
If you lose your deviceYou still know the passwordDepends on sync and your recovery route

The site also receives a signature counter and can ask for attestation, which describes the authenticator that made the credential. Most deployments keep this simple and ignore both.

Synced and device bound

There are two kinds of passkey, and the difference affects what you can promise.

  • Synced passkeys are copied between your devices by a platform keychain or a password manager. Register on your phone and the credential appears on your laptop. This is what most consumers will have.
  • Device bound credentials never leave the hardware that created them. A hardware security key is the clearest example. Lose the device and that credential is gone.

Synced passkeys trade some assurance for a great deal of convenience, since the credential is now as safe as the account that syncs it. Which kind you can require depends on the platform, and this is an area where expectations and reality still diverge. Do not design a policy around a guarantee you have not tested on the devices your users own.

The awkward parts

These are real, and it is better to plan for them than to find them in production.

  • Account recovery. Losing access to the keychain is losing the credential. You still need a fallback path, and that path becomes the weakest part of the system.
  • Cross ecosystem use. Signing in on a borrowed or shared machine means scanning a QR code with your phone. It works, but it is unfamiliar and slower than typing.
  • Enterprise policy. "All your users have a synced passkey" is not something you can simply assert. Managed devices, shared workstations and mixed platforms each behave differently.
  • The user interface. People do not reliably understand what they just created, where it lives, or which device has it.

Deploying them sensibly

Add passkeys alongside passwords, not instead of them. Do not delete the password column on day one.

  • Let users register more than one passkey, so a lost phone is an inconvenience and not a lockout.
  • Keep a recovery route that is not itself phishable. A reset link sent to an email account protected by a weak password undoes much of what the passkey gave you.
  • Treat password plus TOTP as the fallback, not the primary. Offer the passkey first at sign in.

Because the password stays as a fallback, it still has to be a good one. An account is only as strong as its weakest sign in method, and an attacker will choose that method for you. Check the fallback with the Password Strength Checker, and consider a long passphrase, as described in passphrases vs passwords, since you will rarely type it.

Passkeys remove the two biggest weaknesses of passwords, reuse and phishing, without asking users to be more careful. The hard work that remains is recovery and making sure people understand what they have set up.