Repository navigation
Conversation
brainpoolP256r1's and brainpoolP384r1's seven-bit combs (37 and 55 windows, the other targets' tables, `Impl/<Curve>/CombTable7.lean`) on PPC64LE's generic comb, as P-384's (#4700): `[d]G` for `vg_ec_<curve>_public_key` and `[k]G` for `vg_ecdsa_<curve>_sign_k`, whose RFC 6979 signature passes the comb's table. The ladder's public keys and signatures, their literals and their `Verified` are gone. `Proof/<Curve>/Comb7Shape.lean` proves the tables' shape once, with no target. The crates follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHFbSpgWBYWAsEnfUks
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHFbSpgWBYWAsEnfUks
Regenerated with the full emitter on #4754. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHFbSpgWBYWAsEnfUks
…e of its own Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHFbSpgWBYWAsEnfUks
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 (the PPC64LE audit). This PR replaces #4743, restacked onto #4754 (P-256's signatures by the comb, on #4752's inversion chain). It stays a draft until #4754 merges.
#4743's Lean commits are cherry-picked unchanged. On this base the comb proofs build with the inversion chain as they are. The crate was regenerated with the full emitter on this base. One more commit adds the
-- separate module:line to the twoComb7Shape.leanfiles, whichcheck_lean_single_importer.pyasks for.On PPC64LE,
[d]G(public keys) and[k]G(RFC 6979 signatures) for brainpoolP256r1 and brainpoolP384r1 used the Montgomery ladder, one double, add and select per bit. They now use the fixed-base signed seven-bit comb (Impl/Weierstrass/PPC64LE/TComb.lean), as P-256 and P-384 do. brainpoolP512r1 is #4753, on the comb with the addition inlined.What changes
The per-curve files are P-384's with the curve's names and sizes. Nothing shared changes: TComb, the RFC 6979 wrapper, the README tables, the dispatch and the variants all stay as they are.
Impl/Ecdsa/<Curve>/PPC64LEComb.lean: the comb's configuration, built on the curve's ladder layout, with the other targets' tables (Impl/<Curve>/CombTable7.lean, with 37 and 55 windows). AlsopublicKey<Curve>Combandsign<Curve>Comb.Proof/<Curve>/PPC64LE/Comb.lean: the layout andConfig, the table's words, andcomb_generator_ok, i.e. the comb as the stages' generator. The complete addition takesafrom memory, so brainpool'sa ≠ −3needs nothing special.Proof/<Curve>/Comb7Shape.lean(new, target-independent): the tables' length and rows, asProof/P384/Comb7Shape.lean.Proof/EcKey/PPC64LE/<Curve>/Comb{,Lit}.leanandProof/Ecdsa/PPC64LE/<Curve>/Comb{,Lit}.lean: correctness, constant time (taint_decide, with the table's address public) andVerified, with the table as a constant (Abi.withConsts).cs), and the registration requires thatVG_<CURVE>_COMBis not one of the HMAC table's names.Verified. Nothing else used them.No TCB, Spec or Rust change. The crate changes are
crates/verified-garbage-asm-powerpc64leonly: the two curves' modules,internal/vg_ecdsa_<curve>_sign_k, and the newconsts/vg_<curve>_comb.rs.Testing
lake buildandEmit.leanpass, and the full emitter's output is committed.Benchmark
Measured on #4711, whose comb code this is: Benchmarks run 42519119906, with
arches=powerpc64, the two curves' public-key and signing groups, and base8c69d0ca(the ladder).ec_brainpoolp256r1_public_key/65ec_brainpoolp384r1_public_key/97ecdsa_brainpoolp256r1_sha256_sign/64ecdsa_brainpoolp256r1_sha256_sign/1024ecdsa_brainpoolp256r1_sha256_sign/16384ecdsa_brainpoolp384r1_sha384_sign/64ecdsa_brainpoolp384r1_sha384_sign/1024ecdsa_brainpoolp384r1_sha384_sign/16384That run predates this base's inversion chain (#4752), which this PR doesn't change. I haven't measured on this base.
🤖 Generated with Claude Code
https://claude.ai/code/session_01TKUFHFbSpgWBYWAsEnfUks