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

Prio3: Improve domain separation for multi-proof mode #309

Merged
merged 1 commit into from
Nov 16, 2023

Conversation

cjpatton
Copy link
Collaborator

Partially addresses #177.

The query randomness is correlated for different values of Prio3.PROOFS. To provide defense in depth in case the same verification key is used for different versions, prepend the binder with bytes(Prio3.PROOFS).

For consistency, do the same for the prove randomness and each Helper's share of the proofs. Also, do the same for joint randomness in case Prio3.PROOFS == 1.

The query randomness is correlated for different values of
`Prio3.PROOFS`. To provide defense in depth in case the same
verification key is used for different versions, prepend the binder with
`bytes(Prio3.PROOFS)`.

For consistency, do the same for the prove randomness and each Helper's
share of the proofs. Also, do the same for joint randomness in case
`Prio3.PROOFS == 1`.
@cjpatton
Copy link
Collaborator Author

@divergentdave please let me know if you'd be happy implementing multi-proof mode in libprio-rs. (Previously it was optional, but this PR would make this feature wire breaking.)

@albertpl please review as well and make sure you're happy.

Copy link
Contributor

@albertpl albertpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

So this change would break some of the Prio3 related test vectors , right? If we generate test vectors with PROOFS=1, it wouldn't be the same again. Is that a problem? Shall we document this?

Wait. So wire change is for this purpose?

draft-irtf-cfrg-vdaf.md Show resolved Hide resolved
@cjpatton
Copy link
Collaborator Author

Good catch!

So this change would break some of the Prio3 related test vectors , right? If we generate test vectors with PROOFS=1, it wouldn't be the same again. Is that a problem? Shall we document this?

Yes, we'll break the test vectors, but we will break the test vectors anyway in the next version (when we bump VERSION). All we need to do is re-generate them, so this is not a problem. The break will be documented in the Change Log section of the draft.

Wait. So wire change is for this purpose?

Yes.

@cjpatton cjpatton requested a review from albertpl November 14, 2023 17:36
Copy link
Contributor

@albertpl albertpl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching this.

Copy link
Collaborator

@divergentdave divergentdave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. We can implement it in libprio-rs too. I figure the main thing we'll have to watch out for is performance regressions if bound checks stop being elided, but we can address that with appropriate use of iterators.

@cjpatton cjpatton merged commit bfcfeb7 into main Nov 16, 2023
@cjpatton cjpatton deleted the cjpatton/177-breaking branch June 8, 2024 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants