All notable changes to this tool will be documented in this file. Format: Keep a Changelog.
[Unreleased]
[0.1.0] - 2026-09-29
Fixed
-
verify's dispatch reaches the 3 runners it actually has:runTargetVectorskeyed only on PER-SIZE algo spellings (sha256,sha3_512,aes_gcm, …) whilepackages/front/fw-wasm-crypto/targets.jsondeclares the BARE family names (sha2,sha3,aes), so the three implemented runners were unreachable — every real target fell through tounknown algo family. Fixed by adding bare-family branches that select the size/variant from the vector folder name, notalgo(constant across a bare target's several vector paths), and by matching the ACTUAL wasm ABI, which turned out to differ from what the runners assumed:sha2/sha3are ONE combined export taking a leadingvariantId(sha2(variantId, inPtr, inLen, outPtr),sha3(variantId, inPtr, inLen, outPtr, outLen)), andaes_gcm_seal/aes_gcm_open(notaes_gcm_encrypt/_decrypt) take ONE combinedct||tagoutput buffer with a fixed 96-bit IV and noivLenargument. Also fixed:Target.vectors[]entries for every real ACVP-backed family already end inprompt.json(a file), not a bare directory as the runners assumed —resolveVectorDirnow accepts both shapes. And: ACVP hash files interleave AFT/MCT/LDT test groups and sometimes declare non-byte-aligned bit lengths, neither of which the byte-granular wasm ABI can represent — both are now skipped per-test/group instead of mis-verified into a false FAIL. Net effect measured on the real built tree:verify --pkg packages/front/fw-wasm-cryptogoes from0 verified / 17 skipped / 0 failed(exit 1) to3 verified / 14 skipped / 0 failed(exit 0); the 14 families with no runner at all are still named, once, on stderr.verifyremains a partial cross-check, not the publication gate's evidence — see the README's "verifycoverage" section. -
verifyno longer greens vacuously: a target that could not be verified — no vectors declared,*.wasm.jsnot built, or no declared vector matching a runner — was pushed withpass: true, so the summary counted it as a pass. The tool printed17/17 targets passedand exited 0 while verifying nothing, andpkg-export'sfreshness:wasm-crypto-verifyconsumed that exit code.TargetResultnow carriesskipped; those three paths set it, the table printsSKIP, the summary readsV verified / S skipped / F failed of T targets, and the run exits 1 when 0 of the selected targets ran a vector (--target <name>on a single skipped target included). Thepass: falseload-error path is unchanged — a load error was always a genuine failure. The "no targets defined — nothing to verify" branch keeps exit 0: nothing was asked for, so nothing is owed.
Added
copysubcommand +dist/MANIFEST.sha256drift gate (F6/D3):wasm-crypto copy --pkg <srcPkg> --into <dstDir> [--check] [--target <name>]promotes<srcPkg>/dist/*.{scalar,simd}.wasm(a gitignored build byproduct) into a committed destination and writes<srcPkg>/dist/MANIFEST.sha256— plainsha256sum-style lines, sorted by filename, LF-terminated, always the full currentdist/index.--checknever writes: it compares each manifest row against the committed destination bytes (deliberately manifest-vs-committed-bytes, not fresh-build-vs-committed-bytes — a build-in-CI gate is un-runnable today, see D3 §3.4). Exit 0 applied/no-drift, 1 drift or unmatched--target, 2 config error. The committedpackages/front/fw-wasm-crypto/dist/MANIFEST.sha256was seeded from the currentpackages/front/fw/src/crypto/wasm/*.wasmbytes (22 artifacts; verified byte-identical to the localdist/build, matching the decoupling spike's proof) — force-added sincedist/is gitignored.
Security
- Unpinned toolchain assets are now rejected: the
downloader used to print the computed hash and proceed whenever an asset
carried the
"<fetch-to-fill>"sentinel — a silent supply-chain hole. The sentinel is now the explicit"blocked-pending-rerun", and any asset whosesha256is not a real 64-hex digest throws with the maintainer first-fetch procedure. A maintainer opts in per run withAWA_WASI_SDK_ACCEPT_UNPINNED=1(oracceptUnpinned: true), which then prints the computed hash in pin-table form for committing. A pinned asset with a mismatching hash still always throws. Disposition (D4/F8): 1 of 5 assets pinned honestly (win32-x64); the other 4 carry the sentinel.
Added
build-env/pins.ts: the wasi-sdk pin table, relocated out ofsrc/sources.ts(F4/R5(b)).build-env/is now a self-contained, crypto-free toolchain-acquisition module — a test asserts that nothing underbuild-env/imports fromsrc/**. The pin table is the single source of truth for the SDK version.
Fixed
- B-1 — the SDK asset is streamed to disk instead of being buffered:
downloadWasiSdkstreams the response body to a temp file (hashing on the way), and the archive is gunzipped file→file and extracted from the file. Neither the compressed (~655 MiB) nor the decompressed tree is ever fully held in memory. - B-2 — the tar reader handles the real wasi-sdk archive: GNU long names
(
L/K), pax extended headers (xper-entry,gglobal), the ustarprefixfield, directories (5), symlinks (2) and hardlinks (1); entry names that would escape the destination are refused; on Windows a symlink the OS refuses becomes a file copy with a warning, never a silent skip. This deletes the manual GNU-tar workaround documented inpackages/front/site-kit/vendor/SOURCES.md.
Removed
vendorsubcommand retired: the source-fetch coupling toreferences/CRYPTO-SRCis gone —vendor.tsis deleted, thevendorcase is removed from dispatch/all/help/docs, the 9 crypto entries insrc/sources.tsSOURCESare removed (thewasi-sdktoolchain entry moved tobuild-env/pins.ts, andsrc/sources.tsis deleted), andWasmCryptoConfig.vectorsDir(dead config — no production code ever read it) is removed.--pkg <dir>is now the only input-resolution model; the legacycfg.srcDir-based branch inbuild.ts'sresolveInputsis deleted. Upstream crypto provenance lives in each package's committedvendor/PROVENANCE.json; the NIST/RFC test-vector citation (targets.jsonvectors[],verify.ts) is unaffected. Basis: the decoupling spike (F1/F3/F4/F5), which proved byte-identical rebuilds with thereferences/CRYPTO-SRCdefault removed and 0referencesoccurrences across 20 captured clang invocations.
Changed
- Acquirer reconciliation:
references fetch CRYPTO-SRCis now the canonical acquirer for upstream C sources. The single source of truth isreferences/CRYPTO-SRC/sources.json(managed by thereferencestool).wasm-crypto vendoris retained for KAT validation and NOTICE aggregation workflows but no longer owns the source-set definition. Thevendor.ts/sources.tsbehavior is unchanged here; full migration is deferred to a future batch.