SP Vault — security
SP Vault is a self-hosted, end-to-end encrypted password manager. This file states what is protected, how, what
is not protected, and what has and has not been verified. Design details: docs/crypto-spec/SPV1.md
(protocol), THREAT_MODEL.md, docs/architecture/ADR.md, services/managed-secrets/THREAT_MODEL.md.
Guarantees (personal vault)
- The server stores ciphertext and public keys. Titles, URLs, usernames, passwords, notes, tags, TOTP seeds, attachments, file names and vault names are encrypted on the client with AES-256-GCM under keys the server never receives. Verified by tests that scan everything a client sends and everything the database and logs hold.
- There is no master password and no password-derived key: every key is 256-bit random. Device private keys are generated on the device (Secure Enclave on Apple hardware, non-extractable WebCrypto keys in browsers) and never leave it.
- A device joins an account only when an already trusted, unlocked device approves it after verifying a code the server cannot forge, or with the recovery key. A sign-in link, a QR code or the passkey alone enrol nothing.
- The recovery key is generated and shown on the client, once. The server holds only a hash of a value derived from it. Nobody — including the operator — can recover a vault whose devices and recovery key are all lost.
- Every record is bound to its vault, id, type, revision and key epoch; substitution, re-labelling, forged deletions and rollbacks below what a device already saw are detected and refused.
Explicit limits
- Web client: a server (or anyone controlling TLS termination) that serves modified JavaScript can steal the vault of users who unlock it in a browser. CSP, Trusted Types and controlled deployments reduce accidental and third-party injection; they do not remove this trust. Use the native apps for the highest assurance.
- Metadata: listed in SPV1 §8 (counts, sizes in 256-byte buckets, timing, device labels, membership, IPs).
- Compromised unlocked endpoint: reads everything that device can decrypt. Revocation stops future access, not copies already taken — rekey the account and change the stored passwords.
- Freshness: a malicious server can withhold recent changes or delete data (SPV1 §7). Keep encrypted backups.
- Clipboard, screenshots, other apps: best effort only (see THREAT_MODEL T17).
- Managed secrets (Connect / Agents) are not zero-knowledge: the node can decrypt them, by design. They live in a separate process and store with a separate key, and the product labels them as such.
- Sharing: a recipient who has seen a secret keeps it; revocation and expiry stop future retrievals only.
Cryptography
AES-256-GCM, HKDF-SHA256, HPKE (RFC 9180, DHKEM P-256), ECDSA P-256, SHA-256, HMAC-SHA256 — only through
WebCrypto, @hpke/core, Node crypto and Apple CryptoKit. No primitive is implemented in this repository.
Two independent implementations (TypeScript, Swift) are locked together by packages/crypto-test-vectors.
Verification status
| Item | Status |
|---|---|
| Unit / property tests of the protocol (TypeScript) | passing — pnpm test:unit |
| Cross-language vectors (TypeScript ⇄ Swift) | see docs/TEST_REPORT.md |
| Integration tests on a real server + PostgreSQL (two devices, recovery, offline, conflicts, malicious server, sharing, rekey, backup, agents) | passing — pnpm test:int |
| API security tests (authn/z, IDOR, CSRF, replay, enumeration, brute force, fixation, fuzzing, log hygiene) | passing — pnpm test:security |
| Browser tests under the production CSP | see docs/TEST_REPORT.md |
| Real-device tests (Face ID / Touch ID, Keychain, AutoFill, passkeys) | not done — see docs/TEST_REPORT.md |
| Independent review of SPV1 and of both implementations | not done — launch gate |
| External penetration test | not done — launch gate |
| Restore drill from offsite backup | see docs/operations/OPERATIONS.md |
Until the launch gates are closed, do not make SP Vault the only copy of credentials you cannot afford to lose or leak: keep your current manager in parallel.
Supply chain
Exact versions pinned (save-exact), lockfile with integrity hashes, install scripts disabled
(ignore-scripts=true), pnpm audit --prod and a CycloneDX SBOM in the release checklist, no third-party Swift
packages, no analytics or crash-reporting SDK in any client.
Reporting
Report vulnerabilities privately to contact@spboucher.ai. Do not open public issues for security problems.