Open commitments to all polynomials involved in a number of linear combinations (LC) simultaneously.
(
ck: &Self::CommitterKey,
linear_combinations: impl IntoIterator<Item = &'a LinearCombination<F>>,
polynomials: impl IntoIterator<Item = &'a LabeledPolynomial<F, P>>,
| 443 | /// Open commitments to all polynomials involved in a number of linear |
| 444 | /// combinations (LC) simultaneously. |
| 445 | fn open_combinations<'a>( |
| 446 | ck: &Self::CommitterKey, |
| 447 | linear_combinations: impl IntoIterator<Item = &'a LinearCombination<F>>, |
| 448 | polynomials: impl IntoIterator<Item = &'a LabeledPolynomial<F, P>>, |
| 449 | commitments: impl IntoIterator<Item = &'a LabeledCommitment<Self::Commitment>>, |
| 450 | query_set: &QuerySet<P::Point>, |
| 451 | sponge: &mut impl CryptographicSponge, |
| 452 | states: impl IntoIterator<Item = &'a Self::CommitmentState>, |
| 453 | rng: Option<&mut dyn RngCore>, |
| 454 | ) -> Result<BatchLCProof<F, Self::BatchProof>, Self::Error> |
| 455 | where |
| 456 | Self::CommitmentState: 'a, |
| 457 | Self::Commitment: 'a, |
| 458 | P: 'a, |
| 459 | { |
| 460 | // The default implementation proceeds by batch-opening all polynomials |
| 461 | // appearing in those LC that are queried at the same point. |
| 462 | let linear_combinations: Vec<_> = linear_combinations.into_iter().collect(); |
| 463 | let polynomials: Vec<_> = polynomials.into_iter().collect(); |
| 464 | |
| 465 | // Rearrange the information about queries on linear combinations into |
| 466 | // information about queries on individual polynomials. |
| 467 | let poly_query_set = |
| 468 | lc_query_set_to_poly_query_set(linear_combinations.iter().copied(), query_set); |
| 469 | let poly_evals = evaluate_query_set(polynomials.iter().copied(), &poly_query_set); |
| 470 | |
| 471 | // Batch-open all polynomials that refer to each individual point in `query_set` |
| 472 | let proof = Self::batch_open( |
| 473 | ck, |
| 474 | polynomials, |
| 475 | commitments, |
| 476 | &poly_query_set, |
| 477 | sponge, |
| 478 | states, |
| 479 | rng, |
| 480 | )?; |
| 481 | Ok(BatchLCProof { |
| 482 | proof, |
| 483 | evals: Some(poly_evals.values().copied().collect()), |
| 484 | }) |
| 485 | } |
| 486 | |
| 487 | /// Verify opening proofs for all polynomials involved in a number of |
| 488 | /// linear combinations (LC) simultaneously. |
nothing calls this directly
no test coverage detected