Skip to content

Commit a27829e

Browse files
committed
Add wasm browser runtime smoke evidence
1 parent 1c3fe5a commit a27829e

14 files changed

Lines changed: 188 additions & 34 deletions

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
plus Standard and URL-safe deterministic length sweeps, independent scalar
1212
reference encode checks, malformed-input rejection, and public API round
1313
trips.
14+
- Added Chromium-family browser runtime smoke evidence for the same admitted
15+
wasm `simd128` profile.
1416
- Added a fail-closed wasm encode scalar-verification step: fixed-block wasm
1517
encode output is staged, compared against scalar output, wiped, and only then
1618
copied to caller output.

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ binary is compiled with `target-feature=+simd128`, the `simd` feature, and the
4949
explicit `allow-wasm32-best-effort-wipe` feature.
5050

5151
The latest patch in this line is `1.3.3`, which admits narrow wasm `simd128`
52-
runtime dispatch with Node/V8 and Wasmtime smoke evidence, keeps the wasm
53-
cleanup caveat fail-closed by default, and adds wrapped-profile helper
54-
ergonomics. The workspace crate family stays version-aligned at `1.3.3`.
52+
runtime dispatch with Node/V8, Wasmtime, and Chromium-family browser smoke
53+
evidence, keeps the wasm cleanup caveat fail-closed by default, and adds
54+
wrapped-profile helper ergonomics. The workspace crate family stays
55+
version-aligned at `1.3.3`.
5556

5657
Implemented on this branch now:
5758

@@ -107,9 +108,9 @@ Implemented on this branch now:
107108
- Runtime-dispatched wasm `simd128` fixed-block encode and normal strict
108109
decode for Standard and URL-safe alphabets when built for `wasm32` with
109110
`target-feature=+simd128`, `simd`, and
110-
`allow-wasm32-best-effort-wipe`. The admission is backed by Node/V8 and
111-
Wasmtime runtime smoke evidence; unsupported wasm builds stay scalar by
112-
compiling without `+simd128`.
111+
`allow-wasm32-best-effort-wipe`. The admission is backed by Node/V8,
112+
Wasmtime, and Chromium-family browser runtime smoke evidence; unsupported
113+
wasm builds stay scalar by compiling without `+simd128`.
113114
- Optional `base64-ng-sanitization` companion crate for applications that
114115
already admit `sanitization` and want direct CT decode helpers into
115116
clear-on-drop secret containers.

docs/CRATE_VERSION_MATRIX.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ sets.
88
## 1.3.3 Release Plan
99

1010
The `1.3.3` release keeps the workspace crate family synchronized. The main
11-
crate carries the narrow wasm `simd128` runtime-dispatch admission, Node/V8 and
12-
Wasmtime smoke evidence, release-gated wasm codegen evidence, and
13-
wrapped-profile helper ergonomics. Companion crates
11+
crate carries the narrow wasm `simd128` runtime-dispatch admission, Node/V8,
12+
Wasmtime, and Chromium-family browser smoke evidence, release-gated wasm
13+
codegen evidence, and wrapped-profile helper ergonomics. Companion crates
1414
receive synchronized package metadata so downstream users see one coherent
1515
crate-family version.
1616

docs/PLAN.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,6 +1059,9 @@ inside the `1.3.x` line if they remain evidence-gated and do not weaken the
10591059
execute it under Node/V8 and Wasmtime, requiring `wasm-simd128` candidate,
10601060
active encode, and active decode backend reporting plus Standard and
10611061
URL-safe public API round trips.
1062+
- Add `scripts/check_wasm_browser_dispatch.sh` to execute the same smoke module
1063+
in a Chromium-family browser when available, without turning the admission
1064+
into a browser-wide claim.
10621065
- Keep wasm wipe behavior fail-closed unless callers explicitly enable
10631066
`allow-wasm32-best-effort-wipe`.
10641067
- Document JIT, runtime, timing, and zeroization caveats without implying

docs/RELEASE_EVIDENCE.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ The release gate runs:
7474
when installed, requiring `wasm-simd128` active encode/decode reporting and
7575
Standard plus URL-safe deterministic length sweeps, independent scalar
7676
reference encode checks, malformed-input rejection, and round trips
77+
- wasm simd128 browser smoke evidence through
78+
`scripts/check_wasm_browser_dispatch.sh`, which executes the same wasm32
79+
smoke module in a Chromium-family browser when installed or when
80+
`BASE64_NG_BROWSER` points to a compatible browser binary
7781
- fail-closed unsupported-native wipe policy documented through
7882
`allow-compiler-fence-only-wipe` for architectures without an implemented
7983
hardware wipe barrier
@@ -306,8 +310,9 @@ active for Standard and URL-safe alphabets. Big-endian AArch64 stays scalar,
306310
and 32-bit ARM NEON remains scaffold evidence. Wasm `simd128` evidence is kept
307311
in `scripts/check_simd_feature_bundles.sh` as compile/test-binary evidence and
308312
in `scripts/check_wasm_runtime_dispatch.sh` as Node/V8 and Wasmtime runtime
309-
smoke evidence. Runtime/JIT timing behavior remains outside the crate's formal
310-
claim. The script writes
313+
smoke evidence, and in `scripts/check_wasm_browser_dispatch.sh` as
314+
Chromium-family browser smoke evidence. Runtime/JIT timing behavior remains
315+
outside the crate's formal claim. The script writes
311316
`target/release-evidence/backend/MANIFEST.txt`, `runtime-backend-report.txt`,
312317
and `simd-prototype-equivalence.txt` so local CPU evidence can be archived. The
313318
manifest labels prototype-only evidence as `real-non-dispatchable` and

docs/SIMD.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,11 @@ runtime behavior for that line.
193193
whole-input scalar validation. Custom alphabets remain scalar because
194194
portable wasm SIMD does not provide a direct 64-byte alphabet lookup.
195195
Wasm encode stages vector output and compares it against scalar output before
196-
copying to caller output. Node/V8 and Wasmtime runtime smoke evidence proves
197-
active backend reporting, deterministic length sweeps, independent scalar
198-
reference encode checks, malformed-input rejection, and round trips for the
199-
admitted profile; this is not a browser-wide timing, register-retention, or
200-
cleanup guarantee. The release-facing decision is
196+
copying to caller output. Node/V8, Wasmtime, and Chromium-family browser runtime smoke evidence proves active backend reporting, deterministic length
197+
sweeps, independent scalar reference encode checks, malformed-input
198+
rejection, and round trips for the admitted profile; this is not a
199+
browser-wide timing, register-retention, or cleanup guarantee. The
200+
release-facing decision is
201201
tracked in
202202
[WASM_SIMD128_RUNTIME_REVIEW.md](WASM_SIMD128_RUNTIME_REVIEW.md).
203203
- `runtime::backend_report()` reports the active backend, detected candidate,
@@ -279,7 +279,8 @@ compiles under `no_std` when the corresponding Rust targets are installed. For
279279
wasm `simd128`, it also builds the wasm test binaries with `simd128` enabled so
280280
the admitted fixed-block wasm code is checked; runtime execution is covered by
281281
`scripts/check_wasm_runtime_dispatch.sh` when Node/V8 and Wasmtime are
282-
installed.
282+
installed, and by `scripts/check_wasm_browser_dispatch.sh` when a
283+
Chromium-family browser is installed.
283284

284285
Capture local backend and prototype evidence:
285286

docs/SIMD_ADMISSION.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,14 @@ side-channel evidence package.
6767
For the `1.3.3` line, wasm `simd128` is admitted for runtime dispatch when the
6868
binary is compiled for `wasm32` with `target-feature=+simd128`, the `simd`
6969
feature, and the explicit `allow-wasm32-best-effort-wipe` feature. The
70-
admitted runtime profile is backed by Node/V8 and Wasmtime runtime smoke
71-
evidence.
70+
admitted runtime profile is backed by Node/V8, Wasmtime, and Chromium-family
71+
browser runtime smoke evidence.
7272

7373
This is a narrow admission, not a browser-wide or runtime-universal claim.
7474
Wasm execution passes through runtime/JIT engines outside the crate's control,
7575
so timing, register-retention, cleanup, fallback, and performance claims remain
76-
limited to the evidence named in this release. The wasm32 wipe policy remains
76+
limited to the evidence named in this release. Broader browser claims remain
77+
out of scope until separately evidenced. The wasm32 wipe policy remains
7778
fail-closed unless callers explicitly enable `allow-wasm32-best-effort-wipe`.
7879

