Repository navigation
crypto: dudect_bearssl is printed, not judged, on WASI - #26
Merged
Merged
Conversation
added 2 commits
December 4, 2026 06:36
The owner's decision of 2026-12-04: under wasmtime the timing of dudect_bearssl's cases follows the runner's processor (GitHub's AMD EPYC 9V74 read |t| 30 to 150 on constant_time_equal and 11 to 12 on gcm_seal and ctaes_encrypt), so on a target that defines __wasi__ the program measures every case once, prints it judged=no with a line saying why, and passes; the CI's judge measures none of them again. One rule, case_results made with the reason, replaces base58_decode's wasip2 exception. Native runs, memcheck, MemorySanitizer, dudect_sodium and dudect_secp256k1 keep their verdicts. The tables show dudect on wasip2 for BearSSL, ctaes and secure::constant_time_equal as printed, not judged, with no result (crypto.json's unjudged_checkers).
# Conflicts: # doc/generated/constant-time.adoc # doc/generated/namespace-curves.adoc # doc/llms.txt # doc/tables/crypto.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The owner's decision of 2026-12-04: constant-time timing measurements of BearSSL on WASI targets never again fail CI. On GitHub's hosted AMD EPYC 9V74 runners, wasip2 under wasmtime read |t| 30 to 150 on
constant_time_equaland 11 to 12 ongcm_sealandctaes_encrypt, turning unrelated PRs and main red.The rule (one place):
dudect_test.cppdefinesunjudged_here, a reason string under__wasi__(wasip2, wasip3, any future WASI target), nullptr elsewhere, and makes itstest::case_resultswith it.case_results(dudect.hpp) gains an optional reason: when given, every recorded case is printedjudged=nowhatever its own flag,judges()returns false so each case is measured once (measure_case),print()addsevery case printed, not judged: <why>, and the program exits 0. The CI's judge already measures onlyjudged=yescases again, so it warns and reruns nothing. base58_decode's per-case wasip2 exception is subsumed by the rule.Unchanged: native runs of dudect_bearssl, ctgrind/memcheck, MSan, dudect_sodium and dudect_secp256k1 (their wasip2 exceptions stay).
Tests: dudect_harness gains
unjudged_program(judges(), judged=no line, passes over the threshold). generate_test gains two cases for the newunjudged_checkers.Docs: crypto.json adds the checker
dudect_printed("dudect (printed, not judged: under wasmtime its timing follows the runner's processor)") listed inunjudged_checkers, used for wasip2 of BearSSL's GCM, ChaCha20-Poly1305 and P-256, ctaes andsecure::constant_time_equal; generate.py writes such a checker with no "nothing found". Generated pages regenerated. backends.adoc and testing.adoc state the rule. Spec: webcpporg/proposals#40.Verified locally: wasip2 constant-time lane (all 11 dudect_bearssl cases judged=no, program and judge pass), native constant-time lane in the arm64 Linux container (14 passed, judge exit 0, all cases judged=yes), b2 libs/crypto/doc with rendered-check, generate.py --check and generate_test.py, macOS clang-tidy clean, Linux lint CLEAN.
🤖 Generated with Claude Code