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

[DRAFT} Batch convert RP25519 to u64 #1393

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

akoshelev
Copy link
Collaborator

Builds on top of #1391 and local testing shows some significant improvements in latency. Will do some Draft runs before making it ready for review.

It results in 14% speed up for semi-honest implementation. I couldn't check malicious improvements yet because of issues inside ZKP, but it should benefit from this improvement as well
This is done purely for performance reasons. We only convert PRF_CHUNK points in a batch, which in current setting means 16. Instead of converting Ristretto point $P$, we convert $2 \times P$ which should yield 64 bit values of the same quality.

Unfortunately, [double and compress](https://docs.rs/curve25519-dalek/latest/curve25519_dalek/ristretto/struct.RistrettoPoint.html#method.double_and_compress_batch) is quite clunky to use as it only takes an iterator over borrowed values, so more than 50% of this PR is basically my silly attempt to get around that
@akoshelev
Copy link
Collaborator Author

akoshelev commented Nov 1, 2024

in-memory runs showed better performance, but with real io, I am only seeing 1.5 min lower latency with this change (~1.7% improvement.

The comparison is done against #1391

Mode Before this change After this change
Semi-honest/50M 1h 28m 1h 27m

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.

1 participant