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: 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
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
33 size_t num_points,
34 const VerifierCommitmentKey<NativeEmbeddedCurve>& native_pcs_verification_key)
35 : g1_identity(Commitment(native_pcs_verification_key.get_g1_identity()))
36 {
37
38 auto native_points = native_pcs_verification_key.get_monomial_points();
39 BB_ASSERT_LTE(num_points, native_points.size());
40 for (size_t i = 0; i < num_points; i += 1) {
41 monomial_points.emplace_back(Commitment(native_points[i]));
42 }
43 }
44
46
48 std::vector<Commitment> get_monomial_points() const { return monomial_points; }
49
50 private:
52 std::vector<Commitment> monomial_points;
53};
54} // namespace bb
#define BB_ASSERT_LTE(left, right,...)
Definition assert.hpp:129
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 new Verifier Commitment Key object from its native counterpart. instantiated on Grumpkin....
typename Builder::EmbeddedCurve NativeEmbeddedCurve
std::vector< Commitment > get_monomial_points() const
std::vector< Commitment > monomial_points
typename Group::affine_element AffineElement
Definition grumpkin.hpp:56
AluTraceBuilder builder
Definition alu.test.cpp:123
Entry point for Barretenberg command-line interface.