Security

Cut close. Sewn tight.

The full design, for those who like to check the stitching. Every claim here points at the code that keeps it. Read it, test it, try to break it, and tell us if you do.

0servers of ours
0accounts to breach
0analytics or trackers
MITopen source, every line

Sync, step by step

What travels, and who can read it.

This is the homepage animation with the protocol labels left in. Step through it, or switch relays off to see that any one working relay is enough.

Default relays:

01Keys

Made on your device. Kept there.

When a site asks for a new passkey, Passkey.bond answers the WebAuthn call itself. It generates an ECDSA P-256 (ES256) key pair locally, builds a standard attestation response, and stores the private key in the browser's extension storage. To sign in, it signs the site's challenge with that key. The private key is never sent to the site, and never to us.

  • Passkeys are bound to the site's domain (the relying party ID), so a look-alike phishing domain gets nothing. Related-origin requests are checked against the site's own /.well-known/webauthn list.
  • Each credential carries Passkey.bond's AAGUID 2391d29c-2806-4960-a51b-7c18e5da7976, so sites can tell which authenticator holds it.
  • Two-factor codes (RFC 6238 TOTP and RFC 4226 HOTP) are computed locally with HMAC-SHA1, SHA-256 or SHA-512. QR codes are decoded on the device. Nothing is uploaded.

Source: src/crypto/webauthn.ts, src/crypto/totp.ts

02The lock

AES-256-GCM behind a slow, memory-hard key.

Set a PIN or passphrase and the vault moves into encrypted storage. The key is derived with scrypt at the OWASP-recommended cost, which takes 128 MiB of memory per guess, and the vault is sealed with AES-256-GCM.

CipherAES-256-GCM, fresh 96-bit IV per write
Key derivationscrypt, N = 2^17, r = 8, p = 1 (128 MiB)
ParametersStored with the vault. Vaults sealed with weaker settings are re-keyed at the next unlock.
PhoneUnlocks with the system's own BiometricPrompt: face, fingerprint or screen lock. Locks itself again after 5 minutes by default.

Source: src/crypto/kdf-profile.ts, src/crypto/secure-storage.ts

03The sync chain

Twelve words. Three keys. No account.

Sync is off until you turn it on. Turning it on generates a BIP-39 phrase of 12 (or 24) words, which you type into your other devices. Every device holding the phrase is on the chain, and the phrase itself never leaves your devices. Each device derives the same three values from it:

phrase └─ SHA-256 └─ scrypt N=2^17, r=8, p=1 · 128 MiB per guess └─ HKDF-SHA256 ├─ chain ID the only identifier relays see ├─ AES-256-GCM key seals every sync payload └─ secp256k1 key signs every Nostr event

Different phrases give unrelated keys. Checking one guessed phrase against a chain ID seen on a relay costs a full scrypt, so brute-forcing a phrase is out of reach. The construction is pinned by test vectors, so a refactor can't change it silently.

Source: src/sync/chain-keys.ts, vectors in tests/sync/chain-keys.test.ts

04On the wire

What a relay sees. What it doesn't.

Sync messages are ordinary Nostr events (NIP-01): kind 30078, application data, tagged d = pksync-v5-<chainId> and signed with a BIP340 Schnorr signature. The content field is AES-GCM ciphertext. They go out to every configured relay, and two devices sync as long as they share one that works.

Visible to a relay

  • Ciphertext
  • The chain tag
  • When events are sent
  • The connecting IP address, as with any website

The default relays are relay.damus.io, nos.lol and relay.nostr.band, all run by independent operators. Add or remove relays in Settings, or point your devices at a relay of your own.

Source: src/sync/protocol.ts, src/sync/transport.ts

05Receiving

