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