-
Notifications
You must be signed in to change notification settings - Fork 13
Batch ZK proofs for PPOPRF #207
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
Conversation
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.
Not commenting on the algorithm, here, just some suggestions for code cleanup. I ran cargo fmt to address ci lints from there. Please address the cargo clippy lints. I've added comments near a few which hopefully explain a bit what's going on with the lint. If you don't want the practice, let me know and I can address them quickly. You can also use cargo clippy --fix or the fix action in your editor if you have that set up.
The rust String type is explicitly for UTF-8 text and can't be used for constructing binary data. Look for equivalents of python list methods rather than format string equivalents, convenient as they are!
claucece
left a comment
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.
It looks good! Need some changes and testing ;)
rillian
left a comment
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.
Thanks for addressing earlier comments, @ankeleralph . I think it's ready to go as far as the implementation with the remaining nits addressed. That just leaves the question from @claucece about whether the ristretto mod is necessary.
claucece
left a comment
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.
I think we can simplify this PR by quite a lot. There is a lot of code repetition here. We can basically use the same code of the proof generation without batching (https://github.com/brave/sta-rs/blob/main/ppoprf/src/ppoprf.rs#L48) and the verification of the proof without batching (https://github.com/brave/sta-rs/blob/main/ppoprf/src/ppoprf.rs#L71). Perhaps, even just extending those functions to take a param to batch when it is needed. Else, the two places are basically doing the same but calling different functions. Happy to have a call to explain.
claucece
left a comment
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.
LGTM! Thank you!
This PR fixes issue #82 by batching multiple client queries for the DLEQ ZKPs following the pseudo code from draft-irtf-cfrg-voprf.