1# WASM & Crypto-Adjacent Dependency Provenance23Peach's vault security rests on a small set of third-party packages that4either ship WebAssembly blobs or sit directly on a security path. This file5records what each one is for and the supply-chain rules that apply to them.67## Exact-pin discipline (LV-9, extended by PCH-02-004)89Every dependency listed below is exact-pinned in `package.json` (no caret or10tilde ranges) and locked in `bun.lock` with `packageManager` pinned to a11specific bun release. CI installs with a frozen lockfile (LV-6). Upgrading any12of them is a deliberate act: bump the pin, regenerate the lockfile, and re-run13the full suite. It should never happen as a side effect of a fresh resolve.1415### WASM-shipping packages1617| Package | Pinned | Role |18|---|---|---|19| `hash-wasm` | 4.12.0 | Argon2id (master-password KDF) and BLAKE3 (payload checksums, vault id) |20| `@bokuweb/zstd-wasm` | 0.0.27 | zstd compression inside the encrypted export envelope |21| `@subspace/reed-solomon-erasure.wasm` | 0.2.5 | Codex paper-backup erasure coding |2223### Pure-JS crypto core2425| Package | Pinned | Role |26|---|---|---|27| `@stablelib/*` (blake2s, chacha20poly1305, hkdf, hmac, sha256, x25519) | 2.0.1 | Noise XX/NK handshakes and transport encryption for LAN sync |28| `@zxcvbn-ts/*` | 3.0.4 / 3.0.2 | Password strength estimation |29| `tldts` | 7.0.28 | eTLD+1 derivation for the autofill origin boundary |30| `pdfjs-dist` | 5.7.284 | Codex PDF import (hardened per MV-9) |3132### Crypto-adjacent (exact-pinned by PCH-02-004)3334These do not hold key material but feed or transform security-relevant data,35so the same pin discipline applies:3637| Package | Pinned | Role |38|---|---|---|39| `otpauth` | 9.5.0 | TOTP code generation (RFC 6238) from stored seeds |40| `pako` | 2.1.0 | Codex restore-side decompression (bomb-capped per MV-4) |41| `@zxing/library` | 0.23.0 | Aztec matrix decode on Codex restore |42| `bwip-js` | 4.11.1 | Aztec matrix encode on Codex generation |43| `pdf-lib` | 1.17.1 | Codex PDF assembly (note: bundles its own internal `[email protected]`, distinct from the import-side `[email protected]`) |44| `papaparse` | 5.5.3 | CSV import parsing (formula-injection surface) |4546## Verifying a WASM blob4748The WASM packages ship compiled binaries; their provenance chain is49npm-registry integrity hash → `bun.lock` → frozen-lockfile CI. When bumping one,50diff the package's published source repository tag against the shipped artifact51where the upstream provides reproducible builds, and re-run the unlock-time52Known-Answer self-test (`src/background/self-test.ts`) plus the Argon2id KAT53(`src/crypto/argon2id.kat.test.ts`). A silently-swapped KDF or hash54implementation fails those vectors.