Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::TripleIPA< Curve_, log_poly_length > Class Template Reference

#include <triple_ipa.hpp>

Classes

struct  IpaOpeningVector
 
struct  IpaVerifierClaim
 

Public Types

using Curve = Curve_
 
using Fr = typename Curve::ScalarField
 
using GroupElement = typename Curve::Element
 
using Commitment = typename Curve::AffineElement
 
using Polynomial = bb::Polynomial< Fr >
 
using CK = CommitmentKey< Curve >
 
using VK = VerifierCommitmentKey< Curve >
 
using IPAProtocol = IPA< Curve, log_poly_length >
 
using NativeAccumulator = typename IPAProtocol::NativeAccumulator
 
using VerifierAccumulator = std::conditional_t< Curve::is_stdlib_type, typename IPAProtocol::VerifierAccumulator, NativeAccumulator >
 
using TripleIpaClaimData = bb::TripleIpaClaimData< Curve >
 
using TripleIpaClaim = bb::TripleIpaClaim< Curve >
 
using TripleIpaInput = bb::TripleIpaInput< Curve >
 

Static Public Member Functions

template<typename Transcript >
static void compute_opening_proof (const CK &ck, const TripleIpaInput &input, const std::shared_ptr< Transcript > &transcript)
 
template<typename Transcript >
requires (!Curve::is_stdlib_type)
static bool reduce_verify (const VK &vk, const TripleIpaClaim &claim, const std::shared_ptr< Transcript > &transcript)
 
static VerifierAccumulator reduce_verify (const TripleIpaClaim &claim, const auto &transcript)
 
static NativeAccumulator reduce_to_accumulator (const TripleIpaClaim &claim, const auto &transcript)
 
static bool verify_accumulator (const VK &vk, const NativeAccumulator &accumulator)
 
static bool batch_verify_accumulators (const VK &vk, std::span< const NativeAccumulator > accumulators)
 

Static Public Attributes

static constexpr size_t poly_length = 1UL << log_poly_length
 
static constexpr size_t NUM_TENSORS = 3
 
static constexpr size_t NUM_CROSS_SUMS = NUM_TENSORS * (NUM_TENSORS - 1) / 2
 

Static Private Member Functions

static Fr combined_inner_product (const std::array< Fr, NUM_TENSORS > &diagonal_evaluations, const std::array< Fr, NUM_TENSORS > &zeta, const std::array< Fr, NUM_CROSS_SUMS > &cross_sums)
 
static std::array< Fr, NUM_CROSS_SUMScompute_cross_sums (const TripleIpaInput &input, const Polynomial &unshifted_witness, const Polynomial &shifted_witness, const Polynomial &eq_tensor)
 Compute the three cross-sums from already-built batched witnesses F and F'.
 
static IpaVerifierClaim combine_into_ipa_claim (const TripleIpaClaim &claim, const std::array< Fr, NUM_TENSORS > &zeta, const std::array< Fr, NUM_CROSS_SUMS > &cross_sums)
 
template<typename Transcript >
static IpaVerifierClaim compute_ipa_verifier_claim (const TripleIpaClaim &claim, const std::shared_ptr< Transcript > &transcript)
 
template<typename Transcript >
static void add_claim_to_hash_buffer (const TripleIpaClaim &claim, const std::shared_ptr< Transcript > &transcript)
 
template<typename Transcript >
static void add_claim_to_hash_buffer (const IpaVerifierClaim &opening_claim, const std::shared_ptr< Transcript > &transcript)
 
static NativeAccumulator reduce_to_accumulator_internal (const IpaVerifierClaim &opening_claim, const auto &transcript)
 Native reduction to a deferrable accumulator: checks the cheap IPA group relation against the prover-claimed G_0 and returns the data needed to discharge the expensive G_0 == <challenge_poly(u), SRS> MSM later (single or batched). Does NOT touch the SRS.
 

Detailed Description

template<typename Curve_, size_t log_poly_length>
class bb::TripleIPA< Curve_, log_poly_length >

Definition at line 28 of file triple_ipa.hpp.

Member Typedef Documentation

◆ CK

template<typename Curve_ , size_t log_poly_length>
using bb::TripleIPA< Curve_, log_poly_length >::CK = CommitmentKey<Curve>

Definition at line 35 of file triple_ipa.hpp.

◆ Commitment

template<typename Curve_ , size_t log_poly_length>
using bb::TripleIPA< Curve_, log_poly_length >::Commitment = typename Curve::AffineElement

Definition at line 33 of file triple_ipa.hpp.

◆ Curve

template<typename Curve_ , size_t log_poly_length>
using bb::TripleIPA< Curve_, log_poly_length >::Curve = Curve_