7980
The detailed runtime decision is tracked in
@@ -123,7 +124,7 @@ State labels are intentionally strict:
123124
| AVX2 | admitted backend | `avx2` | std x86/x86_64 runtime-dispatched encode and strict decode for Standard and URL-safe alphabet families; encode uses fixed 24-byte input blocks, and decode uses fixed 32-byte encoded blocks only after whole-input scalar validation preserves public error shape; shorter inputs fall back to SSSE3/SSE4.1 or scalar, tails use scalar, and unsupported alphabets, in-place encode/decode, wrapped decode, legacy decode, CT secret decode, line-ending insertion, and `no_std` use scalar fallback |
124125
| SSSE3/SSE4.1 | admitted backend | `ssse3`, `sse4.1` | std x86/x86_64 runtime-dispatched encode and strict decode for Standard and URL-safe alphabet families; encode uses fixed 12-byte input blocks, and decode uses fixed 16-byte encoded blocks only after whole-input scalar validation preserves public error shape; shorter inputs, tails, unsupported alphabets, in-place encode/decode, wrapped decode, legacy decode, CT secret decode, line-ending insertion, and `no_std` use scalar fallback |
125126
| NEON | admitted backend | `neon` | little-endian std aarch64 runtime-dispatched encode and strict decode for Standard and URL-safe alphabet families; encode uses fixed 12-byte input blocks, and decode uses fixed 16-byte encoded blocks only after whole-input scalar validation preserves public error shape; shorter inputs, tails, unsupported alphabets, big-endian AArch64, 32-bit ARM, in-place encode/decode, wrapped decode, legacy decode, CT secret decode, line-ending insertion, and `no_std` use scalar fallback |
126-
| wasm `simd128` | admitted backend | `simd128` | wasm32 runtime-dispatched encode and strict decode for Standard and URL-safe alphabet families when compiled with `target-feature=+simd128`, the `simd` feature, and `allow-wasm32-best-effort-wipe`; wasm encode stages vector output and compares it against scalar output before copying to caller output; Node/V8 and Wasmtime runtime smoke evidence proves active encode/decode reporting, a deterministic length sweep, independent scalar reference encode checks, malformed-input rejection, and round trips; shorter inputs, tails, unsupported alphabets, in-place encode/decode, wrapped decode, legacy decode, CT secret decode, line-ending insertion, and browser-specific claims remain scalar, out of scope, or separately reviewed |
127+
| wasm `simd128` | admitted backend | `simd128` | wasm32 runtime-dispatched encode and strict decode for Standard and URL-safe alphabet families when compiled with `target-feature=+simd128`, the `simd` feature, and `allow-wasm32-best-effort-wipe`; wasm encode stages vector output and compares it against scalar output before copying to caller output; Node/V8, Wasmtime, and Chromium-family browser runtime smoke evidence proves active encode/decode reporting, a deterministic length sweep, independent scalar reference encode checks, malformed-input rejection, and round trips; shorter inputs, tails, unsupported alphabets, in-place encode/decode, wrapped decode, legacy decode, CT secret decode, line-ending insertion, and broader browser-specific claims remain scalar, out of scope, or separately reviewed |
127128

128129
## Encode Surface Review
129130

docs/UNSAFE.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,9 +1240,10 @@ Safety argument:
12401240
Limitations:
12411241

12421242
- Wasm engines include a runtime/JIT optimization layer outside Rust's compiler
1243-
boundary. This admission is backed by Node/V8 and Wasmtime runtime smoke
1244-
evidence for correctness and dispatch reporting, but it does not claim
1245-
runtime timing, register-retention, or JIT zeroization guarantees.
1243+
boundary. This admission is backed by Node/V8, Wasmtime, and
1244+
Chromium-family browser runtime smoke evidence for correctness and dispatch
1245+
reporting, but it does not claim runtime timing, register-retention, or JIT
1246+
zeroization guarantees.
12461247

12471248
### `encode_12_bytes_wasm_standard_family`
12481249

