β οΈ 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.
π€ no cap this is AI slop fr fr: this whole project was vibecoded by AI, straight up brainrot coded by the machines π absolutely cooked with that ChatGPT sauce, 100% artificial intelligence ahh code π£οΈπ₯ 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.