crypto: Optimize line evaluation in BN254 pairings#1541
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1541 +/- ##
=======================================
Coverage 96.97% 96.97%
=======================================
Files 163 163
Lines 14455 14455
Branches 3385 3385
=======================================
Hits 14018 14018
Misses 307 307
Partials 130 130
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
rodiazet
left a comment
There was a problem hiding this comment.
LGTM. Quite obvious simplification. Wondering why these papers don’t mention this. :)
3d392a0 to
781dccc
Compare
d80e632 to
a653f6b
Compare
Algebraic simplifications in the Jacobian add + line evaluation, all recovering an intermediate reuse that was implicit in the original reference but lost when the procedure was re-derived to fix the paper's typos.
a653f6b to
f676b62
Compare
There was a problem hiding this comment.
Pull request overview
This PR optimizes BN254 pairing line-evaluation computations by algebraically simplifying coefficient calculations and reusing intermediates in the Jacobian-add + line evaluation path, aligning with the referenced derivation notes.
Changes:
- Simplify
t[0]/t[1]computations inlin_func_and_add()by reusingHandR(removing redundant multiplications). - Factor common terms in
lin_func()to reduce field multiplications. - Minor comment correction/clarification in the Jacobian add derivation notes inline.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Algebraic simplifications in the Jacobian add + line evaluation,
all recovering an intermediate reuse that was implicit in the original
reference but lost when the procedure was re-derived to fix the paper's
typos.