Repository navigation
Conversation
[u]G by the signed seven-bit comb with the addition inlined of #4793 (its table, VG_P521_COMB, an artifact constant) and [v]Q by the three-bit windows, as P-256's verification (#4770), in place of the ladders. The internal ladder (vg_p521_mul) only the ladders called is gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKUFHHNk9SreF92JBY2H8M
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 the PPC64LE audit, #4141 (ECDSA verification). This follows #4793, which gave P-521's public keys and signatures the comb, and does for P-521 what #4770 did for P-256 and #4795 for brainpoolP256r1/P384r1.
vg_ecdsa_p521_verifyon PPC64LE now computes[u]G + [v]QbyCfg.pointsWithinstead of the two ladders (Cfg.points,ladders):[u]G: PPC64LE P-521: public keys and RFC 6979 signatures by the signed seven-bit comb #4793's signed seven-bit comb, with the addition inlined (TCombI,combI). Its table is the artifact constant the key and signature code already use,VG_P521_COMB.[v]Q: ECDH's three-bit windows (Window.Cfg.mul3). They readb, in Montgomery's form, fromEM, wherepointsWithwrites it.Proofs
Proof/Ecdsa/Verify/PPC64LE/P521/Verified.leanfollows P-256's (P256Comb.lean,Verified.lean):combPts_okusesTComb.combI_ok, whose writes areladWx, covered bycomb_writes_cover. It also usesWindow.P521.mul_ok.mulW: bytes 1072–2152, 3520–4096 and 5824–7552) are apart fromU's slots and the second table of bits (4672–5248), which the sum and the final step read.verify_ppcusesverifyWith_ok, andverify_ctusestaintSymon the table's symbol.verifyHash_verifiedusesHash.verifyHash_verified_conswithwide := true.combPts_oktakesset_option exponentiation.threshold 1024 in, as #4793'scomb_generator_okdoes.No TCB, Spec or registration changes.
Generated crate. Only PPC64LE changes: the verification, and the removal of
vg_p521_mul, the internal ladder that only the verification's ladders called.Testing
cargo test --target powerpc64le-unknown-linux-gnu --release ecdsapasses, including Wycheproof'secdsa_secp521r1_sha512_p1363_test.lake build(every module) andEmit.leanpass on this tree, which ismain(ac27cf36) plus this commit.check_lean_public_imports.pypass.cargo fmt --checkandclippy -D warningspass.Benchmarks
Run 42544295596:
arches=powerpc64,ecdsa_p521_sha512_verify, baseac27cf36(main), eight copies of each side. Verification is about 3.3 times as fast. These are the copies' medians from the run's per-run estimates:ecdsa_p521_sha512_verify/64ecdsa_p521_sha512_verify/1024ecdsa_p521_sha512_verify/16384🤖 Generated with Claude Code
https://claude.ai/code/session_01TKUFHHNk9SreF92JBY2H8M