Cybersecurity

Passkeys vs Passwords: The Future of Authentication

Two years after Apple, Google and Microsoft committed to passkeys, they are now supported by the major platforms, browsers and many of the largest consumer services. We explain how passkeys work, why they defeat phishing, and what organisations should consider before rolling them out to customers and staff.

By EthicalHat Research · · 3 min read
Infographic: Why passkeys beat passwords

Passwords have been "about to die" for most of the last twenty years. What is different now is that the replacement is built into the devices people already carry.

In May 2022, Apple, Google and Microsoft committed to support a common passwordless sign-in standard, passkeys, from the FIDO Alliance. Two years later, passkeys work across iOS, Android, macOS, Windows and the major browsers. Services including Google, Microsoft consumer accounts, Amazon, PayPal and GitHub offer them. Last week, around World Password Day, Google said passkeys had been used more than a billion times across more than 400 million Google accounts.

How a passkey works

A passkey is a FIDO2/WebAuthn credential: a public-private key pair created for one specific website.

sequenceDiagram
  participant U as User device (authenticator)
  participant B as Browser
  participant S as example.com
  Note over U,S: Registration
  S->>B: challenge + relying party ID "example.com"
  B->>U: create key pair for example.com (after fingerprint/face/PIN)
  U-->>S: public key + credential ID
  Note over U,S: Sign-in
  S->>B: new random challenge
  B->>U: sign challenge for origin example.com
  U-->>S: signature (verified with stored public key)
  • The private key stays on the user's device or in their platform account (iCloud Keychain, Google Password Manager or a password manager), protected by the device's biometric or PIN.
  • The website stores only the public key. A database breach reveals nothing that can be used to log in.
  • Each sign-in signs a fresh random challenge, so there is nothing to replay.
  • The browser only uses a passkey for the origin it was created for. A phishing site at examp1e.com simply cannot request it.

That last property is why passkeys are called phishing-resistant. With a password plus an SMS or authenticator code, a convincing fake login page can capture both and replay them in real time. With a passkey, there is nothing the user can be tricked into handing over.

Synced vs device-bound

There are two flavours, and they suit different needs:

  • Synced passkeys are backed up and synchronised across a user's devices through their platform account or password manager. They solve the "I lost my phone" problem and are ideal for consumers.
  • Device-bound passkeys live on one piece of hardware, such as a security key or a managed device's TPM, and cannot be exported. They give higher assurance for administrators and regulated environments.

Organisations can express which they accept through WebAuthn options and, for enterprise deployments, attestation.

Adding passkeys to your application

The browser API is compact. Registration, simplified:

javascript
const credential = await navigator.credentials.create({
  publicKey: {
    challenge: serverChallenge,                 // random, from your server
    rp: { id: "example.com", name: "Example" },
    user: { id: userIdBytes, name: "sam@example.com", displayName: "Sam" },
    pubKeyCredParams: [{ type: "public-key", alg: -7 }],   // ES256
    authenticatorSelection: {
      residentKey: "required",                   // discoverable credential = passkey
      userVerification: "required",              // biometric or PIN
    },
  },
});
// Send credential.response to your server to verify and store the public key.

Use a well-maintained server library to verify registrations and assertions rather than implementing the cryptography yourself.

Rollout lessons

Offer, don't force, at first. Let users add a passkey after a normal sign-in, and prompt again at natural moments such as password resets or new devices. Adoption grows when the experience is clearly faster.

Keep a fallback, then shrink it. Most services still need passwords for users on older devices. Over time, you can drop SMS and email codes as fallbacks for users who have passkeys.

Design recovery carefully. When login becomes phishing-resistant, attackers go after account recovery. If "forgot passkey" leads to an email link or an easily persuaded support agent, you have moved the weak point rather than removed it.

Separate workforce and customer needs. For staff, pair passkeys with device management and consider device-bound keys for privileged roles. For customers, synced passkeys give the best balance of security and convenience.

Update detection. Fewer password logins mean fewer credential-stuffing alerts, and more value in watching for new passkey registrations, recovery events and session-token theft.

Are passwords finished?

Not yet. Enterprise legacy systems, shared devices and users without modern hardware will keep passwords around for years. But for the first time there is a replacement that is more secure and easier to use, and that combination is what finally changes behaviour.

If you are planning a passwordless rollout for your workforce or customers, our information security audit and CISO as a Service teams can help you design authentication and recovery that attackers cannot simply walk around.

EthicalHat Research

The EthicalHat research team: penetration testers, SOC analysts and engineers writing about security, software engineering and AI.

Want an expert opinion on your own systems?

Email info@ethicalhat.com or call +1-844-838-4422. Our security engineers are happy to talk it through.