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

Shplonk Prover. More...

#include <shplonk.hpp>

Static Public Member Functions

static Polynomial compute_batched_quotient (const size_t virtual_log_n, std::span< const ProverOpeningClaim< Curve > > opening_claims, const Fr &nu, std::span< Fr > gemini_fold_pos_evaluations, std::span< const ProverOpeningClaim< Curve > > libra_opening_claims, std::span< const ProverOpeningClaim< Curve > > sumcheck_round_claims)
 Compute batched quotient polynomial Q(X) = ∑ⱼ νʲ ⋅ ( fⱼ(X) − vⱼ) / ( X − xⱼ )
 
static ProverOpeningClaim< Curvecompute_partially_evaluated_batched_quotient (const size_t virtual_log_n, std::span< ProverOpeningClaim< Curve > > opening_claims, Polynomial &batched_quotient_Q, const Fr &nu_challenge, const Fr &z_challenge, std::span< Fr > gemini_fold_pos_evaluations, std::span< ProverOpeningClaim< Curve > > libra_opening_claims={}, std::span< ProverOpeningClaim< Curve > > sumcheck_opening_claims={})
 Compute partially evaluated batched quotient polynomial difference Q(X) - Q_z(X)
 
static std::vector< Frcompute_gemini_fold_pos_evaluations (std::span< const ProverOpeningClaim< Curve > > opening_claims)
 Compute evaluations of fold polynomials Fold_i at r^{2^i} for i>0. TODO(https://github.com/AztecProtocol/barretenberg/issues/1223): Reconsider minor performance/memory optimizations in Gemini.
 
template<typename Transcript >
static ProverOpeningClaim< Curveprove (const CommitmentKey< Curve > &commitment_key, std::span< ProverOpeningClaim< Curve > > opening_claims, const std::shared_ptr< Transcript > &transcript, std::span< ProverOpeningClaim< Curve > > libra_opening_claims={}, std::span< ProverOpeningClaim< Curve > > sumcheck_round_claims={}, const size_t virtual_log_n=0)
 Returns a batched opening claim equivalent to a set of opening claims consisting of polynomials, each opened at a single point.
 

Private Types

using Fr = typename Curve::ScalarField
 
using Polynomial = bb::Polynomial< Fr >
 

Detailed Description

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

Shplonk Prover.

Template Parameters
CurveEC parameters

Definition at line 36 of file shplonk.hpp.

Member Typedef Documentation

◆ Fr

template<typename Curve >
using bb::ShplonkProver_< Curve >::Fr = typename Curve::ScalarField
private

Definition at line 37 of file shplonk.hpp.

◆ Polynomial

template<typename Curve >
using bb::ShplonkProver_< Curve >::Polynomial = bb::Polynomial<Fr>
private

Definition at line 38 of file shplonk.hpp.

Member Function Documentation

◆ compute_batched_quotient()

template<typename Curve >
static Polynomial bb::ShplonkProver_< Curve >::compute_batched_quotient ( const size_t  virtual_log_n,
std::span< const ProverOpeningClaim< Curve > >  opening_claims,
const Fr nu,
std::span< Fr gemini_fold_pos_evaluations,
std::span< const ProverOpeningClaim< Curve > >  libra_opening_claims,
std::span< const ProverOpeningClaim< Curve > >  sumcheck_round_claims 
)
inlinestatic

Compute batched quotient polynomial Q(X) = ∑ⱼ νʲ ⋅ ( fⱼ(X) − vⱼ) / ( X − xⱼ )

Parameters
opening_claimslist of prover opening claims {fⱼ(X), (xⱼ, vⱼ)} for a witness polynomial fⱼ(X), s.t. fⱼ(xⱼ) = vⱼ.
nubatching challenge
Returns
Polynomial Q(X)

Definition at line 49 of file shplonk.hpp.

◆ compute_gemini_fold_pos_evaluations()

template<typename Curve >
static std::vector< Fr > bb::ShplonkProver_< Curve >::compute_gemini_fold_pos_evaluations ( std::span< const ProverOpeningClaim< Curve > >  opening_claims)
inlinestatic

Compute evaluations of fold polynomials Fold_i at r^{2^i} for i>0. TODO(https://github.com/AztecProtocol/barretenberg/issues/1223): Reconsider minor performance/memory optimizations in Gemini.

Parameters
opening_claims
Returns
std::vector<Fr>

Definition at line 239 of file shplonk.hpp.

◆ compute_partially_evaluated_batched_quotient()

template<typename Curve >
static ProverOpeningClaim< Curve > bb::ShplonkProver_< Curve >::compute_partially_evaluated_batched_quotient ( const size_t  virtual_log_n,
std::span< ProverOpeningClaim< Curve > >  opening_claims,
Polynomial batched_quotient_Q,
const Fr nu_challenge,
const Fr z_challenge,
std::span< Fr gemini_fold_pos_evaluations,
std::span< ProverOpeningClaim< Curve > >  libra_opening_claims = {},
std::span< ProverOpeningClaim< Curve > >  sumcheck_opening_claims = {} 
)
inlinestatic

Compute partially evaluated batched quotient polynomial difference Q(X) - Q_z(X)

Parameters
opening_pairslist of opening pairs (xⱼ, vⱼ) for a witness polynomial fⱼ(X), s.t. fⱼ(xⱼ) = vⱼ.
witness_polynomialslist of polynomials fⱼ(X).
batched_quotient_QQ(X) = ∑ⱼ νʲ ⋅ ( fⱼ(X) − vⱼ) / ( X − xⱼ )
nu_challenge
z_challenge
Returns
Output{OpeningPair, Polynomial}

Definition at line 139 of file shplonk.hpp.

◆ prove()

template<typename Curve >
template<typename Transcript >
static ProverOpeningClaim< Curve > bb::ShplonkProver_< Curve >::prove ( const CommitmentKey< Curve > &  commitment_key,
std::span< ProverOpeningClaim< Curve > >  opening_claims,
const std::shared_ptr< Transcript > &  transcript,
std::span< ProverOpeningClaim< Curve > >  libra_opening_claims = {},
std::span< ProverOpeningClaim< Curve > >  sumcheck_round_claims = {},
const size_t  virtual_log_n = 0 
)
inlinestatic

Returns a batched opening claim equivalent to a set of opening claims consisting of polynomials, each opened at a single point.

Parameters
commitment_key
opening_claims
transcript
Returns
ProverOpeningClaim<Curve>

Definition at line 267 of file shplonk.hpp.


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