Security Architecture

How We Protect Your Data

A technical deep-dive into Locke's cryptographic architecture, designed for security professionals and technical decision-makers.

verified Zero-Knowledge | verified Post-Quantum | verified Open Standards

Core Principle

Zero-Knowledge Architecture

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.

laptop

Client-Side Encryption

All cryptographic operations happen on your device before any data leaves it.

visibility_off

Zero Plaintext Access

We never see your master password, vault contents, or recovery keys.

gavel

Subpoena-Resistant

Even under legal compulsion, we can only provide encrypted data we cannot decrypt.

Deliver asymmetric, store symmetric

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.”

  1. 1. Deliver asymmetric

    Encrypt data or a vault key for the recipient using their public key and a hybrid post-quantum delivery suite.

  2. 2. Open on the device

    The recipient's client decrypts the delivery locally using their private key.

  3. 3. Close symmetric

    The client automatically re-encrypts supported data or keys under the recipient's symmetric data key and saves the symmetric form.

Why this matters as cryptanalysis advances

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

Our Algorithms

Every algorithm is chosen for a specific reason. We use industry-standard, peer-reviewed cryptographic primitives.

Key Derivation Double-Hashed

Argon2id (×2)

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.

check Double-hashed: client + server stretching
check Memory-hard: resistant to GPU/ASIC attacks
check Time-hard: configurable iteration count
check OWASP recommended for password storage

// 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

Symmetric Encryption

ChaCha20-Poly1305

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.

check No timing side-channels (constant-time by design)
check No padding oracle attacks (stream cipher)
check Fast in software without hardware acceleration

// 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.

Key Encapsulation Post-Quantum

X25519Kyber768 (Hybrid HPKE)

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.

check Hybrid: secure even if one algorithm breaks
check NIST PQC Level 3 security (Kyber768)
check Forward secrecy through ephemeral keys

// HPKE CipherSuite

export const hpke_suite = CipherSuite({

kem: HybridkemX25519Kyber768(),

kdf: HkdfSha256(),

aead: Chacha20Poly1305(),

})

Threshold Cryptography

Shamir's Secret Sharing

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.

check Information-theoretic security (not computational)
check Configurable threshold (e.g., 3-of-5)
check No single point of failure

// Trusted Circle example

threshold: 3

totalShares: 5

Any 3 circle members can initiate recovery. 2 members learn nothing about the secret.

verified_user

Powered by libsodium

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

How Your Vault is Encrypted

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.

Setting Your Master Password

When you create your account, your master password is used to derive keys client-side. The password hash is then stretched again server-side before storage.

1

Master password is stretched client-side using Argon2id (3 iterations, 8MB) to derive master key and password hash

2

A random symmetric key is generated and encrypted with the master key using ChaCha20-Poly1305

3

Server stretches the password hash again with Argon2id (1 iteration, 64MB, 4 parallelism) using a random salt

4

Encrypted symmetric key is stored server-side, encrypted again with AES-256

Set Master Password security flow diagram

Account Recovery

End-to-End Encrypted Recovery

The only password manager with cloud-based recovery that maintains zero-knowledge. No recovery files to lose.

How It Works

1

You designate trusted people as recovery guardians and set a threshold (e.g., 3-of-5).

2

Your master key is split via Shamir's Secret Sharing. Each share is encrypted with the guardian's public key (X25519Kyber768).

3

Encrypted shares are stored server-side. No single share (or server) can reconstruct the key.

4

During recovery, threshold guardians approve after out-of-band verification and the client reconstructs the master key.

check_circle No recovery file to lose check_circle Servers never see plaintext shares check_circle Out-of-band verification required

Threat Model

What We Protect Against

shield Protected

  • check Server breach: Encrypted data is useless without user keys
  • check Insider threat: Locke employees cannot access your data
  • check Legal compulsion: We can only provide encrypted blobs
  • check Network eavesdropping: TLS + application-layer encryption
  • check Future quantum computers: Hybrid post-quantum encryption
  • check Single guardian collusion: Threshold prevents lone actors

warning User Responsibility

  • info Weak master password: Use Fuzzypass or a strong passphrase
  • info Device compromise: Malware on your device can capture input
  • info Phishing: Use Secure Inbox to prevent credential phishing
  • info Social engineering: Verify recovery requests out-of-band
  • info Threshold collusion: Choose guardians you truly trust

How We Compare

Feature 1Password Bitwarden Locke
Zero-knowledge architecture check check check
Post-quantum encryption close close check
E2E encrypted cloud recovery close close check
Threshold-based recovery close close check
No recovery file required Emergency Kit PDF Recovery code check
Free tier close check check
Built-in phishing protection close close check