AINPM.in / Work / TrustVault
Case study · Security · PWA

Zero-knowledge password managerTrustVault: credentials that only you can decrypt

TrustVault is an open-source, offline-first password manager built as a progressive web app, in which every credential is encrypted on the device and stored data alone can never be decrypted. It unlocks with a master password or a passkey through the WebAuthn PRF extension, and explains password risk with AI models that run on the device.

  • React 19 · TypeScript · Vite
  • IndexedDB (Dexie)
  • WebAuthn PRF
  • Capacitor (Android)
  • Apache-2.0 licence
TrustVault · dashboard with test data
TrustVault dashboard showing credential categories, password strength summary, a security score and a test credential flagged as breached
Dashboard with a test credential flagged by the breach check.
Engineering evidenceProject status report, 6 Jul 2026
  • Automated tests passing4,139 / 4,142
Lighthouse PWA score
100
Encryption on device
AES-256
scrypt cost for key wrap
N=2¹⁷

Self-reported by the project; no independent audit yet. Source: Project status ↗

01 · The problem

Why build another password manager?

To prove that a web app can meet native-app security expectations without a server that holds your secrets.

Trust shouldn't depend on a server

Most vaults ask you to trust a provider's backend. A browser can now do the cryptography locally, so the server can be optional.

Passkeys are not encryption keys

Passkeys sign in, but they don't encrypt data. The WebAuthn PRF extension can derive a secret from a passkey; few apps use it safely.

AI help without data leaks

Explaining why a password is weak is useful, but sending credentials to a cloud model is unacceptable in a vault.

02 · Product principles

What makes it zero-knowledge?

Storage alone is never enough

IndexedDB holds only AES-256-GCM ciphertext, salts and nonces. No stored value can rebuild the vault key.

Two ways in, never zero

The vault key is wrapped under both the master password and, optionally, a passkey PRF, so losing a passkey never means losing data.

Keys can't be exported

Session vault keys are non-extractable WebCrypto keys, so even injected script cannot copy their raw bytes.

Expensive to guess

Master passwords are hashed and the vault key wrapped with memory-hard scrypt (N=131,072, r=8, p=1).

Local intelligence only

Strength and breach explanations run on Gemini Nano, WebLLM or LiteRT-LM on the device.

Hardened by default

Strict hash-based CSP, HSTS, COOP/CORP headers, clipboard auto-clear after 30 seconds and tab-aware auto-lock.

03 · How it works

How is TrustVault built?

A clean four-layer architecture keeps the cryptography free of UI and storage dependencies.

TrustVault layered architectureFour layers from top to bottom: presentation, data, domain and core. Each layer imports only from the layer below. The core layer holds cryptography and authentication.PresentationReact 19 pages and components · Zustand stores · auto-lock · install promptDataDexie (IndexedDB) repositories · migrations · encrypted .tvault import/exportDomainUser, Credential and VaultProfile entities · repository interfacesCoreCrypto (scrypt, PBKDF2, AES-256-GCM, HKDF) · WebAuthn PRF · TOTP · breach checks · OCR · autofill
Each layer imports only from the layer below. Highlighted: where secrets are handled.
trust-vault-pwa.vercel.app · create account
TrustVault create-account screen with username, optional email stored locally, master password and the note: end-to-end encrypted, zero-knowledge architecture
Account creation: the email is optional and stays on the device.

Features

  • Credential vault with logins, cards, bank, identity, API and SSH keys, notes
  • Password generator and TOTP (RFC 6238) codes
  • Passkey unlock through WebAuthn PRF
  • Breach checks via Have I Been Pwned k-anonymity
  • OCR capture of credentials with Tesseract
  • Encrypted import and export, backup codes, multi-vault profiles
  • Installable PWA, Android build with Capacitor, browser-extension autofill bridge
04 · Decisions & trade-offs

What was changed, and why?

DecisionReasonCall
Argon2id replaced by scryptThe WebAssembly Argon2 build conflicted with the strict Content Security Policy. Scrypt from @noble/hashes is memory-hard and pure JavaScript.Shipped
Vault key re-wrapped with scryptLegacy PBKDF2-wrapped vaults are upgraded transparently to scrypt-v1 at unlock, with no user action.Shipped
Always keep a password wrapTying data to a passkey alone means a deleted passkey destroys the vault.Shipped
Extract the crypto into a libraryThe PRF key-wrapping engine became webauthn-prf-zktv, with its own tests and preprint.Shipped
Passkey unlock inside the Android appPRF does not pass through Android WebView to Credential Manager, so the Capacitor app uses the password scheme.Not possible yet
Cloud AI for password adviceWould send credential metadata off the device. On-device models were chosen instead.Rejected
Proof of skill

What does this project prove, and how can you check it?

Employers trust skills they can verify. Each claim below links to its place in the skills matrix, and every piece of evidence is public.

Skills demonstrated

Evidence you can open

See the product artifacts: brief, eval spec, metrics tree, decisions

Last public activity 2 August 2026 · checked 5 November 2026

05 · FAQ

Frequently asked questions

What is TrustVault?

TrustVault is an open-source, zero-knowledge password manager built as a progressive web app by Ian Pinto. It encrypts every credential on the device with AES-256-GCM, stores only ciphertext in IndexedDB, works offline, and can unlock with a passkey through the WebAuthn PRF extension.

What does zero-knowledge mean in TrustVault?

It means that the stored data alone cannot be decrypted. The vault key is wrapped under a key derived either from the master password with memory-hard scrypt or from a passkey PRF output that only the authenticator can produce after biometric or PIN verification. Neither input is ever stored.

How does passkey unlock work?

During unlock the browser asks the authenticator for a PRF output tied to the passkey. TrustVault derives a wrap key from it with HKDF-SHA256 and uses it to unwrap the AES-256-GCM vault key, which stays in memory as a non-extractable CryptoKey. A password wrap of the same key is always kept, so deleting a passkey never destroys data.

Does the on-device AI send my passwords anywhere?

No. Password-strength explanations and breach-impact analysis run on local models (Gemini Nano, WebLLM or LiteRT-LM depending on the device), so no credential data leaves the device. Breach checks use the Have I Been Pwned k-anonymity range API, which sends only a short hash prefix.

Can I try TrustVault?

Yes. A staging build runs at trust-vault-pwa.vercel.app and the source is on GitHub. Use test data only: it is a personal open-source project, not an audited commercial product.

06 · What's next

Roadmap

Benchmark against Bitwarden

Feature and security benchmark workstreams added to the test-driven improvement plan in August 2026.

Close quality debt

Fix the remaining failing tests and lint findings, and complete a full WCAG 2.1 AA audit.

Independent review

Invite external security review of the key-wrapping design described in the preprint.

More work

Other case studies