Repository navigation
AArch64 Brainpool-P512 signing with a fixed-base comb - #4515
Merged
Merged
Conversation
|
This pull request has conflicts with Posted by |
reaperhulk
force-pushed
the
codex/arm64-brainpool512-comb
branch
from
November 7, 2026 20:07
e4006b6 to
1513e86
Compare
reaperhulk
enabled auto-merge
November 7, 2026 20:07
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.
Brainpool-P512 signing on AArch64 currently computes nonce points with the general scalar multiplier. Use the existing shared 7-bit fixed-base comb table and AArch64 complete general-curve comb instead: 74 additions per nonce candidate, following x86-64 #4425.
Rebased onto
079a361738dc8ae4273d37114e38fdf15ae6fbd6after #4512 merged. This PR contains only the P512 change. The existing shared table certificate is reused, with arithmetic, ABI, constant-time and RFC 6979 composition proofs. No TCB/spec/public-API changes. The shared read-only table adds 592 KiB; per-key storage and the 8 KiB workspace stay unchanged. Verification, ECDH and public-key derivation retain their existing paths.M1 Max, macOS 27.2, Rust 1.99.0 / LLVM 23.1.1, OpenSSL 4.0.3, normal CPU detection. Production comparison against
335bd82bbc4e972a57ec7b9a16c29e0664378ed4(which leaves P512 unchanged), measured implementatione4006b65a0df22b0c87d98389547f9e081c6d2cf:Three interleaved rounds and three fresh binary copies, 25 samples, 0.3 s warm-up, 1 s measurement per case; the repository harness reports the fastest per-round median and fastest copy. Copy spread: 0.1–0.4% for parent, 0.5–0.9% for head. OpenSSL ran once for reference. The 64-byte fixed message takes an extra deterministic nonce attempt on both VG versions; the retry policy is preserved. These are steady-state API timings, including hashing where applicable.
The benchmark harness includes P512 signing in fresh-copy handling for its large comb table. No measurement artifacts are committed.
Validation:
Emit.lean --check, including all artifact audits. The P512 implementation, proofs and generated signing code/table are unchanged from the measured revision.VG_CPU_FEATURES=none.Scoped native N2 benchmark passed. N2 reference: OpenSSL 3.5.5, the runner system library.
Three interleaved rounds and three fresh binary copies. N2 head copy spread was 4.7–5.4%, versus 0.1% for parent; these are the harness's fastest-copy/round results. The improvement remains large for every measured copy. OpenSSL ran once for reference; exact runner and toolchain metadata are in the linked run.