Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::stdlib::pedersen_hash< Builder > Class Template Reference

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={})
 
static field_ct hash_skip_field_validation (const std::vector< field_ct > &in, GeneratorContext context={})
 
static field_ct hash_buffer (const stdlib::byte_array< Builder > &input, GeneratorContext context={})
 Hash a byte_array.
 

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 >
 

Detailed Description

template<typename Builder>
class bb::stdlib::pedersen_hash< Builder >

stdlib class that evaluates in-circuit pedersen hashes, consistent with behavior in crypto::pedersen_hash

Template Parameters
Builder

Definition at line 23 of file pedersen.hpp.

Member Typedef Documentation

◆ bool_t

template<typename Builder >
using bb::stdlib::pedersen_hash< Builder >::bool_t = stdlib::bool_t<Builder>
private

Definition at line 27 of file pedersen.hpp.

◆ cycle_group

template<typename Builder >
using bb::stdlib::pedersen_hash< Builder >::cycle_group = stdlib::cycle_group<Builder>
private

Definition at line 30 of file pedersen.hpp.

◆ EmbeddedCurve

template<typename Builder >
using bb::stdlib::pedersen_hash< Builder >::EmbeddedCurve = typename cycle_group<Builder>::Curve
private

Definition at line 28 of file pedersen.hpp.

◆ field_ct

Definition at line 26 of file pedersen.hpp.

◆ GeneratorContext

template<typename Builder >
using bb::stdlib::pedersen_hash< Builder >::GeneratorContext = crypto::GeneratorContext<EmbeddedCurve>
private

Definition at line 29 of file pedersen.hpp.

Member Function Documentation

◆ hash()

template<typename C >
field_t< C > bb::stdlib::pedersen_hash< C >::hash ( const std::vector< field_ct > &  in,
GeneratorContext  context = {} 
)
static

Definition at line 15 of file pedersen.cpp.

◆ hash_buffer()

template<typename Builder >
field_t< C > bb::stdlib::pedersen_hash< C >::hash_buffer ( const stdlib::byte_array< Builder > &  input,
GeneratorContext  context = {} 
)
static

Hash a byte_array.

TODO(@zac-williamson #2796) Once Poseidon is implemented, replace this method with a more canonical hash algorithm (that is less efficient)

Definition at line 67 of file pedersen.cpp.

◆ hash_skip_field_validation()

template<typename C >
field_t< C > bb::stdlib::pedersen_hash< C >::hash_skip_field_validation ( const std::vector< field_ct > &  in,
GeneratorContext  context = {} 
)
static

Definition at line 37 of file pedersen.cpp.


The documentation for this class was generated from the following files: