Security and limits
The library keeps data unreadable to a server that stores and reads it. It does not yet protect against a server that tampers. It has not been audited.
What it protects
- The server, its backups and anyone who breaches its database see public keys, salts and ciphertexts, never a password, recovery words,
key_Aor a group key. - Ciphertexts are bound to what they belong to: a row to its table and id, a wrap to its user and kind, a sealed value to its context. Moved or changed bytes are refused.
- Argon2id parameters have a floor and a cap, so a server can't make keys cheap to crack or crash a phone.
- It writes no cryptography of its own: every primitive is libsodium's.
Limits
An active server can read group data. Sealed messages are anonymous: anyone with a public key can seal to it, so
openGroupKey can't tell who sealed a group key, and a server could seal a key it knows. Public keys aren't authenticated either: a server could hand out its own in place of a member's and receive the group key. Until signatures and key fingerprints arrive, the data is only safe from a server that stores and reads but doesn't tamper.Linking trusts whoever shows the QR code.
sealForLink sends the private key to the browser behind the code the phone scanned. If an attacker gets a user to scan theirs, they get the key. The app must ask the user to confirm on the phone.No forward secrecy. Whoever gets a private key can open everything sealed to it.
No key rotation bookkeeping. The app records which group key version encrypted each row.
JavaScript can't wipe memory. Keys stay until garbage collection.
No post-quantum protection yet. A later version byte will mark a hybrid scheme.
These come from the Limits section of SPEC.md, which is the authoritative list.
Before you ship
- Before
sealForLink, show a confirmation on the phone, and in the browser compare thepublicKeythatopenLinkreturns with the account's. - Put both
publicKeyandsecretfromnewLinkRequestin the QR code, never send the secret to the server, and treat the code as secret until it's used. - Require long passwords and rate-limit sign-in: whoever holds the database can still guess weak passwords offline, one Argon2id run per guess.
- Keep passwords, recovery words, keys and decrypted values out of logs and crash reports.
- On the web, serve a strict Content-Security-Policy (with
'wasm-unsafe-eval'for libsodium): any script on the page can read the keys it holds. - Tell users that losing every way in (password, words, devices, passkeys) loses their data, and that nobody can recover it.
Reporting a vulnerability
See SECURITY.md.