|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
Performs pedersen commitments! More...
#include <pedersen.hpp>
Public Types | |
| using | AffineElement = typename Curve::AffineElement |
| using | Element = typename Curve::Element |
| using | Fr = typename Curve::ScalarField |
| using | Fq = typename Curve::BaseField |
| using | Group = typename Curve::Group |
| using | GeneratorContext = typename crypto::GeneratorContext< Curve > |
Static Public Member Functions | |
| static AffineElement | commit_native (const std::vector< Fq > &inputs, GeneratorContext context={}) |
| Given a vector of fields, generate a pedersen commitment using the indexed generators. | |
Performs pedersen commitments!
To commit to a size-n list of field elements x, a commitment is defined as:
Commit(x) = x[0].g[0] + x[1].g[1] + ... + x[n-1].g[n-1]
Where g is a list of generator points defined by generator_data
Definition at line 27 of file pedersen.hpp.
| using bb::crypto::pedersen_commitment_base< Curve >::AffineElement = typename Curve::AffineElement |
Definition at line 29 of file pedersen.hpp.
| using bb::crypto::pedersen_commitment_base< Curve >::Element = typename Curve::Element |
Definition at line 30 of file pedersen.hpp.
| using bb::crypto::pedersen_commitment_base< Curve >::Fq = typename Curve::BaseField |
Definition at line 32 of file pedersen.hpp.
| using bb::crypto::pedersen_commitment_base< Curve >::Fr = typename Curve::ScalarField |
Definition at line 31 of file pedersen.hpp.
| using bb::crypto::pedersen_commitment_base< Curve >::GeneratorContext = typename crypto::GeneratorContext<Curve> |
Definition at line 34 of file pedersen.hpp.
| using bb::crypto::pedersen_commitment_base< Curve >::Group = typename Curve::Group |
Definition at line 33 of file pedersen.hpp.
|
static |
Given a vector of fields, generate a pedersen commitment using the indexed generators.
This method uses Curve::BaseField members as inputs. This aligns with what we expect when creating grumpkin commitments to field elements inside a BN254 SNARK circuit.
| inputs | |
| context |
Definition at line 24 of file pedersen.cpp.