Security Architecture
A technical deep-dive into Locke's cryptographic architecture, designed for security professionals and technical decision-makers.
Core Principle
Locke is built on a fundamental principle: we cannot access your data. All encryption and decryption happens exclusively in your browser or device. Our servers only store encrypted blobs that are meaningless without your keys.
All cryptographic operations happen on your device before any data leaves it.
We never see your master password, vault contents, or recovery keys.
Even under legal compulsion, we can only provide encrypted data we cannot decrypt.
Vault contents are encrypted with symmetric data keys. Your passkey or password unlocks your personal data key, while shared vaults have their own symmetric keys. Asymmetric encryption delivers data or keys to a recipient, including while they are offline. Wherever possible, the recipient's client opens that delivery and automatically re-encrypts it symmetrically for storage. We call this “close symmetric.”
Encrypt data or a vault key for the recipient using their public key and a hybrid post-quantum delivery suite.
The recipient's client decrypts the delivery locally using their private key.
The client automatically re-encrypts supported data or keys under the recipient's symmetric data key and saves the symmetric form.
Rapid progress in quantum computing and AI-assisted mathematical research makes long-term cryptographic assumptions especially important. Public-key encryption relies on mathematical problems remaining difficult to solve. Closing symmetric reduces the amount of stored data that continues to depend on those public-key assumptions, limiting exposure to future mathematical breakthroughs, including quantum algorithms.
Symmetric encryption relies on different security assumptions. Known quantum search techniques offer a smaller advantage against symmetric keys than the quantum algorithms that threaten classical public-key encryption. Keeping long-term data under strong symmetric keys therefore reduces reliance on the mathematics used for asymmetric delivery.
This works alongside post-quantum delivery protection. An attacker can capture an encrypted delivery today and keep it in the hope of decrypting it later, a threat known as “harvest now, decrypt later.” Automatically closing symmetric limits retained asymmetric records, while hybrid post-quantum encryption protects the delivery itself. Closing a record cannot protect a copy an attacker already captured.
Further reading: NIST on post-quantum cryptography and Google DeepMind on AI-assisted mathematical discovery.
Cryptographic Stack
Every algorithm is chosen for a specific reason. We use industry-standard, peer-reviewed cryptographic primitives.
Winner of the Password Hashing Competition (2015). Argon2id combines the side-channel resistance of Argon2i with the GPU/ASIC resistance of Argon2d. Locke runs Argon2id twice—first client-side for key derivation, then again server-side before storage—providing defense in depth.
// Client-side
iterations: 3
memory: 8192 // 8 MB
parallelism: 1
outputLength: 32 // 256 bits
// Server-side (password hash)
iterations: 1
memory: 65536 // 64 MB
parallelism: 4
outputLength: 32 // 256 bits
AEAD (Authenticated Encryption with Associated Data) construction combining the ChaCha20 stream cipher with Poly1305 MAC. RFC 8439 standardized, widely deployed in TLS 1.3 and WireGuard.
// Why not AES-GCM?
AES-GCM requires hardware AES-NI for secure constant-time operation. ChaCha20 is constant-time in pure software, making it safer across all devices.
Hybrid Post-Quantum Key Encapsulation combining classical X25519 (Curve25519 ECDH) with CRYSTALS-Kyber768, a NIST-selected post-quantum algorithm. Used for secure sharing and Trusted Circle recovery.
// HPKE CipherSuite
export const hpke_suite = CipherSuite({
kem: HybridkemX25519Kyber768(),
kdf: HkdfSha256(),
aead: Chacha20Poly1305(),
})
Polynomial interpolation-based secret sharing scheme. Splits a secret into n shares where any k shares can reconstruct it, but k-1 shares reveal nothing.
// Trusted Circle example
threshold: 3
totalShares: 5
Any 3 circle members can initiate recovery. 2 members learn nothing about the secret.
All cryptographic operations use libsodium, the industry-standard encryption library with zero serious CVEs in over a decade of production use. Used by Discord, Keybase, and thousands of security-critical applications.
Security Model
Locke implements a security model inspired from and improved upon that of Bitwarden. All passwords are encrypted client-side using a symmetric key. Instead of AES we use ChaCha20-Poly1305 for its constant-time guarantees.
Account Recovery
The only password manager with cloud-based recovery that maintains zero-knowledge. No recovery files to lose.
You designate trusted people as recovery guardians and set a threshold (e.g., 3-of-5).
Your master key is split via Shamir's Secret Sharing. Each share is encrypted with the guardian's public key (X25519Kyber768).
Encrypted shares are stored server-side. No single share (or server) can reconstruct the key.
During recovery, threshold guardians approve after out-of-band verification and the client reconstructs the master key.
For businesses & teams
Business continuity when employees leave, lose access, or are unavailable. Admins and designated team members can recover organization vaults.
Learn moreFor individuals & families
Designate family or friends as guardians. Perfect for password inheritance, forgotten passwords, or lost devices without backup.
Learn moreThreat Model
| Feature | 1Password | Bitwarden | Locke |
|---|---|---|---|
| Zero-knowledge architecture | |||
| Post-quantum encryption | |||
| E2E encrypted cloud recovery | |||
| Threshold-based recovery | |||
| No recovery file required | Emergency Kit PDF | Recovery code | |
| Free tier | |||
| Built-in phishing protection |