Repository navigation
ECDSA: remove dead declarations and modules - #4314
Merged
reaperhulk merged 3 commits intoNov 6, 2026
Merged
Conversation
…nding) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015ajQWxFgLnhRDJS1FKU7Ub
…1 Checks The deleted PackedTiming module had passed them on. 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
reaperhulk
deleted the
claude/unify-random-bytes-crypto-xqmg0z-ecdsa-dead-code
branch
November 6, 2026 16:40
This was referenced Nov 6, 2026
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.
Like #4305 for DSA, this removes every ECDSA proof and implementation declaration that nothing reachable uses: 2,077 declarations, including 109 whole modules.
Spec/,TCB/,src/or the generated crates changes.Emit.lean --checkpasses, so the emitted code is identical.Spec/Ecdsadefinitions (0 of 64).388 files, +143 / −26,290.
How "dead" was decided
.ileanfiles of a full build.Artifacts/,Generic/,Variants/,TCB/andVerifiedGarbageTest/;*.leanfiles import..ileanfiles don't record:rw_lit,lit_decideandtaint_decidelook upmaterialize_*literals by name. So every module-level command in a module the roots import is live, along with the code it materializes, and Lit modules that live code imports are kept.Proof/Ecdsa/Verify/AArch64/JacChecksstays, with only itsjac_field_ct/jac_reg_cttactics.The literal rule was added for this PR. I also re-checked #4305 against it: nothing #4305 removed would have been kept.
Removed
Proof/Ecdsa/andImpl/Ecdsa/.*_ctand*_wplemmas.Verifiedproofs of routines that no registration exports. Each is a proof that an internal routine would satisfy a public contract if it were exported on its own. No registration file exports any of them on any target; they are reached only as internal callees, whose correctness and constant-time proofs stay. The emitted functions are unchanged. They include:sign_verified,Inverse.{p,n}_verifiedandMul.mul_verifiedon x86, x86-64, AArch64 and ARMv7;mul_verifiedandsign_verifiedon RISC-V;Mul.mul_verifiedon PPC64LE;verify_verifiedandjointVerify_verified.Outside the ECDSA directories:
Generic/<Curve>/<Target>/Ecdsa*.lean) only drop imports of deleted modules (check_registrationspasses).Proof/Ecdh/Arm/Validate.leanrewords one doc comment that named a removed declaration.Other edits that come with the removal:
Umaalmodules and AArch64 P-521Checksnow import directly what deleted modules used to pass on.open … in,omit … in, emptysections and namespace blocks are removed.Kept on purpose
Proof/Ecdsa/X86/CombVerifiedandProof/Ecdsa/Verify/X86/WindowPrep, whichGeneric/P256/X86/EcP256andEcdhP256import, with everything they use.invFnX_gpr, which ECDH'sCheckFn.correctuses.Impl.Weierstrass.Arm.mulGenerator{P224,P256,P384,BrainpoolP256r1}, which the WeierstrassCombLitmodules materialize.Checks
Lean:
lake buildpasses;Emit.lean --checkpasses with the standard axiom audit;check_lean_public_imports --base 402c926c1bpasses on the modified modules.Static checks: every step passes.
Rust:
cargo fmt --checkandcargo clippy --all-targets -- -D warningspass. No Rust changed.No escape hatches: nothing adds
sorry,native_decide,bv_decideormaxHeartbeats.After merging current
main(445 Lean files changed upstream, none under ECDSA):The CI Lean build on the merge commit is the final check.
No benchmark: the emitted code is unchanged.
Generated by Claude Code