Repository navigation
DSA parameter search over a refillable tape on PPC64LE - #4293
Merged
reaperhulk merged 9 commits intoNov 6, 2026
Merged
Conversation
…awaiting emitted code) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ajQWxFgLnhRDJS1FKU7Ub
…ed attempt) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ajQWxFgLnhRDJS1FKU7Ub
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ajQWxFgLnhRDJS1FKU7Ub
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ajQWxFgLnhRDJS1FKU7Ub
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ajQWxFgLnhRDJS1FKU7Ub
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ajQWxFgLnhRDJS1FKU7Ub
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ajQWxFgLnhRDJS1FKU7Ub
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ajQWxFgLnhRDJS1FKU7Ub
PPC64LE now generates parameters through the refillable search alone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ajQWxFgLnhRDJS1FKU7Ub
This was referenced Nov 5, 2026
reaperhulk
deleted the
claude/unify-random-bytes-crypto-xqmg0z-dsa-ppc64le
branch
November 6, 2026 03:38
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.
Moves PPC64LE's DSA parameter generation to the refill protocol (
Spec/Dsa/ParameterSearch.lean,Spec/Entropy.lean), as #4234 did for x86-64, and deletes PPC64LE's old three-tape function. This is an implementation PR: no change toTCB/orSpec/.Lean
PPC64LE's generation code and proofs are changed in place, so the old controller and its proofs are gone rather than kept next to the new ones.
Impl/Dsa/PPC64LE/Generation.leanvg_dsa_parameter_search(out, out_len, used, rand, rand_len, scratch, scratch_len, state)takes all its arguments in r3–r10, uses a 176-byte stack (as before), and dispatches onstate[1].used/statepointers and result words;fSavemoves from 144 to 200.randat the cursor:min(rand_len − used, 128·p_len). A short window that finds no g asks for more entropy.q_lenoctets left (more entropy), or run the seed at the cursor. The request is x86-64'smin(2·max(avail, 256·p_len), 32769·p_len).vg_dsa_parameter_search_init(state, p_len)writes[4096, p_len, 32769·p_len, 512·p_len].Proofs (
Proof/Dsa/PPC64LE/Gen/)Proof/Dsa/Generation/RefillSeed.leanandRefillSearch.lean:refillAttempt, thesearch_*steps andrequested_requests.Gen/Init.leanproves init, reusinginitWrittenfromProof/Ffdh/PPC64LE/InitCommon.lean.Registrations
Generic/MillerRabin/PPC64LE/DsaParameters.leannow registersparameterSearchApi, still once per Miller–Rabin rounds variant.Artifacts/Dsa/PPC64LE.leanregisters init.Rust
src/dsa/parameters/search.rs(the sharedentropy::servepath) now covers PPC64LE: a baseline-only exhaustive match on the SHA-1/SHA-256 backends. The old PPC64LEselectand its test are removed fromparameters.rs.Size
Checks
lake buildpasses, andEmit.lean --checkpasses with the standard axiom audit.check_lean_public_imports --base origin/main -m <changed>.cargo fmt, plusclippy -D warningson x86-64 and onpowerpc64le-unknown-linux-gnu, pass.Benchmark
Run: https://github.com/pyca/verified-garbage/actions/runs/42113337717 (
arches: powerpc64,modules: dsa, basemain).dsa_generate_parameters/1024dsa_generate_parameters/2048dsa_generate_parameters/3072These differences are not noise. The benchmark feeds a fixed tape (
fixed_tapeinbench/benches/primitives/main.rs). The base splits it into three tapes: seeds, h values, then witnesses. The refill search instead reads seeds, witnesses and h windows from one tape in order. So the same stream gives different seeds and witnesses, and the search does a different amount of work. The same shift appears on every architecture (#4295, #4296, #4297): about 1% less at 1024 bits, 2–3% less at 2048, and 4–6% more at 3072. It measures which candidates this tape yields, not the speed of the code. The other DSA benchmarks run code this PR does not touch, and they move only by noise.🤖 Generated with Claude Code
https://claude.ai/code/session_015ajQWxFgLnhRDJS1FKU7Ub