Files
buh/web/package.json
rob thijssen a825c77424 feat(web): E2E sealed text through the blind relay — Phase 4 milestone
The Milestone-1 payoff: a sealed 1:1 text message travels end-to-end through the
real Phase-1 relay, encrypted with the full client crypto path, verified in
Firefox.

- lib/keystore.ts — IndexedDbKeyStore behind a KeyStore interface: a passphrase
  is stretched with Argon2id (hash-wasm) into an AES-GCM key, and every secret
  state blob (identity seed, prekey secrets, ratchet session) is sealed at rest.
  TauriKeyStore later swaps in behind the same interface.
- lib/relay.ts — thin client for the blind relay's /v1 (push/pull/ack/health),
  payloads base64, queue ids hex.
- lib/demo.ts — one page plays Alice and Bob: Alice publishes a signed invite;
  Bob verifies it, runs PQXDH (X25519 + ML-KEM-768) + the Double Ratchet, and a
  sealed message goes each way through the relay, persisting state every hop.
- App.tsx renders the decrypted text at each endpoint and the relay's stored
  rows — opaque queue id + envelope id + ciphertext, no identity/sender —
  demonstrating the relay is blind.
- vite.config proxies /v1 to buh-api (same-origin, no CORS); index.ts re-exports
  the session facade.

Verified live: Alice read "hello alice — bob here", Bob read "hi bob — got it,
sealed end-to-end", across two uncorrelated random queues, zero console errors.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UMbqdSzDP4F7Y9AdK5LXaV
2026-06-30 13:43:32 +03:00

28 lines
700 B
JSON

{
"name": "buh-web",
"private": true,
"version": "0.1.0",
"type": "module",
"scripts": {
"wasm": "wasm-pack build ../crates/buh-crypto --target bundler --out-dir ../web/src/lib/crypto/pkg --features wasm",
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview"
},
"dependencies": {
"hash-wasm": "^4.11.0",
"idb": "^8.0.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
"devDependencies": {
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react-swc": "^3.7.0",
"typescript": "^5.5.3",
"vite": "^5.4.0",
"vite-plugin-top-level-await": "^1.4.4",
"vite-plugin-wasm": "3.6.0"
}
}