Repository navigation
Conversation
PPC64LE's RFC 6979 wrapper now takes a core with tables of constants (`Core.cs`), as x86-64's does: the contract and layout carry the tables' regions, `core`'s call gives them (`CoreTables`), the two runs' layouts agree on the tables' addresses (`csSyms`), and the contract with the tables (`specK T cs vs`) is satisfiable with the table in memory (`sat_one`). `vg_ecdsa_p256_sign_k` is now `p256.signWith mulGeneratorP256`, the comb as the generator of the signature's stages (`signWith_ok`), and P-256's RFC 6979 signature calls it with the comb's table. The ladder's signature, its literal and its `Verified` are gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHJ728Kwktcff5BR2sx
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHJ728Kwktcff5BR2sx
This was referenced Nov 8, 2026
|
This pull request has conflicts with Posted by |
Member
Author
|
Replaced by #4732: the same change, restacked onto #4729 (which replaced #4675). Generated by Claude Code |
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). Stacked on #4675, so it stays a draft until that merges.
What changes
vg_ecdsa_p256_sign_k, the core ofvg_ecdsa_p256_sign(RFC 6979), now computes[k]Gwith #4675's comb instead of the Montgomery ladder:signP256Comb = p256.signWith mulGeneratorP256.Core.cs), as x86-64's already does:rfcPPC … cs) and the layout (Lay.cs,TBLs) carry the tables' regions.CoreTables,corePre,coreCall).csSyms).specK T cs vs, is satisfiable with the table in memory (sat_one).cs := [], and their proofs are otherwise unchanged.Proof/Ecdsa/PPC64LE/P256Comb.lean: the signature by the comb meetssignContractwith the table as a constant (Abi.withConsts). Correctness comes fromsignWith_okwithcomb_generator_ok. Constant time usestaint_decidewithtaintSym, which makes the table's address public.VG_P256_COMBis not one of the HMAC table's function names.signP256), its literal and itsVerified, which nothing else uses.combSatMemmoves toProof/P256/PPC64LE/Comb.lean, where the public key and the signature share it.No TCB or Spec change.
Testing
lake buildandEmit.leanpass. The only crate change isinternal/vg_ecdsa_p256_sign_kincrates/verified-garbage-asm-powerpc64le.check_lean_public_imports.pypass, and so doescargo fmt --check.Benchmark
Benchmarks run 42515542591, scoped to
arches=powerpc64,modules=ecdsa_p256,groups=ecdsa_p256_sha256_sign, with base 2d9b293 (#4675's head):ecdsa_p256_sha256_sign/64ecdsa_p256_sha256_sign/1024ecdsa_p256_sha256_sign/16384🤖 Generated with Claude Code
https://claude.ai/code/session_01TKUFHJ728Kwktcff5BR2sx