The password hashing library has been changed from argon2-browser to scrypt (from @noble/hashes) to resolve CSP and WASM loading issues.
- argon2-browser required WebAssembly which was blocked by Content Security Policy
- Multiple attempts to load the WASM module failed with MIME type errors
- scrypt is pure JavaScript, OWASP-recommended, and already in dependencies
The database contains passwords hashed with the old argon2 format. These cannot be verified with the new scrypt implementation.
Open the Chrome DevTools Console (F12) and run:
window.debugDB.clearAllData()This will clear all users and credentials from IndexedDB.
- Go to http://localhost:3000/signup
- Enter your email and a password (12+ characters)
- Click "Create Account"
- You'll be automatically signed in and redirected to the dashboard
- Go to http://localhost:3000/signin
- Enter your email and password
- Click "Sign In"
- scrypt parameters: N=32768, r=8, p=1, dkLen=32
- These are OWASP-recommended settings for password hashing
- Memory-hard algorithm resistant to GPU attacks
- Hash format:
scrypt$N$r$p$salt$hash
This means you're trying to sign in with an account that has an old argon2 hash. Clear the database as shown above.
This is a browser cache issue with the old argon2-loader.js. Steps to fix:
- Hard refresh the page: Cmd+Shift+R (Mac) or Ctrl+Shift+R (Windows)
- Clear browser cache: Chrome Settings > Privacy > Clear browsing data > Cached images and files
- Unregister service worker:
- Open DevTools > Application tab
- Click "Service Workers" in the left sidebar
- Click "Unregister" next to the TrustVault service worker
- Refresh the page
window.debugDB
// Should show: { clearAllData, listUsers, deleteUserByEmail }public/argon2-bundled.min.js(45KB)public/argon2-loader.js(884 bytes)public/argon2.wasm(25KB)
src/core/crypto/password.ts- Replaced argon2 with scryptsrc/data/storage/debugUtils.ts- Added database management utilitiessrc/main.tsx- Auto-load debug utils in developmentindex.html- Removed argon2 script loading
Summary: Clear the database with window.debugDB.clearAllData(), then create a new account at /signup.