Repository navigation
brainpoolP512r1 x86-64: verify with [u]G by the signature's comb - #4418
Merged
Merged
Conversation
alex
force-pushed
the
claude/perf-4141-brainpool-verify
branch
from
November 7, 2026 10:20
19d9427 to
b00bbb7
Compare
|
This pull request has conflicts with Posted by |
alex
force-pushed
the
claude/perf-4141-brainpool-verify-512
branch
from
November 7, 2026 11:10
8be00f9 to
b288487
Compare
As brainpoolP256r1's: Cfg.verifyG with the signature's comb for any a (VG_BRAINPOOLP512R1_COMB, 74 additions) for [u]G instead of a 512-bit ladder, the ladder kept for [v]Q; the contract declares the comb's tables. No change to TCB/ or Spec/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHEXYPYjjPyLdLUmbW1
|
This pull request has conflicts with Posted by |
alex
force-pushed
the
claude/perf-4141-brainpool-verify-512
branch
from
November 7, 2026 11:11
b288487 to
f23aaf3
Compare
alex
enabled auto-merge
November 7, 2026 11:13
This was referenced Nov 7, 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.
Part of #4141 (findings: #4141 (comment), "Brainpool ECDSA": brainpoolP512r1 verification 2.3× OpenSSL). It applies #4414's generic
Cfg.verifyG/verifyG_ok(merged) to brainpoolP512r1, with #4413's signing comb (merged), as #4433 did for brainpoolP384r1.What was slow, and why
Verification computed
[u]Gand[v]Qwith two calls ofvg_brainpoolp512r1_mul, a bit-by-bit ladder of complete additions over 512 bits. One call takes ~2.1 ms, so verification took 4.1 ms.What changed
verifyBrainpoolP512r1 := Cfg.verifyG brainpoolp512r1S brainpoolp512r1Comb.[u]Gcomes from the signature's comb (VG_BRAINPOOLP512R1_COMB, 74 additions);[v]Qkeeps the ladder.Proof/Ecdsa/Verify/X86_64/BrainpoolP512r1/Contract.lean) declares the comb's tables (Abi.withConsts brainpoolp512r1S.combConsts: 75776 words), as brainpoolP256r1 x86-64: verify with [u]G by the signature's comb #4414 does for brainpoolP256r1.Verified.leanfollows brainpoolP256r1's:verifyG_okwithbrainpoolp512r1S_ok,brainpoolp512r1S_combandProof.BrainpoolP512r1.combOk7. Constant time is proved by taint tracking with the table's symbol public.No change to
TCB/orSpec/. No new variant, and no Rust source changed: only the generatedecdsa_brainpoolp512r1files.Numbers
Local,
Intel(R) Xeon(R) Processor @ 2.10GHz,cargo bench, all features:ecdsa_brainpoolp512r1_sha512_verify_prehashed/64ecdsa_brainpoolp512r1_sha512_verify/16384Benchmarks workflow (x86_64,
ecdsa_brainpoolp512r1verify groups, with OpenSSL; it measured this commit before the rebase ontomain, which changes no brainpoolP512r1 verification code): https://github.com/pyca/verified-garbage/actions/runs/42360068848The remaining gap to OpenSSL is the ladder for
[v]Q. Closing it needs a public-scalar method for anya(a Jacobian doubling for anyain x86-64's joint framework), which is a separate change.Checks
lake build(all modules),Emit.lean, every Static checks step,check_lean_public_imports.pyon the edited modules, andcargo test --releaseof the brainpool tests with Wycheproof all pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01TKUFHEXYPYjjPyLdLUmbW1