Definition at line 30 of file triple_ipa.hpp.

◆ Fr

template<typename Curve_ , size_t log_poly_length>
using bb::TripleIPA< Curve_, log_poly_length >::Fr = typename Curve::ScalarField

Definition at line 31 of file triple_ipa.hpp.

◆ GroupElement

template<typename Curve_ , size_t log_poly_length>
using bb::TripleIPA< Curve_, log_poly_length >::GroupElement = typename Curve::Element

Definition at line 32 of file triple_ipa.hpp.

◆ IPAProtocol

template<typename Curve_ , size_t log_poly_length>
using bb::TripleIPA< Curve_, log_poly_length >::IPAProtocol = IPA<Curve, log_poly_length>

Definition at line 37 of file triple_ipa.hpp.

◆ NativeAccumulator

template<typename Curve_ , size_t log_poly_length>
using bb::TripleIPA< Curve_, log_poly_length >::NativeAccumulator = typename IPAProtocol::NativeAccumulator

Definition at line 43 of file triple_ipa.hpp.

◆ Polynomial

template<typename Curve_ , size_t log_poly_length>
using bb::TripleIPA< Curve_, log_poly_length >::Polynomial = bb::Polynomial<Fr>

Definition at line 34 of file triple_ipa.hpp.

◆ TripleIpaClaim

template<typename Curve_ , size_t log_poly_length>
using bb::TripleIPA< Curve_, log_poly_length >::TripleIpaClaim = bb::TripleIpaClaim<Curve>

Definition at line 98 of file triple_ipa.hpp.

◆ TripleIpaClaimData

template<typename Curve_ , size_t log_poly_length>
using bb::TripleIPA< Curve_, log_poly_length >::TripleIpaClaimData = bb::TripleIpaClaimData<Curve>

Definition at line 97 of file triple_ipa.hpp.

◆ TripleIpaInput

template<typename Curve_ , size_t log_poly_length>
using bb::TripleIPA< Curve_, log_poly_length >::TripleIpaInput = bb::TripleIpaInput<Curve>

Definition at line 99 of file triple_ipa.hpp.

◆ VerifierAccumulator

template<typename Curve_ , size_t log_poly_length>
using bb::TripleIPA< Curve_, log_poly_length >::VerifierAccumulator = std::conditional_t<Curve::is_stdlib_type, typename IPAProtocol::VerifierAccumulator, NativeAccumulator>

Definition at line 44 of file triple_ipa.hpp.

◆ VK

template<typename Curve_ , size_t log_poly_length>
using bb::TripleIPA< Curve_, log_poly_length >::VK = VerifierCommitmentKey<Curve>

Definition at line 36 of file triple_ipa.hpp.

Member Function Documentation

◆ add_claim_to_hash_buffer() [1/2]

template<typename Curve_ , size_t log_poly_length>
template<typename Transcript >
static void bb::TripleIPA< Curve_, log_poly_length >::add_claim_to_hash_buffer ( const IpaVerifierClaim opening_claim,
const std::shared_ptr< Transcript > &  transcript 
)
inlinestaticprivate

Definition at line 331 of file triple_ipa.hpp.

◆ add_claim_to_hash_buffer() [2/2]

template<typename Curve_ , size_t log_poly_length>
template<typename Transcript >
static void bb::TripleIPA< Curve_, log_poly_length >::add_claim_to_hash_buffer ( const TripleIpaClaim claim,
const std::shared_ptr< Transcript > &  transcript 
)
inlinestaticprivate

Definition at line 313 of file triple_ipa.hpp.

◆ batch_verify_accumulators()

template<typename Curve_ , size_t log_poly_length>
static bool bb::TripleIPA< Curve_, log_poly_length >::batch_verify_accumulators ( const VK vk,
std::span< const NativeAccumulator accumulators 
)
inlinestatic

Definition at line 305 of file triple_ipa.hpp.

◆ combine_into_ipa_claim()

template<typename Curve_ , size_t log_poly_length>
static IpaVerifierClaim bb::TripleIPA< Curve_, log_poly_length >::combine_into_ipa_claim ( const TripleIpaClaim claim,
const std::array< Fr, NUM_TENSORS > &  zeta,
const std::array< Fr, NUM_CROSS_SUMS > &  cross_sums 
)
inlinestaticprivate

Definition at line 169 of file triple_ipa.hpp.

◆ combined_inner_product()

template<typename Curve_ , size_t log_poly_length>
static Fr bb::TripleIPA< Curve_, log_poly_length >::combined_inner_product ( const std::array< Fr, NUM_TENSORS > &  diagonal_evaluations,
const std::array< Fr, NUM_TENSORS > &  zeta,
const std::array< Fr, NUM_CROSS_SUMS > &  cross_sums 
)
inlinestaticprivate