docs/WASM_SIMD128_RUNTIME_REVIEW.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ The admitted runtime profile is intentionally narrow:
1717
- full fixed blocks use `simd128`; tails and unsupported surfaces use scalar
1818
- no line-wrapped decode, legacy whitespace decode, custom alphabets,
1919
bcrypt-style profiles, in-place decode, or `ct` secret decode
20-
- runtime smoke evidence is required for Node/V8 and Wasmtime
20+
- runtime smoke evidence is required for Node/V8, Wasmtime, and at least one
21+
Chromium-family browser
2122

2223
When compiled with `simd128`, active encode and decode backends are `wasm-simd128`
2324
on `wasm32`.
@@ -29,6 +30,9 @@ The admission is backed by:
2930
- `scripts/check_wasm_runtime_dispatch.sh`, which builds a `cdylib` smoke
3031
module with `RUSTFLAGS='-C target-feature=+simd128'` and executes it under
3132
Node/V8 and Wasmtime.
33+
- `scripts/check_wasm_browser_dispatch.sh`, which executes the same smoke
34+
module in a Chromium-family browser through synchronous browser
35+
`WebAssembly.Module` instantiation.
3236
- The smoke checks `runtime::backend_report()` and requires candidate, active
3337
encode, and active decode backend reporting to be `wasm-simd128`.
3438
- The smoke runs a deterministic length sweep from 0 through 200 bytes with
@@ -49,7 +53,7 @@ Wasm execution still includes a runtime or JIT layer outside the Rust compiler
4953
and outside this crate's control. This admission proves correctness and
5054
dispatch behavior for the named runtime smoke profile; it does not claim:
5155

52-
- browser-wide behavior
56+
- browser-wide behavior beyond the named Chromium-family smoke runtime
5357
- runtime/JIT timing behavior for every V8, SpiderMonkey, Wasmtime, Wasmer, or
5458
edge-compute deployment
5559
- hardware register-retention cleanup guarantees after the wasm runtime lowers
@@ -85,6 +89,9 @@ provide:
8589
documentation, the admission manifest, and the runtime boundary.
8690
- `scripts/check_wasm_runtime_dispatch.sh` executes the runtime smoke under
8791
Node/V8 and Wasmtime when the tools are installed.
92+
- `scripts/check_wasm_browser_dispatch.sh` executes the same runtime smoke in
93+
a Chromium-family browser when Chrome/Chromium is installed or
94+
`BASE64_NG_BROWSER` points to a compatible browser binary.
8895
- `scripts/check_simd_feature_bundles.sh` keeps compile/test-binary evidence
8996
for `wasm32-unknown-unknown` with `target-feature=+simd128` when the target
9097
is installed.

release-notes/RELEASE_NOTES_1.3.3.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ wasm `simd128` runtime-dispatch profile with explicit runtime smoke evidence.
1313
candidate, active encode, and active decode backend reporting plus Standard
1414
and URL-safe deterministic length sweeps, independent scalar reference
1515
encode checks, malformed-input rejection, and public API round trips.
16+
- Added Chromium-family browser runtime smoke evidence for the same admitted
17+
wasm `simd128` profile.
1618
- Added fail-closed scalar verification for wasm fixed-block encode before
1719
copying staged SIMD output to caller output.
1820
- Added release-gated wasm SIMD codegen evidence through
@@ -26,9 +28,11 @@ wasm `simd128` runtime-dispatch profile with explicit runtime smoke evidence.
2628

2729
## Security Notes
2830

29-
- Wasm `simd128` is admitted only for the named Node/V8 and Wasmtime smoke
30-
profile and the narrow Standard/URL-safe encode plus strict-decode surface.
31-
- Browser-wide behavior, runtime/JIT timing behavior, and performance claims
32-
remain out of scope until separately evidenced.
31+
- Wasm `simd128` is admitted only for the named Node/V8, Wasmtime, and
32+
Chromium-family browser smoke profiles and the narrow Standard/URL-safe
33+
encode plus strict-decode surface.
34+
- Browser-wide behavior beyond the named Chromium-family runtime,
35+
runtime/JIT timing behavior, and performance claims remain out of scope
36+
until separately evidenced.
3337
- The default wasm cleanup policy remains fail-closed unless
3438
`allow-wasm32-best-effort-wipe` is explicitly enabled.

0 commit comments

Comments
 (0)