Delivered remotely for a business based in Zurich, Switzerland. Names withheld by agreement.
Project Overview
Credentials, recovery codes, and service tokens routinely accumulate across browser autofill caches, team chat histories, and shared spreadsheets—leaving organizations exposed to single-point compromises and untraceable access sprawl. Even when teams adopt hosted secret tools, server-side decryption architectures still place plaintext secrets within reach of compromised cloud hosts or misconfigured backups.
We engineered a zero-knowledge enterprise password manager uniting a high-throughput Rust backend, a React and TypeScript user interface embedded with Rust WebAssembly cryptography, and PostgreSQL ciphertext persistence. Every cryptographic operation—from Argon2id key stretching to asymmetric shared-vault key wrapping—executes strictly inside client memory, ensuring the server acts purely as an authenticated, verifiable ciphertext broker.
Zero-Knowledge Vault Constraints
Designing a cryptographic vault usable by non-technical staff as well as security engineers surfaces hard tensions between mathematical rigor and daily usability:
- Cross-platform cryptographic parity: Web browsers, desktop apps, and browser extensions must agree on exact key-derivation parameters, nonce generation, and AEAD padding across every release.
- Frictionless team key rotation: Sharing folders across departments cannot rely on clumsy manual passphrase exchanges whenever teammates join or offboard.
- Blind conflict resolution: Because PostgreSQL stores opaque encrypted payloads, concurrent offline edits from mobile and desktop clients cannot be merged with naive server-side JSON diffs.
- Enterprise recovery without backdoors: Organizations need controlled account recovery for locked-out employees without violating zero-knowledge guarantees for personal or sensitive vaults.
Architectural Strategy
We built the platform around a single shared Rust cryptographic core compiled natively for desktop/mobile clients and to WebAssembly for the React web vault and browser extensions. By keeping all sensitive key handling in one audited Rust crate, every client enforces consistent Argon2id memory-hard derivation, HKDF domain separation, and AES-256-GCM authenticated encryption with Associated Data (AEAD) binding item IDs and vault IDs to prevent ciphertext-swapping attacks.
On the server side, an asynchronous Rust API built with Axum and Tokio handles authentication handshakes, role-based access enforcement, and delta synchronization against PostgreSQL. Server code never receives raw master passwords or unencrypted vault keys, relying on client-signed key envelopes and cryptographic revision counters to preserve data integrity.
Core Capabilities
- Client-Side Zero-Knowledge Encryption: Derives distinct authentication and vault master keys locally via Argon2id, encrypting every password, TOTP seed, secure note, and attachment prior to network egress.
- Hierarchical Shared Collections: Supports granular team folders and item-level permissions via X25519 asymmetric key wrapping and automatic key-rotation workflows upon member revocation.
- Cross-Platform Delta Sync: Streams compact incremental ciphertext changes across Web, desktop, and extension clients using monotonic sync cursors without re-downloading full vaults.
- Hardware Passkey & SSO Integration: Pairs FIDO2/WebAuthn hardware keys and enterprise OIDC identity verification with cryptographic device trust enrollment.
- Zero-Exposure Vault Health Auditing: Evaluates password reuse, weak entropy, and k-anonymity breach exposure entirely within local WebAssembly memory.
Technical Architecture
Upon unlock, the React client invokes its embedded Rust WebAssembly module to stretch the user's passphrase or hardware-backed secret via Argon2id, unlocking the symmetric user key in memory. Authentication completes through a challenge-response verifier backed by Redis, issuing short-lived signed tokens. During synchronization, the Rust API validates permissions in PostgreSQL, returns updated ciphertext records and wrapped collection keys, and appends metadata events to an audit ledger while leaving decryption strictly on the client.
Flow: React UI + Rust Wasm Crypto → Argon2id / X25519 Client Keyring → TLS Challenge-Response Auth (Redis) → Rust Sync & RBAC API → PostgreSQL Ciphertext & Audit Store
Separating client cryptographic execution from Rust server routing ensures that even full database snapshot exfiltration yields zero usable secrets without the originating user's local master secret.
Technology Stack
| Category | Technology detail |
|---|---|
| Core Sync Server | Rust (Axum/Tokio) serving authenticated vault deltas, ACL checks, and audit logs |
| Client Cryptography | Rust compiled to WebAssembly executing Argon2id, HKDF, X25519, and AES-256-GCM |
| Web & Extension UI | React and TypeScript powering the vault workspace, autofill flows, and team sharing |
| Ciphertext Storage | PostgreSQL persisting encrypted vault blobs, wrapped collection keys, and revision trees |
| Session & Nonce Cache | Redis storing short-lived SRP/WebAuthn challenges, rate limits, and sync cursors |
| Key Exchange Model | Asymmetric X25519 + symmetric key wrapping enabling zero-knowledge shared folders |
| Breach Monitoring | K-anonymity SHA-1 prefix checks against compromised credential feeds without leaking secrets |
| Audit & Governance | Signed immutable event ledger tracking vault access, role changes, and policy compliance |
Engineering Trade-offs & Solutions
| Engineering Challenge | Solution & Trade-off |
|---|---|
| Preventing server-side search leakage over encrypted credentials | Downloaded indexed encrypted metadata snapshots to the client so React performs instant fuzzy search locally in memory; trades initial client sync payload size for zero plaintext search indexes on the server. |
| Balancing Argon2id brute-force resistance with sluggish browser unlock times | Tuned WebAssembly Argon2id memory and iteration profiles dynamically per device capability while keeping minimum security floors; requires careful Wasm memory allocation handling on mobile browsers. |
| Enabling enterprise account recovery without a global master backdoor | Implemented opt-in organization escrow wrapping individual recovery keys under a dual-custody administrative X25519 public key; preserves zero-knowledge against the cloud vendor while satisfying corporate continuity rules. |
| Avoiding CSRF and XSS exposure inside the React web vault | Enforced strict Content Security Policy headers, isolated WebAssembly crypto inside dedicated web workers where supported, and avoided localStorage persistence for unlocked keys. |
Security & Reliability
Every layer of the vault stack assumes hostile network and storage environments. Authenticated Encryption with Associated Data (AEAD) binds each encrypted item's UUID, folder ID, and revision number directly into the cryptographic tag, defeating server-side record-substitution or downgrade tampering. Sensitive plaintext strings in client memory are wrapped in Rust types implementing explicit zeroization on drop, clearing secrets promptly upon auto-lock timeouts.
Backend endpoints enforce strict Redis-backed brute-force throttling on login handshakes and key-fetch routes, paired with WebAuthn step-up verification when exporting vaults or approving new trusted devices. PostgreSQL runs with point-in-time recovery and serializable transaction boundaries around shared-collection ACL updates so permission revocations and key-version bumps take effect atomically.
Performance & Scale
Password managers experience spiky concurrency every morning as distributed workforces unlock clients simultaneously and fetch vault deltas. Rust's zero-cost async runtime on Tokio handles dense concurrent WebSocket and HTTPS sync connections with minimal per-connection memory footprint, while PostgreSQL serves delta queries efficiently using composite (vault_id, updated_revision) indexes.
On the client side, compiling cryptographic routines to WebAssembly avoids JavaScript garbage-collection pauses during bulk vault imports and Argon2id key derivation. React virtualizes large credential tables and lazily decrypts heavy secure notes or attachments only when selected, keeping browser autofill and search interactions fluid even across vaults holding thousands of entries.
Operational Outcomes
Replacing fragmented credential spreadsheets and ad-hoc sharing habits with a Rust-backed zero-knowledge vault materially improved security posture across engineering and corporate teams:
- Eliminated server-side secret exposure: Storing only client-encrypted AEAD blobs and wrapped key envelopes ensures infrastructure operators and database backups never hold usable credentials.
- Controlled team onboarding and offboarding: Hierarchical shared collections and deterministic key rotation replace manual password resets across shared vendor and infrastructure accounts.
- Consistent cross-platform cryptography: A single Rust core shared across WebAssembly and native targets removes subtle cryptographic drift between web vaults and browser extensions.
- Verifiable compliance posture: Hardware-backed MFA enforcement, k-anonymity hygiene checks, and immutable access logs give auditors clear visibility without weakening end-to-end encryption.