Definition at line 111 of file triple_ipa.hpp.

◆ compute_cross_sums()

template<typename Curve_ , size_t log_poly_length>
static std::array< Fr, NUM_CROSS_SUMS > bb::TripleIPA< Curve_, log_poly_length >::compute_cross_sums ( const TripleIpaInput input,
const Polynomial unshifted_witness,
const Polynomial shifted_witness,
const Polynomial eq_tensor 
)
inlinestaticprivate

Compute the three cross-sums from already-built batched witnesses F and F'.

Takes the unshifted (F) and shifted-source (F') batched witnesses as inputs so the prover can reuse witnesses that were already built for the combined opening. <eq, F'> is read from the precomputed source evaluations instead of an extra MLE pass.

Definition at line 139 of file triple_ipa.hpp.

◆ compute_ipa_verifier_claim()

template<typename Curve_ , size_t log_poly_length>
template<typename Transcript >
static IpaVerifierClaim bb::TripleIPA< Curve_, log_poly_length >::compute_ipa_verifier_claim ( const TripleIpaClaim claim,
const std::shared_ptr< Transcript > &  transcript 
)
inlinestaticprivate

Definition at line 189 of file triple_ipa.hpp.

◆ compute_opening_proof()

template<typename Curve_ , size_t log_poly_length>
template<typename Transcript >
static void bb::TripleIPA< Curve_, log_poly_length >::compute_opening_proof ( const CK ck,
const TripleIpaInput input,
const std::shared_ptr< Transcript > &  transcript 
)
inlinestatic

Definition at line 208 of file triple_ipa.hpp.

◆ reduce_to_accumulator()

template<typename Curve_ , size_t log_poly_length>
static NativeAccumulator bb::TripleIPA< Curve_, log_poly_length >::reduce_to_accumulator ( const TripleIpaClaim claim,
const auto &  transcript 
)
inlinestatic

Definition at line 291 of file triple_ipa.hpp.

◆ reduce_to_accumulator_internal()

template<typename Curve_ , size_t log_poly_length>
static NativeAccumulator bb::TripleIPA< Curve_, log_poly_length >::reduce_to_accumulator_internal ( const IpaVerifierClaim opening_claim,
const auto &  transcript 
)
inlinestaticprivate

Native reduction to a deferrable accumulator: checks the cheap IPA group relation against the prover-claimed G_0 and returns the data needed to discharge the expensive G_0 == <challenge_poly(u), SRS> MSM later (single or batched). Does NOT touch the SRS.

Definition at line 343 of file triple_ipa.hpp.

◆ reduce_verify() [1/2]

template<typename Curve_ , size_t log_poly_length>
static VerifierAccumulator bb::TripleIPA< Curve_, log_poly_length >::reduce_verify ( const TripleIpaClaim claim,
const auto &  transcript 
)
inlinestatic

Definition at line 276 of file triple_ipa.hpp.

◆ reduce_verify() [2/2]

template<typename Curve_ , size_t log_poly_length>
template<typename Transcript >
requires (!Curve::is_stdlib_type)
static bool bb::TripleIPA< Curve_, log_poly_length >::reduce_verify ( const VK vk,
const TripleIpaClaim claim,
const std::shared_ptr< Transcript > &  transcript 
)
inlinestatic

Definition at line 270 of file triple_ipa.hpp.

◆ verify_accumulator()

template<typename Curve_ , size_t log_poly_length>
static bool bb::TripleIPA< Curve_, log_poly_length >::verify_accumulator ( const VK vk,
const NativeAccumulator accumulator 
)
inlinestatic

Definition at line 299 of file triple_ipa.hpp.

Member Data Documentation

◆ NUM_CROSS_SUMS

template<typename Curve_ , size_t log_poly_length>
constexpr size_t bb::TripleIPA< Curve_, log_poly_length >::NUM_CROSS_SUMS = NUM_TENSORS * (NUM_TENSORS - 1) / 2
staticconstexpr

Definition at line 53 of file triple_ipa.hpp.

◆ NUM_TENSORS

template<typename Curve_ , size_t log_poly_length>
constexpr size_t bb::TripleIPA< Curve_, log_poly_length >::NUM_TENSORS = 3
staticconstexpr

Definition at line 51 of file triple_ipa.hpp.

◆ poly_length

template<typename Curve_ , size_t log_poly_length>
constexpr size_t bb::TripleIPA< Curve_, log_poly_length >::poly_length = 1UL << log_poly_length
staticconstexpr

Definition at line 47 of file triple_ipa.hpp.


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