|
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. | |
| 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 | |
| std::shared_ptr< srs::factories::Crs< Curve > > | srs |
| size_t | dyadic_size |
Private Types | |
| using | Fr = typename Curve::ScalarField |
| using | Commitment = typename Curve::AffineElement |
| using | G1 = typename Curve::AffineElement |
Static Private Member Functions | |
| static size_t | get_num_needed_srs_points (size_t num_points) |
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 43 of file commitment_key.hpp.
|
private |
Definition at line 46 of file commitment_key.hpp.
|
private |
Definition at line 45 of file commitment_key.hpp.
|
private |
Definition at line 47 of file commitment_key.hpp.
|
default |
|
inline |
Construct a new Kate Commitment Key object from existing SRS.
| n | |
| path |
Definition at line 71 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
| polynomials | vector of polynomial spans to commit to |
Definition at line 114 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 88 of file commitment_key.hpp.
|
inlinestaticprivate |
Definition at line 49 of file commitment_key.hpp.
|
inline |
Checks the commitment key is properly initialized.
Definition at line 80 of file commitment_key.hpp.
|
inline |
Definition at line 182 of file commitment_key.hpp.
| size_t bb::CommitmentKey< Curve >::dyadic_size |
Definition at line 60 of file commitment_key.hpp.
| std::shared_ptr<srs::factories::Crs<Curve> > bb::CommitmentKey< Curve >::srs |
Definition at line 59 of file commitment_key.hpp.