|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
In-circuit Pedersen commitment implementation. More...
#include <pedersen.hpp>
Static Public Member Functions | |
| static cycle_group | commit (const std::vector< field_t > &inputs, GeneratorContext context={}) |
| Compute a Pedersen commitment to the provided inputs. | |
Private Types | |
| using | field_t = stdlib::field_t< Builder > |
| using | cycle_group = stdlib::cycle_group< Builder > |
| using | EmbeddedCurve = typename cycle_group::Curve |
| using | cycle_scalar = typename cycle_group::cycle_scalar |
| using | GeneratorContext = crypto::GeneratorContext< EmbeddedCurve > |
In-circuit Pedersen commitment implementation.
| Builder |
Definition at line 19 of file pedersen.hpp.
|
private |
Definition at line 22 of file pedersen.hpp.
|
private |
Definition at line 24 of file pedersen.hpp.
|
private |
Definition at line 23 of file pedersen.hpp.
|
private |
Definition at line 21 of file pedersen.hpp.
|
private |
Definition at line 25 of file pedersen.hpp.
|
static |
Compute a Pedersen commitment to the provided inputs.
Computes commit(inputs) = sum_i inputs[i] * G_i where G_i are Grumpkin curve generators derived from the provided GeneratorContext. The inputs are converted from field_t (circuit representation of BN254 scalars) to cycle_scalar (circuit representation of Grumpkin scalars) in order to perform the batch multiplication.
| Builder |
| inputs | Vector of BN254 scalar field elements to commit to |
| context | Generator configuration specifying offset and domain separator for deterministic generator selection |
Definition at line 26 of file pedersen.cpp.