Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
small_subgroup_ipa_utils.hpp File Reference
#include "barretenberg/commitment_schemes/claim.hpp"
#include "barretenberg/constants.hpp"
#include "barretenberg/polynomials/polynomial.hpp"
#include <algorithm>
#include <array>
#include <memory>
#include <string>
#include <string_view>

Go to the source code of this file.

Classes

struct  bb::SmallIpaClaim
 Static specification of one SmallSubgroupIPA opening claim. More...
 
struct  bb::SmallSubgroupIPACommitments< Commitment >
 Holds commitments to [G], [A], [Q]. Code that needs a per-claim commitment must index as_array() via SMALL_IPA_CLAIMS[i].commitment_index. More...
 

Namespaces

namespace  bb
 Entry point for Barretenberg command-line interface.
 

Enumerations

enum class  bb::SmallIpaEvalPoint : uint8_t { bb::Challenge , bb::ChallengeShifted , bb::One }
 Recipe for the evaluation point of a single SmallSubgroupIPA opening claim. More...
 

Functions

template<typename FF >
std::array< FF, NUM_SMALL_IPA_OPENING_CLAIMSbb::compute_evaluation_points (const FF &challenge, const FF &subgroup_generator)
 Compute the evaluation points {r, g*r, r, 1, r} for the five opening claims by walking SMALL_IPA_CLAIMS.
 
template<typename Curve >
std::array< typename Curve::ScalarField, NUM_SMALL_IPA_OPENING_CLAIMSbb::compute_shplonk_denominators_for_small_ipa (const typename Curve::ScalarField &shplonk_evaluation_challenge, const typename Curve::ScalarField &small_ipa_evaluation_challenge)
 Compute Shplonk denominators 1 / (z - x_i), where x_i are the SmallSubgroupIPA opening points.
 
std::array< std::string, NUM_SMALL_IPA_OPENING_CLAIMSbb::get_evaluation_labels (std::string_view prefix)
 Build the wire labels {prefix + suffix} for the five opening claims. prefix is "Libra:" or "Translation:".
 
template<typename Curve , typename Transcript >
std::array< ProverOpeningClaim< Curve >, NUM_SMALL_IPA_OPENING_CLAIMSbb::make_small_ipa_prover_opening_claims (const std::array< bb::Polynomial< typename Curve::ScalarField >, NUM_SMALL_IPA_COMMITMENTS > &polynomials, const typename Curve::ScalarField &challenge, std::string_view label_prefix, const std::shared_ptr< Transcript > &transcript)
 Build the five SmallSubgroupIPA prover opening claims.
 
template<typename Curve , typename Transcript >
std::array< typename Curve::ScalarField, NUM_SMALL_IPA_OPENING_CLAIMSbb::receive_small_ipa_evaluations (std::string_view label_prefix, const std::shared_ptr< Transcript > &transcript)
 Receive the five SmallSubgroupIPA evaluations on the verifier side.
 
template<typename Curve , typename Transcript >
std::array< OpeningClaim< Curve >, NUM_SMALL_IPA_OPENING_CLAIMSbb::make_small_ipa_verifier_opening_claims (const std::array< typename Curve::AffineElement, NUM_SMALL_IPA_COMMITMENTS > &commitments, const typename Curve::ScalarField &challenge, std::string_view label_prefix, const std::shared_ptr< Transcript > &transcript)
 Build the five SmallSubgroupIPA verifier opening claims, pairing each evaluation with the commitment selected by SMALL_IPA_CLAIMS[i].commitment_index.
 

Variables

constexpr auto bb::SMALL_IPA_CLAIMS
 The five SmallSubgroupIPA opening claims, in transcript order.
 
constexpr size_t bb::NUM_SMALL_IPA_OPENING_CLAIMS = SMALL_IPA_CLAIMS.size()
 
constexpr size_t bb::NUM_SMALL_IPA_TRANSCRIPT_EVALS
 
constexpr size_t bb::NUM_SMALL_IPA_COMMITMENTS