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

Unified ECCVM verifier class for both native and recursive verification. More...

#include <eccvm_verifier.hpp>

Public Types

using FF = Flavor::FF
 
using BF = Flavor::BF
 
using Curve = Flavor::Curve
 
using Commitment = Flavor::Commitment
 
using CommitmentLabels = Flavor::CommitmentLabels
 
using Transcript = Flavor::Transcript
 
using VerificationKey = Flavor::VerificationKey
 
using VerifierCommitments = Flavor::VerifierCommitments
 
using VerifierCommitmentKey = Flavor::VerifierCommitmentKey
 
using Proof = Flavor::Proof
 
using PCS = Flavor::PCS
 
using TranslatorInputData = TranslatorInputData_< FF >
 
using Builder = std::conditional_t< IsRecursive, typename Flavor::CircuitBuilder, void >
 

Public Member Functions

 ECCVMVerifier_ (const std::shared_ptr< Transcript > &transcript, const Proof &proof)
 
OpeningClaim< Curveverify_proof ()
 Verifies an ECCVM Honk proof for given program settings.
 
void compute_translation_opening_claims (const std::vector< Commitment > &translation_commitments)
 To link the ECCVM Transcript wires op, Px, Py, z1, and z2 to the accumulator computed by the translator, we verify their evaluations as univariates. For efficiency reasons, we batch these evaluations.
 
void compute_accumulated_result ()
 
TranslatorInputData get_translator_input_data () const
 Get the data required by the TranslatorVerifier.
 

Public Attributes

std::shared_ptr< VerificationKeykey
 
Proof proof
 
BF vk_hash
 
std::conditional_t< IsRecursive, Builder *, void * > builder = nullptr
 
std::array< OpeningClaim< Curve >, NUM_OPENING_CLAIMSopening_claims
 
bool sumcheck_verified = false
 
bool consistency_checked = false
 
std::shared_ptr< Transcripttranscript
 
TranslationEvaluations_< FFtranslation_evaluations
 
bool translation_masking_consistency_checked = false
 

Static Public Attributes

static constexpr bool IsRecursive = Curve::is_stdlib_type
 
static constexpr size_t NUM_OPENING_CLAIMS = ECCVMFlavor::NUM_TRANSLATION_OPENING_CLAIMS + 1
 

Private Attributes

FF evaluation_challenge_x
 
FF batching_challenge_v
 
FF translation_masking_term_eval
 
FF accumulated_result
 

Detailed Description

template<typename Flavor>
class bb::ECCVMVerifier_< Flavor >

Unified ECCVM verifier class for both native and recursive verification.

Template Parameters
FlavorEither ECCVMFlavor (native) or ECCVMRecursiveFlavor (recursive)

Definition at line 19 of file eccvm_verifier.hpp.

Member Typedef Documentation

◆ BF

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::BF = Flavor::BF

Definition at line 22 of file eccvm_verifier.hpp.

◆ Builder

Definition at line 35 of file eccvm_verifier.hpp.

◆ Commitment

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::Commitment = Flavor::Commitment

Definition at line 24 of file eccvm_verifier.hpp.

◆ CommitmentLabels

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::CommitmentLabels = Flavor::CommitmentLabels

Definition at line 25 of file eccvm_verifier.hpp.

◆ Curve

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::Curve = Flavor::Curve

Definition at line 23 of file eccvm_verifier.hpp.

◆ FF

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::FF = Flavor::FF

Definition at line 21 of file eccvm_verifier.hpp.

◆ PCS

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::PCS = Flavor::PCS

Definition at line 31 of file eccvm_verifier.hpp.

◆ Proof

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::Proof = Flavor::Proof

Definition at line 30 of file eccvm_verifier.hpp.

◆ Transcript

Definition at line 26 of file eccvm_verifier.hpp.

◆ TranslatorInputData

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::TranslatorInputData = TranslatorInputData_<FF>

Definition at line 32 of file eccvm_verifier.hpp.

◆ VerificationKey

Definition at line 27 of file eccvm_verifier.hpp.

◆ VerifierCommitmentKey

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::VerifierCommitmentKey = Flavor::VerifierCommitmentKey

Definition at line 29 of file eccvm_verifier.hpp.

◆ VerifierCommitments

template<typename Flavor >
using bb::ECCVMVerifier_< Flavor >::VerifierCommitments = Flavor::VerifierCommitments

Definition at line 28 of file eccvm_verifier.hpp.

Constructor & Destructor Documentation

◆ ECCVMVerifier_()

template<typename Flavor >
bb::ECCVMVerifier_< Flavor >::ECCVMVerifier_ ( const std::shared_ptr< Transcript > &  transcript,
const Proof proof 
)
inline

Definition at line 39 of file eccvm_verifier.hpp.

Member Function Documentation

◆ compute_accumulated_result()

template<typename Flavor >
void bb::ECCVMVerifier_< Flavor >::compute_accumulated_result ( )

