Skip to content

PPC64LE P-384 ECDH: [d]P by four-bit windows - #4719

Merged
alex merged 1 commit into
mainfrom
claude/ppc64le-ecdh-p384
Nov 8, 2026
Merged

alex merged 1 commit into
mainfrom
claude/ppc64le-ecdh-p384

Conversation

@alex

@alex alex commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

Part of #4141 (PPC64LE audit, finding 1). Follows #4715 (P-224) and #4712 (P-256).

vg_ecdh_p384 computed [d]P with the Montgomery ladder (1.83 ms on POWER9, 4.2× OpenSSL). It now uses #4712's four-bit windows, Impl/Ecdsa/PPC64LE/Window.lean, unchanged. P-384's a is also -3; its coordinates are six words.

  • Proof/Ecdsa/PPC64LE/P384/Window.lean: mul_ok on P-384's field and the signature's layout for six words. Slots are 48 bytes. The table holds 16 entries of 144 bytes from bitsAt 6 3 = 5248, ending at 7552, inside the 8192-byte working space. There are 96 windows over the 384 bits of the table of bits. The proof reuses P-256's curve-independent lemmas.
  • Proof/Ecdh/PPC64LE/P384/Verified.lean: win_mulPowOk and the Verified theorem through exchangeWith_ok. Constant time is checked by taint_decide on the new literal.

Like the repository's other P-384 proofs, the new modules set exponentiation.threshold to 512, so that 2 ^ 384 is evaluated.

No TCB or Spec change.

Testing

  • The full lake build, Emit.lean and --check pass. The only crate change is ecdh_p384.rs and its assembly.
  • The static checks and check_lean_public_imports.py pass.
  • The ppc64le tests run in CI.

Benchmark

Benchmarks run 42520501224, with arches=powerpc64, modules=ecdh_p384 and base b7c10de, on POWER9:

Benchmark Base Head Change
ecdh_p384/48 1.83 ms 843.80 µs 53.9% faster

🤖 Generated with Claude Code

https://claude.ai/code/session_01TKUFHH4GefHP3pmPRSL4N4

@github-actions github-actions Bot added the untrusted-only This changes exclusively implementations and proofs, and thus is entirely formally verified. label Nov 8, 2026
@alex
alex force-pushed the claude/ppc64le-ecdh-p224 branch from f7ed1f4 to e3e7b87 Compare November 8, 2026 20:40
@alex
alex force-pushed the claude/ppc64le-ecdh-p384 branch from 53a2d68 to db2861d Compare November 8, 2026 20:40
Base automatically changed from claude/ppc64le-ecdh-p224 to main November 8, 2026 21:18
The windows of P-256's ECDH (Impl/Ecdsa/PPC64LE/Window.lean) on P-384, whose
a is also -3: the proof of Proof/Ecdsa/PPC64LE/P256/Window.lean on P-384's
field and the signature's layout for six-word coordinates (96 windows, the
table of 16 entries of 144 bytes from byte 5248).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TKUFHH4GefHP3pmPRSL4N4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

untrusted-only This changes exclusively implementations and proofs, and thus is entirely formally verified.

Development

Successfully merging this pull request may close these issues.

2 participants