Skip to content
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

Merged
merged 3 commits into from May 17, 2023

Conversation

dconnolly
Copy link
Contributor

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.

image

@dconnolly
Copy link
Contributor Author

This is failing only for ed448 but I'm not sure why yet

@dconnolly
Copy link
Contributor Author

This is failing only for ed448 but I'm not sure why yet

Oh right our vartime multiscalar mul only supports 256bit scalar fields 🙃

frost-core/src/frost.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@conradoplg conradoplg left a 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
Copy link

codecov bot commented May 17, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.20 🎉

Comparison is base (53a3027) 68.58% compared to head (1bdbb89) 68.79%.

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              
Impacted Files Coverage Δ
frost-core/src/frost.rs 79.72% <100.00%> (+1.57%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@mergify mergify bot merged commit 07aea68 into main May 17, 2023
13 checks passed
@mergify mergify bot deleted the multiscalar-mul-group-commitment branch May 17, 2023 00:06
@dconnolly dconnolly mentioned this pull request May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants