barretenberg
Loading...
Searching...
No Matches
eccvm_verifier.hpp
1#pragma once
2#include "barretenberg/flavor/ecc_vm.hpp"
3#include "barretenberg/plonk/proof_system/types/proof.hpp"
4#include "barretenberg/sumcheck/sumcheck.hpp"
5
6namespace proof_system::honk {
7template <typename Flavor> class ECCVMVerifier_ {
8 using FF = typename Flavor::FF;
9 using Commitment = typename Flavor::Commitment;
10 using VerificationKey = typename Flavor::VerificationKey;
11 using VerifierCommitmentKey = typename Flavor::VerifierCommitmentKey;
12 using Transcript = typename Flavor::Transcript;
13
14 public:
15 explicit ECCVMVerifier_(const std::shared_ptr<VerificationKey>& verifier_key = nullptr);
16 ECCVMVerifier_(const std::shared_ptr<VerificationKey>& key,
17 std::map<std::string, Commitment> commitments,
18 std::map<std::string, FF> pcs_fr_elements,
19 const std::shared_ptr<VerifierCommitmentKey>& pcs_verification_key,
20 const std::shared_ptr<Transcript>& transcript)
21 : key(std::move(key))
22 , commitments(std::move(commitments))
23 , pcs_fr_elements(std::move(pcs_fr_elements))
24 , pcs_verification_key(std::move(pcs_verification_key))
25 , transcript(std::move(transcript))
26 {}
27 ECCVMVerifier_(ECCVMVerifier_&& other) noexcept;
28 ECCVMVerifier_(const ECCVMVerifier_& other) = delete;
29 ECCVMVerifier_& operator=(const ECCVMVerifier_& other) = delete;
30 ECCVMVerifier_& operator=(ECCVMVerifier_&& other) noexcept;
31 ~ECCVMVerifier_() = default;
32
33 bool verify_proof(const plonk::proof& proof);
34
35 std::shared_ptr<VerificationKey> key;
36 std::map<std::string, Commitment> commitments;
37 std::map<std::string, FF> pcs_fr_elements;
38 std::shared_ptr<VerifierCommitmentKey> pcs_verification_key;
39 std::shared_ptr<Transcript> transcript;
40};
41
42extern template class ECCVMVerifier_<honk::flavor::ECCVM>;
44
45} // namespace proof_system::honk
Common transcript class for both parties. Stores the data for the current round, as well as the manif...
Definition: transcript.hpp:62
Definition: eccvm_verifier.hpp:7
bool verify_proof(const plonk::proof &proof)
This function verifies an ECCVM Honk proof for given program settings.
Definition: eccvm_verifier.cpp:36
VerificationKey_< PrecomputedEntities< Commitment > > VerificationKey
The verification key is responsible for storing the the commitments to the precomputed (non-witnessk)...
Definition: goblin_translator.hpp:941
Definition: verification_key.hpp:25
Defines particular circuit builder types expected to be used for circuit construction in stdlib and c...
Definition: claim.hpp:6
Definition: proof.hpp:11