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

Mastic clean up #1187

Open
wants to merge 5 commits into
base: cjpatton/947-7-prep-state-serialization
Choose a base branch
from

Conversation

cjpatton
Copy link
Collaborator

@cjpatton cjpatton commented Jan 7, 2025

Stacked on #1185.
Partially addresses #947.

Various clean up things in the wake of finishing Mastic. Review commit-by-commit.

@cjpatton cjpatton marked this pull request as ready for review January 7, 2025 00:52
@cjpatton cjpatton requested a review from a team as a code owner January 7, 2025 00:52
@cjpatton cjpatton force-pushed the cjpatton/947-7-prep-state-serialization branch from 6e1662f to 530053d Compare January 9, 2025 15:56
Some tests in the `mastic` module generate verification keys that aren't
actually used by the test. Incidentally, the same tests were
generating keys of the wrong length.
Add a function that computes the length of the aggregate share in field
elements as a function of the aggregation parameter.
Avoid iterating over the weights to compute the length of the encoded
public share; just take the length of the first weight and multiply by
the number of correction words.

This computation assumes the length of each weight is equal to the
weight parameter at ever level of the VIDPF tree. This certainly is
true, but add a test to validate this assumption anyway.
This method is currently implemented for `Vidpf<VidpfWeight<F>>`, but it
applies to the more general `Vidpf<W>`.
This method is used in Prio3 and Poplar1 for domain separation with the
version of the document that specifies them. This version control is not
applicable to future VDAFs defined by future documents.

Remove the method from the trait and add it to implementations of
`Prio3` and `Poplar1`.
@cjpatton cjpatton force-pushed the cjpatton/947-8-cleanup branch from d4a7bfc to cb024c4 Compare January 9, 2025 15:57
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