Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::SmallSubgroupIPAVerifier< Curve > Class Template Reference

Verifies the consistency of polynomial evaluations provided by the the prover. More...

#include <small_subgroup_ipa.hpp>

Static Public Member Functions

static bool check_consistency (const std::array< FF, NUM_SMALL_IPA_EVALUATIONS > &small_ipa_evaluations, const FF &small_ipa_eval_challenge, const std::vector< FF > &challenge_polynomial, const FF &inner_product_eval_claim, const FF &vanishing_poly_eval)
 Generic consistency check agnostic to challenge polynomial \( F\).
 
static bool check_libra_evaluations_consistency (const std::array< FF, NUM_SMALL_IPA_EVALUATIONS > &libra_evaluations, const FF &gemini_evaluation_challenge, const std::vector< FF > &multilinear_challenge, const FF &inner_product_eval_claim)
 A method required by ZKSumcheck. The challenge polynomial is concatenated from the powers of the sumcheck challenges.
 
static bool check_eccvm_evaluations_consistency (const std::array< FF, NUM_SMALL_IPA_EVALUATIONS > &small_ipa_evaluations, const FF &evaluation_challenge, const FF &evaluation_challenge_x, const FF &batching_challenge_v, const FF &inner_product_eval_claim)
 A method required for the verification Translation Evaluations in the ECCVMVerifier. The challenge polynomial is concatenated from the products \( x^i \cdot v^j\). See the corresponding method for details.
 
static void handle_edge_cases (const FF &vanishing_poly_eval)
 Check if the random evaluation challenge is in the SmallSubgroup.
 
static std::array< FF, NUM_BARYCENTRIC_EVALUATIONScompute_batched_barycentric_evaluations (const std::vector< FF > &coeffs, const FF &r, const FF &vanishing_poly_eval)
 Efficient batch evaluation of the challenge polynomial, Lagrange first, and Lagrange last.
 
static std::array< FF, NUM_SMALL_IPA_EVALUATIONS > evaluation_points (const FF &small_ipa_evaluation_challenge)
 
static std::array< std::string, NUM_SMALL_IPA_EVALUATIONS > evaluation_labels (const std::string &label_prefix)
 

Private Types

using FF = typename Curve::ScalarField
 

Static Private Attributes

static constexpr size_t SUBGROUP_SIZE = Curve::SUBGROUP_SIZE
 
static constexpr size_t NUM_BARYCENTRIC_EVALUATIONS = 3
 
static constexpr size_t LIBRA_UNIVARIATES_LENGTH = Curve::LIBRA_UNIVARIATES_LENGTH
 

Detailed Description

template<typename Curve>
class bb::SmallSubgroupIPAVerifier< Curve >

Verifies the consistency of polynomial evaluations provided by the the prover.

Given a subgroup of \( \mathbb{F}^\ast \), its generator \( g\), this function checks whether the following equation holds:

\[ L_1(r) A(r) + (r - g^{-1}) \left( A(g*r) - A(r) - F(r) G(r) \right) + L_{|H|}(r) \left( A(r) - s \right) = T(r) Z_H(r) \]

where the following evaluations are sent by the prover:

  • \( A(r), A(g\cdot r) \) are the evaluations of the "grand sum polynomial"
  • \( G(r) \) is the evaluation of the witness polynomial
  • \( Q(r) \) is the evaluation of the quotient of the big sum identity polynomial by the vanishing polynomial for \(H\); and the following evaluations are computed by the verifier
  • \( L_1(r) \) and \( L_{|H|}(r) \) are the evaluations of Lagrange polynomials corresponding to \( 1 \) and \( g^{-1} \).
  • \( F(r) \) is the evaluation of a public polynomial formed from the challenges.
  • \( Z_H(r) \) is the vanishing polynomial \( X^{|H|} - 1\) evaluated at the challenge point.

Definition at line 216 of file small_subgroup_ipa.hpp.

Member Typedef Documentation

◆ FF

template<typename Curve >
using bb::SmallSubgroupIPAVerifier< Curve >::FF = typename Curve::ScalarField
private

Definition at line 217 of file small_subgroup_ipa.hpp.

Member Function Documentation

◆ check_consistency()

template<typename Curve >
static bool bb::SmallSubgroupIPAVerifier< Curve >::check_consistency ( const std::array< FF, NUM_SMALL_IPA_EVALUATIONS > &  small_ipa_evaluations,
const FF small_ipa_eval_challenge,
const std::vector< FF > &  challenge_polynomial,
const FF inner_product_eval_claim,
const FF vanishing_poly_eval 
)
inlinestatic

Generic consistency check agnostic to challenge polynomial \( F\).

Parameters
small_ipa_evaluations\( G(r) \) , \( A(g* r) \), \( A(r) \) , \( Q(r)\).
small_ipa_eval_challenge
challenge_polynomialThe polynomial \( F \) that the verifier computes and evaluates on its own.
inner_product_eval_claim\( <F,G> \) where the polynomials are treated as vectors of coefficients (in Lagrange basis).
vanishing_poly_eval\( Z_H(r) \)
Returns
true
false

Definition at line 244 of file small_subgroup_ipa.hpp.

◆ check_eccvm_evaluations_consistency()

template<typename Curve >
static bool bb::SmallSubgroupIPAVerifier< Curve >::check_eccvm_evaluations_consistency ( const std::array< FF, NUM_SMALL_IPA_EVALUATIONS > &  small_ipa_evaluations,
const FF evaluation_challenge,
const FF evaluation_challenge_x,
const FF batching_challenge_v,
const FF inner_product_eval_claim 
)
inlinestatic

