|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
CommitmentKey object over a pairing group 𝔾₁. More...
#include <commitment_key.hpp>
Classes | |
| struct | CommitBatch |
Public Member Functions | |
| CommitmentKey ()=default | |
| CommitmentKey (const size_t num_points) | |
| Construct a new Kate Commitment Key object from existing SRS. | |
| bool | initialized () const |
| Checks the commitment key is properly initialized. | |
| std::span< Commitment > | get_monomial_points () const |
| size_t | get_monomial_size () const |
| Commitment | commit (PolynomialSpan< const Fr > polynomial) const |
| Uses the ProverSRS to create a commitment to p(X) | |
| std::vector< Commitment > | batch_commit (RefSpan< Polynomial< Fr > > polynomials, size_t max_batch_size=std::numeric_limits< size_t >::max()) const |
| Batch commitment to multiple polynomials. | |
| CommitBatch | start_batch () |
Public Attributes | |
| size_t | srs_size |
Protected Attributes | |
| std::shared_ptr< srs::factories::Crs< Curve > > | srs |
Private Types | |
| using | Fr = typename Curve::ScalarField |
| using | Commitment = typename Curve::AffineElement |
CommitmentKey object over a pairing group 𝔾₁.
Commitments are computed as C = [p(x)] = ∑ᵢ aᵢ⋅Gᵢ where Gᵢ is the i-th element of the SRS. For BN254, the SRS is given as a list of 𝔾₁ points { [xʲ]₁ }ⱼ where 'x' is unknown. For Grumpkin, they are random points. The SRS stored in the commitment key is after applying the pippenger_point_table thus being double the size of what is loaded from path.
Definition at line 35 of file commitment_key.hpp.
|
private |
Definition at line 38 of file commitment_key.hpp.
|
private |
Definition at line 37 of file commitment_key.hpp.
|
default |
|
inline |
Construct a new Kate Commitment Key object from existing SRS.
| num_points | Number of points needed for commitments |
Definition at line 53 of file commitment_key.hpp.
|
inline |
Batch commitment to multiple polynomials.
Uses batch_multi_scalar_mul for more efficient processing when committing to multiple polynomials. The input polynomials are not const because batch_mul modifies them and then restores them back.
| polynomials | vector of polynomial spans to commit to |
Definition at line 94 of file commitment_key.hpp.
|
inline |
Uses the ProverSRS to create a commitment to p(X)
| polynomial | a univariate polynomial p(X) = ∑ᵢ aᵢ⋅Xⁱ |
Definition at line 73 of file commitment_key.hpp.
|
inline |
Definition at line 64 of file commitment_key.hpp.
|
inline |
Definition at line 65 of file commitment_key.hpp.
|
inline |
Checks the commitment key is properly initialized.
Definition at line 62 of file commitment_key.hpp.
|
inline |
Definition at line 162 of file commitment_key.hpp.
|
protected |
Definition at line 41 of file commitment_key.hpp.
| size_t bb::CommitmentKey< Curve >::srs_size |
Definition at line 44 of file commitment_key.hpp.