Definition at line 245 of file eccvm_verifier.cpp.

◆ compute_translation_opening_claims()

template<typename Flavor >
void bb::ECCVMVerifier_< Flavor >::compute_translation_opening_claims ( const std::vector< Commitment > &  translation_commitments)

To link the ECCVM Transcript wires op, Px, Py, z1, and z2 to the accumulator computed by the translator, we verify their evaluations as univariates. For efficiency reasons, we batch these evaluations.

For details, see the docs of ECCVMProver::compute_translation_opening_claims() method.

Parameters
translation_commitmentsCommitments to op, Px, Py, z1, and z2
Returns
Populate opening_claims.

Definition at line 148 of file eccvm_verifier.cpp.

◆ get_translator_input_data()

template<typename Flavor >
TranslatorInputData bb::ECCVMVerifier_< Flavor >::get_translator_input_data ( ) const
inline

Get the data required by the TranslatorVerifier.

Returns
TranslatorInputData containing evaluation_challenge_x, batching_challenge_v, and accumulated_result

Definition at line 67 of file eccvm_verifier.hpp.

◆ verify_proof()

template<typename Flavor >
OpeningClaim< typename Flavor::Curve > bb::ECCVMVerifier_< Flavor >::verify_proof ( )

Verifies an ECCVM Honk proof for given program settings.

Works for both native verification and recursive (in-circuit) verification.

Definition at line 19 of file eccvm_verifier.cpp.

Member Data Documentation

◆ accumulated_result

template<typename Flavor >
FF bb::ECCVMVerifier_< Flavor >::accumulated_result
private

Definition at line 100 of file eccvm_verifier.hpp.

◆ batching_challenge_v

template<typename Flavor >
FF bb::ECCVMVerifier_< Flavor >::batching_challenge_v
private

Definition at line 96 of file eccvm_verifier.hpp.

◆ builder

template<typename Flavor >
std::conditional_t<IsRecursive, Builder*, void*> bb::ECCVMVerifier_< Flavor >::builder = nullptr

Definition at line 78 of file eccvm_verifier.hpp.

◆ consistency_checked

template<typename Flavor >
bool bb::ECCVMVerifier_< Flavor >::consistency_checked = false

Definition at line 87 of file eccvm_verifier.hpp.

◆ evaluation_challenge_x

template<typename Flavor >
FF bb::ECCVMVerifier_< Flavor >::evaluation_challenge_x
private

Definition at line 95 of file eccvm_verifier.hpp.

◆ IsRecursive

template<typename Flavor >
constexpr bool bb::ECCVMVerifier_< Flavor >::IsRecursive = Curve::is_stdlib_type
staticconstexpr

Definition at line 34 of file eccvm_verifier.hpp.

◆ key

template<typename Flavor >
std::shared_ptr<VerificationKey> bb::ECCVMVerifier_< Flavor >::key

Definition at line 72 of file eccvm_verifier.hpp.

◆ NUM_OPENING_CLAIMS

template<typename Flavor >
constexpr size_t bb::ECCVMVerifier_< Flavor >::NUM_OPENING_CLAIMS = ECCVMFlavor::NUM_TRANSLATION_OPENING_CLAIMS + 1
staticconstexpr

Definition at line 82 of file eccvm_verifier.hpp.

◆ opening_claims

template<typename Flavor >
std::array<OpeningClaim<Curve>, NUM_OPENING_CLAIMS> bb::ECCVMVerifier_< Flavor >::opening_claims

Definition at line 83 of file eccvm_verifier.hpp.

◆ proof

template<typename Flavor >
Proof bb::ECCVMVerifier_< Flavor >::proof

Definition at line 73 of file eccvm_verifier.hpp.

◆ sumcheck_verified

template<typename Flavor >
bool bb::ECCVMVerifier_< Flavor >::sumcheck_verified = false

Definition at line 86 of file eccvm_verifier.hpp.

◆ transcript

template<typename Flavor >
std::shared_ptr<Transcript> bb::ECCVMVerifier_< Flavor >::transcript

Definition at line 88 of file eccvm_verifier.hpp.

◆ translation_evaluations

template<typename Flavor >
TranslationEvaluations_<FF> bb::ECCVMVerifier_< Flavor >::translation_evaluations

Definition at line 89 of file eccvm_verifier.hpp.

◆ translation_masking_consistency_checked

template<typename Flavor >
bool bb::ECCVMVerifier_< Flavor >::translation_masking_consistency_checked = false

Definition at line 91 of file eccvm_verifier.hpp.

◆ translation_masking_term_eval

template<typename Flavor >
FF bb::ECCVMVerifier_< Flavor >::translation_masking_term_eval
private

Definition at line 98 of file eccvm_verifier.hpp.

◆ vk_hash

template<typename Flavor >
BF bb::ECCVMVerifier_< Flavor >::vk_hash

Definition at line 75 of file eccvm_verifier.hpp.


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