1# WASM & Crypto-Adjacent Dependency Provenance23456Peach's vault security rests on a small set of third-party packages that7either ship WebAssembly blobs or sit directly on a security path. This file8records what each one is for and the supply-chain rules that apply to them.910## Exact-pin discipline (LV-9, extended by PCH-02-004)1112Every dependency listed below is **exact-pinned** in `package.json` (no caret13or tilde ranges) and locked in `bun.lock` with `packageManager` pinned to a14specific bun release. CI installs with a frozen lockfile (LV-6). Upgrading any15of them is a deliberate act: bump the pin, regenerate the lockfile, and re-run16the full suite — never a side effect of a fresh resolve.1718### WASM-shipping packages1920| Package | Pinned | Role |21|---|---|---|22| `hash-wasm` | 4.12.0 | Argon2id (master-password KDF) and BLAKE3 (payload checksums, vault id) |23| `@bokuweb/zstd-wasm` | 0.0.27 | zstd compression inside the encrypted export envelope |24| `@subspace/reed-solomon-erasure.wasm` | 0.2.5 | Codex paper-backup erasure coding |2526### Pure-JS crypto core2728| Package | Pinned | Role |29|---|---|---|30| `@stablelib/*` (blake2s, chacha20poly1305, hkdf, hmac, sha256, x25519) | 2.0.1 | Noise XX/NK handshakes and transport encryption for LAN sync |31| `@zxcvbn-ts/*` | 3.0.4 / 3.0.2 | Password strength estimation |32| `tldts` | 7.0.28 | eTLD+1 derivation for the autofill origin boundary |33| `pdfjs-dist` | 5.7.284 | Codex PDF import (hardened per MV-9) |3435### Crypto-adjacent (exact-pinned by PCH-02-004)3637These do not hold key material but feed or transform security-relevant data,38so the same pin discipline applies:3940| Package | Pinned | Role |41|---|---|---|42| `otpauth` | 9.5.0 | TOTP code generation (RFC 6238) from stored seeds |43| `pako` | 2.1.0 | Codex restore-side decompression (bomb-capped per MV-4) |44| `@zxing/library` | 0.23.0 | Aztec matrix decode on Codex restore |45| `bwip-js` | 4.11.1 | Aztec matrix encode on Codex generation |46| `pdf-lib` | 1.17.1 | Codex PDF assembly (note: bundles its own internal `[email protected]`, distinct from the import-side `[email protected]`) |47| `papaparse` | 5.5.3 | CSV import parsing (formula-injection surface) |4849## Verifying a WASM blob5051The WASM packages ship compiled binaries; their provenance chain is52npm-registry integrity hash → `bun.lock` → frozen-lockfile CI. When bumping53one, diff the package's published source repository tag against the shipped54artifact where the upstream provides reproducible builds, and re-run the55unlock-time Known-Answer self-test (`src/background/self-test.ts`) plus the56Argon2id KAT (`src/crypto/argon2id.kat.test.ts`) — a silently-swapped KDF or57hash implementation fails those vectors.