New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First stab at multiscalar speedup for computing group commitments #345
Conversation
This is failing only for ed448 but I'm not sure why yet |
Oh right our vartime multiscalar mul only supports 256bit scalar fields 🙃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, we just need to fix the 448 support probably by copying the refactored code from reddsa
Results on my machine:
FROST Signing ristretto255/Round 2/2
time: [94.596 µs 94.901 µs 95.243 µs]
change: [-16.059% -15.648% -15.236%] (p = 0.00 < 0.05)
Performance has improved.
FROST Signing ristretto255/Aggregate/2
time: [204.35 µs 204.96 µs 205.62 µs]
change: [-8.1068% -7.9390% -7.7735%] (p = 0.00 < 0.05)
Performance has improved.
FROST Signing ristretto255/Round 2/7
time: [182.08 µs 182.27 µs 182.52 µs]
change: [-48.358% -48.293% -48.225%] (p = 0.00 < 0.05)
Performance has improved.
FROST Signing ristretto255/Aggregate/7
time: [289.16 µs 289.31 µs 289.49 µs]
change: [-37.323% -37.154% -37.004%] (p = 0.00 < 0.05)
Performance has improved.
FROST Signing ristretto255/Round 2/67
time: [1.2781 ms 1.2819 ms 1.2868 ms]
change: [-60.825% -60.739% -60.650%] (p = 0.00 < 0.05)
Performance has improved.
FROST Signing ristretto255/Aggregate/67
time: [1.3150 ms 1.3219 ms 1.3318 ms]
change: [-60.843% -60.580% -60.303%] (p = 0.00 < 0.05)
Performance has improved.
FROST Signing ristretto255/Round 2/667
time: [12.757 ms 12.763 ms 12.770 ms]
change: [-61.301% -61.273% -61.246%] (p = 0.00 < 0.05)
Performance has improved.
FROST Signing ristretto255/Aggregate/667
time: [12.455 ms 12.473 ms 12.495 ms]
change: [-61.931% -61.868% -61.793%] (p = 0.00 < 0.05)
Performance has improved.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #345 +/- ##
==========================================
+ Coverage 68.58% 68.79% +0.20%
==========================================
Files 30 30
Lines 2394 2410 +16
==========================================
+ Hits 1642 1658 +16
Misses 752 752
☔ View full report in Codecov by Sentry. |
The group commitment is accumulated for all the hiding commitments, saving the per-participant binding factor and their respective binding commitment for one big vartime multiscalar multiplication at the end, which is finally added to the accumulated commitment as the final group commitment.
This leads to nearly a 50% speedup at the 667/1000 end.