Repository navigation
Conversation
P-224's seven-bit comb (the 32 windows of the other targets' table, `p224Comb7x32`) on PPC64LE's generic comb, as P-256's: `[d]G` for `vg_ec_p224_public_key` and `[k]G` for `vg_ecdsa_p224_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
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 #4759. It's the same change, restacked onto #4771 (P-256 signing, on
main). Part of #4141 (PPC64LE audit, finding 1). It stays a draft until #4771 merges, and it doesn't depend on the P-384 or P-521 PRs.What changes
P-224's
[d]G(vg_ec_p224_public_key) and[k]G(vg_ecdsa_p224_sign_k, the core of the RFC 6979 signature) now use the generic comb (#4729) instead of the Montgomery ladder. The comb uses the 32 windows of P-224's shared table (p224Comb7x32), as 32-bit ARM's does: a 16384-word read-only constant.The files mirror P-256's:
Impl/Ecdsa/P224/PPC64LEComb.lean:p224Comb,p224CombWords,mulGeneratorP224,publicKeyP224CombandsignP224Comb.Proof/P224/PPC64LE/Comb.lean: the configuration, the table's shape (p224Comb7x32_length,_rows), andcomb_generator_ok. The ladder's table of bits covers 256 bits; the comb reads its first 224.Proof/EcKey/PPC64LE/P224/Comb.leanandProof/Ecdsa/PPC64LE/P224/Comb.lean:Verifiedwith the table as a constant (Abi.withConsts), and constant time bytaint_decidewithtaintSym.cs := p224CombConsts). Its registration requires thatVG_P224_COMBis not one of the HMAC table's function names.Verified.vg_p224_mul, which no P-224 function calls any more (ECDH has its windows, PPC64LE P-224 ECDH: [d]P by four-bit windows #4715), goes from the crate.This and #4773 (P-521) each work alone. Whichever lands second needs
qAt := rflin P-224'sLayout.No TCB or Spec change.
Testing
lake buildandEmit.leanpass on this tree. The only crate changes are P-224's, incrates/verified-garbage-asm-powerpc64le.Benchmark
Benchmarks run 42517555177, scoped to
arches=powerpc64,modules=ec_p224 ecdsa_p224,groups=ec_p224_public_key ecdsa_p224_sha224_sign, with base 8c69d0c (the P-256 signature's head then; same change, before the chain):ec_p224_public_key/57ecdsa_p224_sha224_sign/64ecdsa_p224_sha224_sign/1024ecdsa_p224_sha224_sign/16384Generated by Claude Code