I'll build an NSA-themed encrypted notepad with strong client-side encryption. Let me start by exploring the project structure.
Now let me build the app. I'll create a crypto module using the Web Crypto API (AES-GCM with PBKDF2 key derivation, 600k iterations), then the UI components.
First, updating the title:
Now the crypto module. I'll use PBKDF2-SHA256 with 600,000 iterations + AES-256-GCM, which makes brute-forcing extremely expensive.
TypeScript strictness on Uint8Array buffer types. I'll type the byte arrays explicitly using ArrayBuffer.
I need to update the deriveKey signature and use randomBytes in encrypt.
The lint error is stale (randomBytes is now used). Now let me create the storage module and the main App with all UI. Let me build the components.
Now the note types and a boot/scanline visual component. Let me create the main App with the terminal aesthetic.
Now the Lock screen (create/unlock) component:
Now the note editor / vault interface. Notes are stored as a JSON array inside the encrypted blob.
Now the main App that wires everything together with autosave and a scanline overlay.
Let me add a subtle green glow/CRT vignette to the global CSS and set the body background to black.
Now let me build the project to confirm everything compiles.
Build succeeded. I've built CIPHERVAULT, an NSA-themed encrypted notepad. Here's what it does:
Security Architecture
- AES-256-GCM authenticated encryption (confidentiality + tamper detection)
- PBKDF2-SHA256 with 600,000 iterations for key derivation — this deliberately makes each password guess extremely slow, so brute-forcing is computationally impractical
- Random 16-byte salt + 12-byte IV generated per save via
crypto.getRandomValues
- Zero-knowledge design: the passkey is never stored anywhere and never leaves the device. Only the ciphertext lives in
localStorage. If the passkey is lost, the data is unrecoverable by design.
- Notes are serialized to JSON, encrypted as a single blob, and stored in
localStorage.
Features
- Boot sequence — animated terminal startup with cryptographic init log
- Provision flow — for first-time use, with a live password-strength meter showing entropy bits and an estimated crack time; requires confirmation and an 8-char minimum
- Unlock flow — decrypts the vault, tracks failed attempts, with an "emergency purge" to destroy the vault
- Vault interface — multi-document notepad with sidebar, search, create/delete, word/char counts, and a live UTC clock
- Encrypted autosave — debounced re-encryption on every edit, with a "◌ ENCRYPTING → ✓ ENCRYPTED" status indicator
- Lock button — wipes decrypted notes and the key from memory instantly
Aesthetic
Green-on-black CRT terminal with scanline overlay, vignette, monospace type, "TOP SECRET // NOFORN" classification banners, and custom terminal scrollbars.
The app is fully client-side — nothing is ever transmitted to a server.
Files built: index.html, src/lib/crypto.ts, src/lib/storage.ts, src/components/Boot.tsx, src/components/LockScreen.tsx, src/lib/notes.ts, src/components/Vault.tsx, src/App.tsx, src/index.css