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

Vdaf::prepare_preprocess lacks Vdaf::AggregationParam argument #670

Closed
tgeoghegan opened this issue Aug 4, 2023 · 0 comments · Fixed by #744
Closed

Vdaf::prepare_preprocess lacks Vdaf::AggregationParam argument #670

tgeoghegan opened this issue Aug 4, 2023 · 0 comments · Fixed by #744
Labels

Comments

@tgeoghegan
Copy link
Contributor

tgeoghegan commented Aug 4, 2023

Trait Aggregator: Vdaf has:

/// Preprocess a round of preparation shares into a single input to [`Aggregator::prepare_step`].
    fn prepare_preprocess<M: IntoIterator<Item = Self::PrepareShare>>(
        &self,
        inputs: M,
    ) -> Result<Self::PrepareMessage, VdafError>;

However, VDAF-06 defines Vdaf.prep_shares_to_prep(agg_param: AggParam, prep_shares: Vec[Bytes]) -> Bytes. (VDAF). Note the agg_param argument that does not appear in our Rust implementation.

We get away with this because Prio3.prep_shares_to_prep never uses the aggregation parameter. But I'm more confused by the Poplar1 side: the reference implementation of Poplar1.prep_shares_to_prep takes responsibility for decoding field elements from bytes and so needs to know what level of the tree it's on, but libprio's implementation seems to have long since decoded everything. I'm not certain what's going on, but it's difficult to reconcile it with the specification.

Even if there's some clever trick here that makes Poplar1 work out, it seems like crate prio's interface should match up with the specification.

tgeoghegan added a commit that referenced this issue Sep 11, 2023
`Vdaf::prepare_preprocess` was missing the `&Vdaf::AggregationParam`
argument specified in VDAF. This adds that argument to the trait method
and its implementations. While we're at it, to further align with the
spec, we add new methods `prepare_shares_to_prepare_message` and
`prepare_next`, to align with the spec's `prep_shares_to_prep` and
`prep_next`, as aliases for the existing `prepare_preprocess` and
`prepare_step`. The existing methods are marked as deprecated.

Resolves #670
tgeoghegan added a commit that referenced this issue Sep 11, 2023
`Vdaf::prepare_preprocess` was missing the `&Vdaf::AggregationParam`
argument specified in VDAF. This adds that argument to the trait method
and its implementations. While we're at it, to further align with the
spec, we add new methods `prepare_shares_to_prepare_message` and
`prepare_next`, to align with the spec's `prep_shares_to_prep` and
`prep_next`, as aliases for the existing `prepare_preprocess` and
`prepare_step`. The existing methods are marked as deprecated.

Resolves #670
tgeoghegan added a commit that referenced this issue Sep 11, 2023
`Vdaf::prepare_preprocess` was missing the `&Vdaf::AggregationParam`
argument specified in VDAF. This adds that argument to the trait method
and its implementations. While we're at it, to further align with the
spec, we add new methods `prepare_shares_to_prepare_message` and
`prepare_next`, to align with the spec's `prep_shares_to_prep` and
`prep_next`, as aliases for the existing `prepare_preprocess` and
`prepare_step`. The existing methods are marked as deprecated.

Resolves #670
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants