diff --git a/libraries/crypto/openspec/changes/api-gaps/design.md b/libraries/crypto/openspec/changes/api-gaps/design.md index 14e1de7..93c7ca0 100644 --- a/libraries/crypto/openspec/changes/api-gaps/design.md +++ b/libraries/crypto/openspec/changes/api-gaps/design.md @@ -183,8 +183,9 @@ among neighbours of one shape that a caller composes as the tweaks are. ### D6. dudect's lines, evidence, control and one-case runs - **One line per case, read by a script:** `dudect case= t=<|t| with 2 decimals> - threshold=10 judged=`; `judged=no` only for X25519's agreement on wasip2 (the open - finding). The human line stays. + threshold=10 judged=`; `judged=no` for X25519's agreement on wasip2 (the open + finding) and, since 2026-12-04, for every case of `dudect_bearssl` on a WASI target (As + built). The human line stays. - **Evidence when |t| >= 10:** `largest_t` returns a `t_statistic` with the |t|, the cropping that gave it (`-1` for the whole set, else 0 to 99, and its limit in ns) and each class's count and mean there. The harness prints `dudect evidence case= crop= limit_ns= @@ -303,6 +304,16 @@ from the decisions above, or adds to them: minutes in place of 60, and the judge's own subprocesses 2400 seconds, so the launcher's bound fires first; the step runs unless the job was cancelled. The release notes of 0.1.0 list it under "Tools and build". +- **`dudect_bearssl` is printed, not judged, on WASI (the owner's decision, 2026-12-04).** Under + wasmtime the timing of its cases follows the runner's processor: on GitHub's hosted AMD EPYC + 9V74, wasip2 read |t| 30 to 150 on `constant_time_equal` and 11 to 12 on `gcm_seal` and + `ctaes_encrypt`, failing pull requests and main that changed none of them. On a target that + defines `__wasi__` (wasip2, wasip3 and any later one) the program measures every case once and + prints it `judged=no`, with a line that says why, and passes; the judge measures none of them + again. One rule in the program (`case_results` made with the reason, `unjudged_here` in + `dudect_test.cpp`) replaces the per-case exception of `base58_decode` on wasip2. Its native + runs, memcheck, MemorySanitizer, `dudect_sodium` and `dudect_secp256k1` keep their verdicts. + crypto's tables show the checker on wasip2 as dudect printed and not judged, with no result. - **Open items.** The final measurement pass, after the streams of 2026-11-20 merge, times both wasip2 programs against the 1800-second bound and measures the lane's values on a quiet machine; the hosted constant-time lane's first judged run is read then (`tasks.md` 4.3). diff --git a/libraries/crypto/openspec/changes/api-gaps/specs/crypto/spec.md b/libraries/crypto/openspec/changes/api-gaps/specs/crypto/spec.md index 47d0fcc..e1b860c 100644 --- a/libraries/crypto/openspec/changes/api-gaps/specs/crypto/spec.md +++ b/libraries/crypto/openspec/changes/api-gaps/specs/crypto/spec.md @@ -56,7 +56,7 @@ Each dudect program SHALL print, per case, `dudect case= t= thresho - **THEN** it measures and prints that case alone, and `--case unknown` exits with 2 and lists the names ### Requirement: Constant time: dudect printed, warned and judged on hosted runners -The CI SHALL print every dudect program's output of the constant-time lane and emit a GitHub warning annotation for every case whose |t| is at least 10, `dudect_planted` excepted. On a runner GitHub hosts, a judged case whose |t| is at least 10 SHALL be measured again in two fresh processes, and the lane MUST fail exactly when at least two of the three values are at least 10, naming the case and its three values. On a machine of one's own the lane SHALL judge each program as before, in one process. +The CI SHALL print every dudect program's output of the constant-time lane and emit a GitHub warning annotation for every case whose |t| is at least 10, `dudect_planted` excepted. On a runner GitHub hosts, a judged case whose |t| is at least 10 SHALL be measured again in two fresh processes, and the lane MUST fail exactly when at least two of the three values are at least 10, naming the case and its three values. On a machine of one's own the lane SHALL judge each program as before, in one process. On a WASI target, `dudect_bearssl` SHALL measure and print every case `judged=no` and judge none of them, wherever it runs, so that neither the program nor the judge fails on its values there; its native runs, memcheck, MemorySanitizer and the other dudect programs keep their verdicts. #### Scenario: One noisy process - **WHEN** on a hosted runner `chacha_open` reads 69.8 and its two fresh runs read 3.1 and 2.7 @@ -66,6 +66,10 @@ The CI SHALL print every dudect program's output of the constant-time lane and e - **WHEN** on a hosted runner `equal` reads 14.0, then 12.5 and 3.0 in its fresh runs - **THEN** the lane fails, naming `equal` and the three values +#### Scenario: BearSSL's cases under wasmtime +- **WHEN** `dudect_bearssl` runs on wasip2 and `constant_time_equal` reads 150 +- **THEN** it prints `dudect case=constant_time_equal t=150.00 threshold=10 judged=no` and a line saying no case is judged on WASI, exits 0, and the judge warns and measures nothing again + ## MODIFIED Requirements ### Requirement: Block cipher: BearSSL has none, and aes256 has no default of its own