Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
decider_verifier.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: not started, auditors: [], date: YYYY-MM-DD }
3// external_1: { status: not started, auditors: [], date: YYYY-MM-DD }
4// external_2: { status: not started, auditors: [], date: YYYY-MM-DD }
5// =====================
6
7#pragma once
15
16namespace bb {
17template <typename Flavor> class DeciderVerifier_ {
18 using FF = typename Flavor::FF;
24
25 public:
26 struct Output {
30
31 bool check()
32 {
33 bool pairing_check_verified = pairing_points.check();
34 vinfo("sumcheck_verified: ", sumcheck_verified);
35 vinfo("libra_evals_verified: ", libra_evals_verified);
36 vinfo("pairing_check_verified: ", pairing_check_verified);
37 return sumcheck_verified && libra_evals_verified && pairing_check_verified;
38 }
39 };
40
41 explicit DeciderVerifier_();
48 explicit DeciderVerifier_(const std::shared_ptr<DeciderVerificationKey>& verification_key,
49 const std::shared_ptr<Transcript>& transcript = std::make_shared<Transcript>());
50
51 Output verify_proof(const DeciderProof&); // used when a decider proof is known explicitly
52 Output verify(); // used with a transcript that has been initialized with a proof
53 std::shared_ptr<VerificationKey> key;
55 std::shared_ptr<Transcript> transcript;
56};
57
61
62} // namespace bb
typename TranscriptParams::Proof Proof
The DeciderVerificationKey encapsulates all the necessary information for a Mega Honk Verifier to ver...
typename Flavor::Transcript Transcript
Output verify()
Verify a decider proof that is assumed to be contained in the transcript.
typename Flavor::FF FF
typename Flavor::Commitment Commitment
typename Transcript::Proof DeciderProof
std::shared_ptr< Transcript > transcript
Output verify_proof(const DeciderProof &)
Verify a decider proof relative to a decider verification key (ϕ, \vec{β*}, e*).
typename Flavor::VerificationKey VerificationKey
std::shared_ptr< VerificationKey > key
std::shared_ptr< DeciderVerificationKey > accumulator
The verification key is responsible for storing the commitments to the precomputed (non-witness) poly...
Curve::ScalarField FF
NativeTranscript Transcript
Curve::AffineElement Commitment
An object storing two bn254 points that represent the inputs to a pairing check.
bool check() const
Perform the pairing check.
void vinfo(Args... args)
Definition log.hpp:76
Entry point for Barretenberg command-line interface.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13