|
barretenberg
|
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
|
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 |