Repository navigation
AArch64 Brainpool-P384: sign with the fixed-base comb - #4512
Merged
Merged
Conversation
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-P384 signing on AArch64 currently computes the nonce point with the general scalar multiplier. Use the existing 7-bit fixed-base tables and complete general-curve comb instead: 55 additions per nonce candidate. This ports the organization of x86-64 #4425 using the AArch64 comb already used for Brainpool-P256.
The existing shared table certificate is reused. The arithmetic, ABI, constant-time behavior and RFC 6979 composition are proved; no changes to the TCB, specs, public API, per-key storage or 8 KiB workspace. The new table adds 330 KiB of shared read-only data. Verification, ECDH and public-key derivation retain their existing implementations.
M1 Max, macOS 27.2, Rust 1.99.0 / LLVM 23.1.1, OpenSSL 4.0.3, normal CPU detection. Production comparison against main
da38ca4f448b8005809e90c433f168491f907a3a, implementation335bd82bbc4e972a57ec7b9a16c29e0664378ed4:The repository harness ran three interleaved rounds and three fresh binary copies, with 25 samples, 0.3 s warm-up and 1 s measurement per case, reporting the fastest per-round median and fastest copy. Copy spread was 0.0–0.1%. OpenSSL ran once for reference. The 1 KiB fixed message takes another deterministic nonce attempt on both VG revisions; the optimization preserves the retry policy. These are steady-state API timings, including hashing where applicable.
bench_compare.pynow includes these signing groups in its fresh-copy handling because they read a large comb table. Measurement artifacts remain outside the repository.Scoped native N2 comparison passed, with three interleaved rounds and three fresh binary copies:
The N2 reference is OpenSSL 3.5.5 (the runner system library), distinct from the local M1 OpenSSL 4.0.3. N2 copy spread was 0.0–0.2%; the harness reports the fastest copy/round, and OpenSSL ran once for reference. See the linked run for exact runner/toolchain/reference-library metadata.
Validation on the rebased head:
lake build(28,606 jobs), full emission andEmit.lean --check; all artifact audits pass. Refreshed the CI cache at rebase.VG_CPU_FEATURES=none.