Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
verifier_commitment_key.hpp
Go to the documentation of this file.
1// === AUDIT STATUS ===
2// internal: { status: Planned, auditors: [], commit: }
3// external_1: { status: not started, auditors: [], commit: }
4// external_2: { status: not started, auditors: [], commit: }
5// =====================
6
7#pragma once
9namespace bb {
10
16template <typename Curve_> class VerifierCommitmentKey {
17 public:
18 using Curve = Curve_;
19 using Builder = Curve::Builder;
21 using NativeEmbeddedCurve = typename Builder::EmbeddedCurve;
22
32 size_t num_points,
33 const VerifierCommitmentKey<NativeEmbeddedCurve>& native_pcs_verification_key)
34 {
35 auto native_points = native_pcs_verification_key.get_monomial_points();
36 BB_ASSERT_LTE(num_points, native_points.size());
37 for (size_t i = 0; i < num_points; i += 1) {
38 monomial_points.emplace_back(Commitment(native_points[i]));
39 }
40 }
41
42 std::vector<Commitment> get_monomial_points() const { return monomial_points; }
43
44 private:
45 std::vector<Commitment> monomial_points;
46};
47} // namespace bb
#define BB_ASSERT_LTE(left, right,...)
Definition assert.hpp:158
Representation of the Grumpkin Verifier Commitment Key inside a bn254 circuit.
VerifierCommitmentKey(Builder *builder, size_t num_points, const VerifierCommitmentKey< NativeEmbeddedCurve > &native_pcs_verification_key)
Construct a recursive (in-circuit) Verifier Commitment Key from its native Grumpkin counterpart....
typename Builder::EmbeddedCurve NativeEmbeddedCurve
std::vector< Commitment > get_monomial_points() const
std::vector< Commitment > monomial_points
typename Group::affine_element AffineElement
Definition grumpkin.hpp:64
AluTraceBuilder builder
Definition alu.test.cpp:124
Entry point for Barretenberg command-line interface.
Definition api.hpp:5