Sub topic 10
Synced passkeys, device-bound passkeys and security keys
This chapter assumes you know how a passkey registers and signs in with a challenge (the previous chapters on WebAuthn and origin binding). Here the question is where the private key lives and who can copy it. That choice decides how a passkey fails, so it matters as much as the phishing resistance you already know about.
One protocol, three storage models
Every passkey is a per-site key pair. The exchange stores the public key. The private key stays in an authenticator, which is the thing that holds the key and signs challenges. The signing protocol is the same in every case. What differs is whether the private key can be copied off the device that created it.
| Type | Where the private key lives | Can it be copied? | Typical examples |
|---|---|---|---|
| Synced passkey | An authenticator that backs it up to a cloud account | Yes, end-to-end encrypted, to other devices on the same account | iCloud Keychain, Google Password Manager, password managers such as 1Password or Bitwarden |
| Device-bound passkey (platform) | A chip in one computer or phone | No | Windows Hello with a TPM, where the credential is not synced |
| Device-bound passkey (roaming) | A removable hardware security key | No | YubiKey, Google Titan, Feitian keys |
A hardware security key is a small USB, NFC or Bluetooth device that implements FIDO2. It does the signing inside its own chip and never exports the private key.
Synced passkeys
A synced passkey is encrypted and copied to every device signed in to the same provider account. If you lose your phone, a new phone signed in to the same account has the passkey again. For most people this removes the main reason passkeys felt risky: a single lost device used to mean a lockout.
The cost is a new dependency. The passkey is now only as strong as the account that syncs it.
- If an attacker takes over your Apple, Google or password-manager account, they may get your passkeys along with it.
- Account recovery for that provider becomes part of your exchange security. A weak recovery path there is a weak path to your exchange.
- Moving between ecosystems is awkward. A passkey in iCloud Keychain does not appear on an Android phone by itself.
You can still use a synced passkey on a device that does not hold it. With cross-device sign-in (the hybrid transport), the exchange's sign-in page shows a QR code. You scan it with your phone, and the phone confirms over a nearby Bluetooth check that it is close to the computer. This keeps origin binding intact. The phone signs for the real site name the browser reports, not for whatever page the QR code appears on.
Device-bound passkeys and security keys
A device-bound passkey cannot be copied, so there is nothing to steal from a cloud account. An attacker needs the physical key, usually plus its PIN or your fingerprint.
Hardware security keys add practical details you should know:
- User verification. A key can require a PIN before it signs. The PIN is checked inside the key. After a limited number of wrong attempts (commonly eight) the key locks and must be reset, which erases its credentials.
- Discoverable and non-discoverable credentials. A discoverable credential (also called resident) is stored on the key itself, so you can sign in without typing a username. Keys have limited slots for these, often 25 or more, depending on the model. A non-discoverable credential is stored by the exchange as an encrypted blob that only the key can open. It uses no slot, but the exchange must ask for your username first.
- Several transports. USB-A, USB-C and NFC models exist. Check that your phone and computer have a matching port before you buy.
- No built-in backup. A lost or broken key is gone. This is the central trade-off.
Because the key is unique to its hardware, you must register a second one. Enroll a primary and a spare, and keep the spare somewhere safe such as a home safe. Chapter planning for recovery builds on this.
How the server can tell them apart
The authenticator data returned at registration contains a flags byte. Two flags describe the storage model:
- BE (backup eligible): the credential is allowed to be synced. It is fixed for the life of the credential.
- BS (backup state): the credential is currently backed up. It can change.
A hardware key reports BE=0. A synced passkey reports BE=1. The code below reads the flags from authenticator data, which is the layout the WebAuthn specification defines: a 32-byte hash of the relying party id, one flags byte, then a 4-byte signature counter.
import hashlib
import struct
FLAGS = {
"UP": 0x01, # user present
"UV": 0x04, # user verified (PIN or biometric)
"BE": 0x08, # backup eligible
"BS": 0x10, # backup state
"AT": 0x40, # attested credential data included
}
def describe(auth_data: bytes) -> dict:
flags = auth_data[32]
sign_count = struct.unpack(">I", auth_data[33:37])[0]
result = {name: bool(flags & bit) for name, bit in FLAGS.items()}
result["sign_count"] = sign_count
return result
if __name__ == "__main__":
rp_hash = hashlib.sha256(b"exchange.example").digest()
# Flags 0x1D = UP + UV + BE + BS: a synced passkey that is backed up
synced = rp_hash + bytes([0x1D]) + struct.pack(">I", 0)
# Flags 0x05 = UP + UV: a device-bound credential
bound = rp_hash + bytes([0x05]) + struct.pack(">I", 7)
print(describe(synced))
print(describe(bound))An exchange that wants only device-bound credentials can reject registrations with BE set. It can also ask the browser to prefer removable keys by setting authenticatorAttachment in the registration options:
const credential = await navigator.credentials.create({
publicKey: {
challenge: challengeBytes,
rp: { id: "exchange.example", name: "Example Exchange" },
user: { id: userIdBytes, name: "[email protected]", displayName: "Alice" },
pubKeyCredParams: [{ type: "public-key", alg: -7 }],
authenticatorSelection: {
authenticatorAttachment: "cross-platform", // prefer a roaming security key
residentKey: "discouraged",
userVerification: "required"
},
attestation: "none"
}
});Two edge cases come up often. First, the signature counter is usually 0 for synced passkeys, so a server cannot rely on it to detect a cloned credential. Second, attestation: "none" means the exchange cannot verify the key's make and model. Exchanges that need that proof request direct attestation, which is why some of them accept only certain key brands.
Choosing between them
The right choice depends on the account's value and your recovery habits.
| Question | Synced passkey | Hardware security key |
|---|---|---|
| What if I lose my phone? | New device restores it | Unaffected, unless the key was on that phone |
| What if my cloud account is taken over? | Passkeys may be exposed | Unaffected |
| What if I lose the only copy? | Low risk | Lockout unless you have a spare |
| Works on all my devices? | Within one ecosystem | Anywhere the ports or NFC fit |
| Extra cost | None | Roughly 25 to 70 USD per key |
A reasonable setup for a large balance uses both. Register a hardware key as the strongest factor and keep a synced passkey or authenticator app as a fallback, as long as the fallback does not let an attacker skip the strong factor. Whether a weaker fallback undermines the stronger factor is the main design question for recovery.
Common mistakes
- Registering only one hardware key and keeping it in the same bag as your laptop.
- Assuming "passkey" means "cannot be stolen". A synced passkey can be exposed through its provider account.
- Removing the authenticator app or SMS after adding a passkey without checking that you still have a working backup.
- Forgetting the key's PIN. Eight bad guesses can wipe the credentials.
- Registering a passkey in a browser profile or password manager you plan to stop using.
Exercise
An exchange registration returns authenticator data with the flags byte 0x05. Is the credential synced or device-bound, and what would the flags byte look like if the same credential were a backed-up synced passkey with user verification?
Show answer
0x05 sets only UP (0x01) and UV (0x04). BE (0x08) is not set, so the credential is not eligible for backup and is device-bound. A synced passkey that is backed up and user-verified sets UP, UV, BE and BS, giving 0x01 + 0x04 + 0x08 + 0x10 = 0x1D.
Exercise
You hold 80% of your crypto on one exchange and use a single synced passkey in your phone's cloud account. Name one risk this setup has that a hardware security key avoids, and one risk the key adds that you must plan for.
Show answer
The synced passkey can be exposed if the cloud account is taken over or recovered by an attacker. A hardware key cannot be copied, so that risk does not apply. The key adds the risk of loss or damage with no automatic backup, so you must register a second key, store it separately, and confirm the exchange lets you hold more than one.