Repository navigation
PPC64LE P-224 ECDH: [d]P by four-bit windows - #4715
Merged
Merged
Conversation
The windows of P-256's ECDH (Impl/Ecdsa/PPC64LE/Window.lean) on P-224, whose coordinates are also four words and whose a is also -3: the proof of Proof/Ecdsa/PPC64LE/P256/Window.lean on P-224's field, reusing its curve-independent lemmas. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHH4GefHP3pmPRSL4N4
alex
force-pushed
the
claude/ppc64le-ecdh-p224
branch
from
November 8, 2026 20:40
f7ed1f4 to
e3e7b87
Compare
alex
marked this pull request as ready for review
November 8, 2026 20:40
This was referenced Nov 8, 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 (PPC64LE audit, finding 1). Follows #4712.
vg_ecdh_p224computed[d]Pwith the Montgomery ladder (759 µs on POWER9, 5.4× OpenSSL). It now uses #4712's four-bit windows,Impl/Ecdsa/PPC64LE/Window.lean, unchanged. P-224's coordinates are four words and itsais-3, the same as P-256's, so the layout and the formulas are the same.Proof/Ecdsa/PPC64LE/P224/Window.lean:mul_okon P-224's field. It is P-256's proof with the curve and the field swapped, and it reuses P-256's curve-independent lemmas (ofN_ok,wstep, the nibble's arithmetic, the masks). RISC-V likewise has one window proof per curve.Proof/Ecdh/PPC64LE/P224/Verified.lean:win_mulPowOkand theVerifiedtheorem throughexchangeWith_ok. Constant time is checked bytaint_decideon the new literal.No TCB or Spec change.
Testing
lake build,Emit.leanand--checkpass. The only crate change isecdh_p224.rsand its assembly.check_lean_public_imports.pypass.Benchmark
Benchmarks run 42519884818, with
arches=powerpc64,modules=ecdh_p224and base b7c10de, on POWER9:ecdh_p224/28The base side of this run was noisy. The audit's run measured the base at 759 µs, so the change is about 46% faster against that figure. P-256's ECDH, with the same layout, went from 873.6 µs to 412.6 µs in #4712's run.
🤖 Generated with Claude Code
https://claude.ai/code/session_01TKUFHH4GefHP3pmPRSL4N4