|
Barretenberg
The ZK-SNARK library at the core of Aztec
|
stdlib class that evaluates in-circuit pedersen hashes, consistent with behavior in crypto::pedersen_hash More...
#include <pedersen.hpp>
Static Public Member Functions | |
| static field_ct | hash (const std::vector< field_ct > &in, GeneratorContext context={}) |
| Computes a pedersen hash of the provided inputs. | |
Private Types | |
| using | field_ct = stdlib::field_t< Builder > |
| using | bool_t = stdlib::bool_t< Builder > |
| using | EmbeddedCurve = typename cycle_group< Builder >::Curve |
| using | GeneratorContext = crypto::GeneratorContext< EmbeddedCurve > |
| using | cycle_group = stdlib::cycle_group< Builder > |
stdlib class that evaluates in-circuit pedersen hashes, consistent with behavior in crypto::pedersen_hash
| Builder |
Definition at line 23 of file pedersen.hpp.
|
private |
Definition at line 27 of file pedersen.hpp.
|
private |
Definition at line 30 of file pedersen.hpp.
|
private |
Definition at line 28 of file pedersen.hpp.
|
private |
Definition at line 26 of file pedersen.hpp.
|
private |
Definition at line 29 of file pedersen.hpp.
|
static |
Computes a pedersen hash of the provided inputs.
The pedersen hash is computed as the x-coordinate of the point: P = \sum_i inputs[i] * G_i + len * H, where G_i and H are generator points of the Grumpkin curve and len is the number of inputs. The len * H term is included to avoid the trivial collision that otherwise results from negating all inputs. See crypto::pedersen_hash for more details.
| Builder |
| inputs | The field elements to be hashed |
| context | (optional) context for generator selection/construction |
Definition at line 29 of file pedersen.cpp.