⚠️ Disclaimer: This project was created for fun and educational purposes to explore WebAuthn PRF capabilities. It is not recommended for use as an actual storage solution for sensitive data. Use established password managers and security tools for real-world secret management.
A secure, client-side encrypted vault using WebAuthn PRF (Pseudo-Random Function) for passwordless encryption. Your secrets are encrypted locally using hardware-backed keys derived from your passkeys — no passwords, no server-side key storage.
┌─────────────────────────────────────────────────────────────┐
│ User's Device │
├─────────────────────────────────────────────────────────────┤
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ │
│ │ Passkey │───▶│ PRF Output │───▶│ KEK (Key │ │
│ │ (Hardware) │ │ (32 bytes) │ │ Encryption │ │
│ └─────────────┘ └─────────────┘ │ Key) │ │
│ └────────┬────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ Wrapped DEK ││
│ │ (Encrypted Data Encryption Key) ││
│ └─────────────────────────────────────────────────────────┘│
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ Encrypted Vault ││
│ │ (AES-256-GCM encrypted data) ││
│ └─────────────────────────────────────────────────────────┘│
│ │
│ ┌─────────────────────────────────────────────────────────┐│
│ │ IndexedDB ││
│ │ (Local browser storage, never leaves) ││
│ └─────────────────────────────────────────────────────────┘│
└─────────────────────────────────────────────────────────────┘
# Clone the repository
git clone <repository-url>
cd passwordless-encryption
# Install dependencies
npm install
# Start development server
npm run dev
Open http://localhost:5173 in your browser.
# Build static files
npm run build
# Preview production build
npm run preview
src/
├── lib/
│ ├── components/ # Svelte UI components
│ │ ├── layout/ # Layout components
│ │ ├── modals/ # Modal dialogs
│ │ └── views/ # Page views
│ ├── crypto/ # Cryptographic operations
│ │ ├── encryption.ts # AES-GCM encryption
│ │ ├── kdf.ts # Key derivation (HKDF)
│ │ ├── envelope.ts # Envelope encryption
│ │ └── utils.ts # Crypto utilities
│ ├── webauthn/ # WebAuthn/PRF handling
│ │ ├── prf.ts # PRF extension operations
│ │ ├── capabilities.ts # Browser capability detection
│ │ └── types.ts # WebAuthn types
│ ├── storage/ # Data persistence
│ │ ├── vault-storage.ts # IndexedDB operations
│ │ ├── schemas.ts # Data validation (Zod)
│ │ └── types.ts # Storage types
│ └── services/ # Business logic
│ └── vault-service.ts # Main vault orchestration
├── routes/
│ ├── +layout.svelte # App layout
│ └── +page.svelte # Main page
└── app.css # Tailwind CSS styles
| Script | Description |
|---|---|
npm run dev |
Start development server |
npm run build |
Build for production |
npm run preview |
Preview production build |
npm run test |
Run tests in watch mode |
npm run test:unit |
Run unit tests once |
npm run test:coverage |
Run tests with coverage |
npm run test:e2e |
Run Playwright E2E tests |
npm run lint |
Lint code with ESLint |
npm run format |
Format code with Prettier |
npm run check |
Type-check with svelte-check |
| Component | Algorithm | Key Size |
|---|---|---|
| Vault Encryption | AES-256-GCM | 256-bit |
| Key Derivation | HKDF-SHA256 | 256-bit |
| Key Wrapping | AES-KW | 256-bit |
| PRF Output | Hardware-specific | 256-bit |
✅ Protected against:
⚠️ Not protected against:
The WebAuthn PRF extension requires modern browser support:
| Browser | Minimum Version | PRF Support |
|---|---|---|
| Chrome | 118+ | ✅ Full |
| Edge | 118+ | ✅ Full |
| Safari | 17+ | ✅ Full |
| Firefox | 122+ | ⚠️ Partial |
MIT License — see LICENSE for details.