A method required for the verification Translation Evaluations in the ECCVMVerifier. The challenge polynomial is concatenated from the products \( x^i \cdot v^j\). See the corresponding method for details.

Parameters
small_ipa_evaluationsEvaluations of the SmallSubgroupIPA witness polynomials when \( G \) is a concatenation of the last NUM_DISABLED_ROWS_IN_SUMCHECK entries in the NUM_TRANSLATION_EVALUATIONS polynomials.
evaluation_challengeA random challenge sampled to obtain small_ipa_evaluations
evaluation_challenge_xEvaluation challenge for NUM_TRANSLATION_EVALUATIONS univariate polynomials
batching_challenge_vA challenge used to batch the evaluations at \( x \) .
inner_product_eval_claimClaimed inner product of \( F \) and \( G\).

Definition at line 321 of file small_subgroup_ipa.hpp.

◆ check_libra_evaluations_consistency()

template<typename Curve >
static bool bb::SmallSubgroupIPAVerifier< Curve >::check_libra_evaluations_consistency ( const std::array< FF, NUM_SMALL_IPA_EVALUATIONS > &  libra_evaluations,
const FF gemini_evaluation_challenge,
const std::vector< FF > &  multilinear_challenge,
const FF inner_product_eval_claim 
)
inlinestatic

A method required by ZKSumcheck. The challenge polynomial is concatenated from the powers of the sumcheck challenges.

Parameters
libra_evaluationsEvaluations of the SmallSubgroupIPA witness polynomials when \( G \) is a concatenation of a masking constant term and Libra univariates.
gemini_evaluation_challengeRandom challenge \( r \) at which the Gemini fold polynomials are evaluated.
multilinear_challengeSumcheck challenge \( (u_0, \ldots, u_{d-1})\).
inner_product_eval_claimClaimed inner product of \( F \) and \( G\).
Returns
true
false

Definition at line 294 of file small_subgroup_ipa.hpp.

◆ compute_batched_barycentric_evaluations()

template<typename Curve >
static std::array< FF, NUM_BARYCENTRIC_EVALUATIONS > bb::SmallSubgroupIPAVerifier< Curve >::compute_batched_barycentric_evaluations ( const std::vector< FF > &  coeffs,
const FF r,
const FF vanishing_poly_eval 
)
inlinestatic

Efficient batch evaluation of the challenge polynomial, Lagrange first, and Lagrange last.

It is a modification of compute_barycentric_evaluation method that does not require EvaluationDomain object and outputs the barycentric evaluation of a polynomial along with the evaluations of the first and last Lagrange polynomials. The interpolation domain is given by \( (1, g, g^2, \ldots, g^{|H| -1 } )\)

Parameters
coeffsCoefficients of the polynomial to be evaluated, in our case it is the challenge polynomial
rEvaluation point, we are using the Gemini evaluation challenge
inverse_root_of_unityInverse of the generator of the subgroup H
Returns
std::array<FF, NUM_BARYCENTRIC_EVALUATIONS>

Definition at line 373 of file small_subgroup_ipa.hpp.

◆ evaluation_labels()

template<typename Curve >
static std::array< std::string, NUM_SMALL_IPA_EVALUATIONS > bb::SmallSubgroupIPAVerifier< Curve >::evaluation_labels ( const std::string &  label_prefix)
inlinestatic

Definition at line 417 of file small_subgroup_ipa.hpp.

◆ evaluation_points()

template<typename Curve >
static std::array< FF, NUM_SMALL_IPA_EVALUATIONS > bb::SmallSubgroupIPAVerifier< Curve >::evaluation_points ( const FF small_ipa_evaluation_challenge)
inlinestatic

Definition at line 413 of file small_subgroup_ipa.hpp.

◆ handle_edge_cases()

template<typename Curve >
static void bb::SmallSubgroupIPAVerifier< Curve >::handle_edge_cases ( const FF vanishing_poly_eval)
inlinestatic

Check if the random evaluation challenge is in the SmallSubgroup.

Parameters
vanishing_poly_eval\( Z_H(r) = r^{\text{SUBGROUP_SIZE}} - 1 \).

Definition at line 344 of file small_subgroup_ipa.hpp.

Member Data Documentation

◆ LIBRA_UNIVARIATES_LENGTH

template<typename Curve >
constexpr size_t bb::SmallSubgroupIPAVerifier< Curve >::LIBRA_UNIVARIATES_LENGTH = Curve::LIBRA_UNIVARIATES_LENGTH
staticconstexprprivate

Definition at line 229 of file small_subgroup_ipa.hpp.

◆ NUM_BARYCENTRIC_EVALUATIONS

template<typename Curve >
constexpr size_t bb::SmallSubgroupIPAVerifier< Curve >::NUM_BARYCENTRIC_EVALUATIONS = 3
staticconstexprprivate

Definition at line 223 of file small_subgroup_ipa.hpp.

◆ SUBGROUP_SIZE

template<typename Curve >
constexpr size_t bb::SmallSubgroupIPAVerifier< Curve >::SUBGROUP_SIZE = Curve::SUBGROUP_SIZE
staticconstexprprivate

Definition at line 219 of file small_subgroup_ipa.hpp.


The documentation for this class was generated from the following file: