Repository navigation
PPC64LE P-384: public keys and RFC 6979 signatures by the signed seven-bit comb - #4797
Merged
Merged
Conversation
P-384's seven-bit comb (55 windows, the other targets' table, `Impl/P384/CombTable7.lean`) on PPC64LE's generic comb, as P-256's: `[d]G` for `vg_ec_p384_public_key` and `[k]G` for `vg_ecdsa_p384_sign_k`, whose RFC 6979 signature passes the comb's table. The ladder's public key and signature, their literals and their `Verified` are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHJ728Kwktcff5BR2sx
…e comb) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHJ728Kwktcff5BR2sx
alex
enabled auto-merge
November 9, 2026 01:08
This was referenced Nov 9, 2026
This was referenced Nov 9, 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.
Replaces #4787. It's the same change, restacked onto main now that #4793 (P-521) has merged. Part of #4141 (PPC64LE audit, finding 1).
What changes
P-384's
[d]G(vg_ec_p384_public_key) and[k]G(vg_ecdsa_p384_sign_k, the core of the RFC 6979 signature) now use the generic comb (#4729) instead of the Montgomery ladder. The comb uses P-384's table, the one the other targets already share (Impl/P384/CombTable7.lean): 55 windows of seven bits, a 42240-word read-only constant.The files mirror P-256's:
Impl/Ecdsa/P384/PPC64LEComb.lean:p384Comb,p384CombWords,mulGeneratorP384,publicKeyP384CombandsignP384Comb.Proof/P384/PPC64LE/Comb.lean: the comb's configuration (qAt := rfl), andcomb_generator_ok. It needsexponentiation.threshold 512, asProof/P384/Arm/Comb.leandoes.Proof/EcKey/PPC64LE/P384/Comb.leanandProof/Ecdsa/PPC64LE/P384/Comb.lean:Verifiedwith the table as a constant (Abi.withConsts), and constant time bytaint_decidewithtaintSym.cs := p384CombConsts). Its registration requires thatVG_P384_COMBis not one of the HMAC table's function names.Verified.vg_p384_mul, which no P-384 function calls any more (ECDH has its windows, PPC64LE P-384 ECDH: [d]P by four-bit windows #4719), goes from the crate.No TCB or Spec change.
Testing
lake buildandEmit.leanpass on this tree. The only crate changes are P-384's, incrates/verified-garbage-asm-powerpc64le.Benchmark
Benchmarks run 42517206330, scoped to
arches=powerpc64,modules=ec_p384 ecdsa_p384,groups=ec_p384_public_key ecdsa_p384_sha384_sign. Its base is 8c69d0c, an earlier base for the same change, from before the chain and the new field multiplication:ec_p384_public_key/97ecdsa_p384_sha384_sign/64ecdsa_p384_sha384_sign/1024ecdsa_p384_sha384_sign/16384Generated by Claude Code