Trust nothing that arrives.

  • Verify first. Each event's Schnorr signature and event ID hash are checked before anything is decrypted.
  • Replays ignored. Event IDs already seen are dropped, so the same envelope from three relays is merged once.
  • Decrypt or discard. Anything that doesn't authenticate under the chain key is thrown away. GCM's tag means a relay can't alter a payload undetected.
  • Additive merge. A device adds entries it lacks and updates those with a newer creation time. Sync never deletes local data, so a hostile or broken peer can't wipe your vault.

Source: src/sync/sync-service.ts, src/sync/merge.ts

06Backups

A file you can keep in a drawer.

The password-protected backup uses the same AES-256-GCM and scrypt settings as the vault lock, with the KDF and its parameters recorded in the file header. A file from a newer version is refused with a clear message, never decrypted with the wrong settings. The extension and the phone apps share one format and one implementation.

Exports to other apps (CXF, otpauth://, CSV) are plaintext, because the receiving app expects that. Passkey.bond warns you about this when you export. Delete them once they are imported.

Source: src/crypto/backup-crypto.ts

07Footprint

Asks for little. Phones home never.

storageHolds the vault on your device.
alarmsLocks the vault again after a spell of inactivity.
faviconShows site icons from the browser's own cache, rather than a third-party icon service.
https://*/*Needed to answer passkey requests on any secure site. The only plain http pages it runs on are localhost and 127.0.0.1, for developers.
  • Manifest V3, with a content security policy of script-src 'self': no remote code and no eval.
  • No analytics, crash reporting or telemetry of any kind. The Firefox build declares no data collection.
  • The only network requests it makes: Nostr relays, if you turn sync on; a site's own /.well-known/webauthn file, when that site asks for a related-origin passkey; and the site's own icon, normally answered from the browser cache.
  • Cryptography comes from Paul Miller's @noble libraries (ciphers, hashes, secp256k1): small, dependency-free and widely reviewed. Nothing home-made.

08Separation

Two vaults, two locks, two break-ins.

Multi-factor authentication works because an attacker has to steal two different things. Most password managers will also store your TOTP seeds and passkeys, and many people let them. That puts the password and the second factor behind the same master password, in the same encrypted blob, usually on the same company's servers. Crack that one vault and both factors fall together.

This isn't hypothetical. In 2022 attackers copied encrypted LastPass customer vaults out of the company's cloud storage. A stolen vault can be attacked offline indefinitely, and any vault whose master password gives way surrenders everything in it.

  • Keep passwords in your password manager and second factors (TOTP codes, and passkeys used as a second factor) in Passkey.bond. Breaching either one yields half a login.
  • No central copy to steal. Passkey.bond has no server, so there is no store of everyone's vaults to take in one go. Sync relays hold only ciphertext under keys derived from each chain's own phrase.
  • Different keys, different places. The Passkey.bond vault is locked by its own PIN, passphrase or device biometrics, never by your password manager's master password.

For a site where a passkey is the only way to sign in, the passkey is the whole login wherever it's kept. Separation adds nothing there. What protects it is the lack of a server-side vault to steal.

09The fine print

What it can't protect you from.

Good security tells you where it stops.

  • No lock means no encryption at rest. Without a PIN or passphrase, the vault sits unencrypted in your browser profile. Set one.
  • Short PINs can be cracked offline. Someone with a copy of your browser profile can try every 6-digit PIN within hours on a GPU, however slow scrypt is. A short PIN guards against someone at your unlocked computer. Against a stolen disk, use four or more random words, or 10+ digits.
  • Your sync phrase is the whole vault. Anyone who has it can join your chain and receive everything. Store it like the vault itself.
  • Relays see metadata. They can see that a chain exists, when its devices talk, and from which IP addresses. They can't see what's inside.
  • Malware on your device wins. Software that controls your unlocked browser or phone can do what you can do. No password manager survives that.

10Disclosure

Found a flaw? Tell us quietly.

Email security@passkey.bond with the details and how to reproduce it. We'll acknowledge it, fix it, and credit you if you'd like. Please give us a reasonable chance to ship a fix before you publish.

For anything that isn't sensitive, open an issue on GitHub.