HomeCase studiesZero-Knowledge Enterprise Password Manager and Encrypted Credential...

Case study · Zurich, Switzerland

Zero-Knowledge Enterprise Password Manager and Encrypted Credential Vault

Zero-Knowledge Credential Vault

Organizations sharing administrative logins, API keys, and recovery codes across chat threads or spreadsheets face severe breach exposure whenever a single backend store is compromised. We architected a zero-knowledge password manager combining a memory-safe Rust sync server, a React web vault compiled with Rust WebAssembly cryptographic primitives, and hardened PostgreSQL persistence. All master key derivation, vault item encryption, and asymmetric key wrapping execute exclusively on user devices so servers store only authenticated ciphertext.

Industry
Zero-Knowledge Credential Vault
Solution
A cross-platform, end-to-end encrypted password manager featuring a Rust API backend, React and WebAssembly client cryptography, and PostgreSQL ciphertext synchronization.
Platforms
Web & API · Cross-platform
Stack
Rust · React · PostgreSQL · WebAssembly · TypeScript · Redis
Location
Zurich, Switzerland · delivered remotely
Role
Engineering, with the team behind for mobile and QA

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.

01 — Questions

asked about this kind of project

How does the backend verify user authentication without ever learning the master password?

Client-side Rust WebAssembly derives two independent keys via Argon2id: a local vault encryption key that never leaves the device, and a separate authentication verifier proved over an SRP-style or passwordless WebAuthn handshake so the Rust server validates identity without seeing raw secret material.

Why compile Rust cryptographic modules to WebAssembly instead of relying solely on browser JavaScript libraries?

Shipping one audited Rust crate across React web clients, desktop wrappers, and browser extensions guarantees identical Argon2id tuning, constant-time primitives, and strict memory zeroization rather than duplicating error-prone crypto glue across platforms.

How does secure team sharing work if the PostgreSQL database cannot decrypt individual passwords?

Each shared collection owns an independent symmetric vault key. When an administrator grants access, the client wraps that collection key using the recipient's verified X25519 public key; the server stores only the wrapped key envelope and enforces RBAC on who can fetch it.

What happens if an employee leaves the company or a device is stolen?

Administrators revoke the member's access immediately in the Rust API, invalidating active tokens in Redis and rotating affected shared collection keys on the next authorized client sync so former members cannot decrypt future credential updates.

How are offline edits and concurrent multi-device updates merged when items are encrypted blobs?

Each credential entry carries a monotonic revision vector and unencrypted UUID metadata outside the AEAD payload, allowing PostgreSQL to detect concurrent writes cleanly and letting the React client decrypt conflicting revisions side by side for user resolution.

How do you run weak-password and breach checks without exposing plaintext credentials to external APIs?

Password entropy scoring runs locally inside WebAssembly, while compromised-credential checks hash passwords client-side and query an external k-anonymity API using only the five-character SHA-1 prefix, comparing full suffixes strictly inside local memory.

03 — Similar project?

describe what is different about yours

Build yours.

Tell me what exists, what you need and the deadline. Fixed price for a defined scope, or $55/day (8–9 hours work) with a written plan first.

Solitaire Corporate Park, Makarba, Ahmedabad, Gujarat 380015, India · IST (UTC+5:30) · --:-- IST · Mon–Fri 09:00–18:00 IST · US & EU overlap daily

No newsletter, no CRM. Just a reply.