Class responsible for computation of the batched multilinear polynomials required by the Gemini protocol.
More...
|
| PolynomialBatcher (const size_t full_batched_size) |
|
bool | has_unshifted () const |
|
bool | has_to_be_shifted_by_one () const |
|
bool | has_to_be_shifted_by_k () const |
|
bool | has_interleaved () const |
|
void | set_unshifted (RefVector< Polynomial > polynomials) |
|
void | set_to_be_shifted_by_one (RefVector< Polynomial > polynomials) |
|
void | set_to_be_shifted_by_k (RefVector< Polynomial > polynomials, const size_t shift_magnitude) |
|
void | set_random_polynomial (Polynomial &&random) |
|
void | set_interleaved (RefVector< Polynomial > results, std::vector< RefVector< Polynomial > > groups) |
|
Polynomial | compute_batched (const Fr &challenge, Fr &running_scalar) |
| Compute batched polynomial A₀ = F + G/X as the linear combination of all polynomials to be opened.
|
|
std::pair< Polynomial, Polynomial > | compute_partially_evaluated_batch_polynomials (const Fr &r_challenge) |
| Compute partially evaluated batched polynomials A₀(X, r) = A₀₊ = F + G/r, A₀(X, -r) = A₀₋ = F - G/r.
|
|
std::pair< Polynomial, Polynomial > | compute_partially_evaluated_interleaved_polynomial (const Fr &r_challenge) |
| Compute the partially evaluated polynomials P₊(X, r) and P₋(X, -r)
|
|
size_t | get_group_size () |
|
template<typename
Curve>
class bb::GeminiProver_< Curve >::PolynomialBatcher
Class responsible for computation of the batched multilinear polynomials required by the Gemini protocol.
Opening multivariate polynomials using Gemini requires the computation of three batched polynomials. The first, here denoted A₀, is a linear combination of all polynomials to be opened. If we denote the linear combinations (based on challenge rho) of the unshifted, to-be-shifted-by-1, and to-be-right-shifted-by-k polynomials by F, G, and H respectively, then A₀ = F + G/X + X^k*H. (Note: 'k' is assumed even and thus a factor (-1)^k in not needed for the evaluation at -r). This polynomial is "folded" in Gemini to produce d-1 univariate polynomials Fold_i, i = 1, ..., d-1. The second and third are the partially evaluated batched polynomials A₀₊ = F
- G/r + r^K*H, and A₀₋ = F - G/r + r^K*H. These are required in order to prove the opening of shifted polynomials G_i/X, X^k*H_i and from the commitments to their unshifted counterparts G_i and H_i.
- Note
- TODO(https://github.com/AztecProtocol/barretenberg/issues/1223): There are certain operations herein that could be made more efficient by e.g. reusing already initialized polynomials, possibly at the expense of clarity.
Definition at line 123 of file gemini.hpp.
template<typename
Curve >
Compute the partially evaluated polynomials P₊(X, r) and P₋(X, -r)
If the interleaved polynomials are set, the full partially evaluated identites A₀(r) and A₀(-r) contain the contributions of P₊(r^s) and P₋(r^s) respectively where s is the size of the interleaved group assumed even. This function computes P₊(X) = ∑ r^i Pᵢ(X) and P₋(X) = ∑ (-r)^i Pᵢ(X) where Pᵢ(X) is the i-th polynomial in the batched group.
- Parameters
-
r_challenge | partial evaluation challenge |
- Returns
- std::pair<Polynomial, Polynomial> {P₊, P₋}
Definition at line 298 of file gemini.hpp.