Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
Public Member Functions | Static Public Member Functions | List of all members
libzeth::BLAKE2s_256< FieldT > Class Template Reference

#include <blake2s.hpp>

Inheritance diagram for libzeth::BLAKE2s_256< FieldT >:
Inheritance graph
[legend]
Collaboration diagram for libzeth::BLAKE2s_256< FieldT >:
Collaboration graph
[legend]

Public Member Functions

 BLAKE2s_256 (libsnark::protoboard< FieldT > &pb, const libsnark::block_variable< FieldT > &input, const libsnark::digest_variable< FieldT > &output, const std::string &annotation_prefix="blake2s_gadget")
 
void generate_r1cs_constraints (const bool ensure_output_bitness=true)
 
void generate_r1cs_witness ()
 

Static Public Member Functions

static constexpr size_t get_block_len ()
 
static constexpr size_t get_digest_len ()
 
static libff::bit_vector get_hash (const libff::bit_vector &input)
 
static size_t expected_constraints (const bool ensure_output_bitness)
 

Detailed Description

template<typename FieldT>
class libzeth::BLAKE2s_256< FieldT >

BLAKE2s_256 is the gadget implementing the BLAKE2s hash function for digests of length 256

Definition at line 24 of file blake2s.hpp.

Constructor & Destructor Documentation

◆ BLAKE2s_256()

template<typename FieldT >
libzeth::BLAKE2s_256< FieldT >::BLAKE2s_256 ( libsnark::protoboard< FieldT > &  pb,
const libsnark::block_variable< FieldT > &  input,
const libsnark::digest_variable< FieldT > &  output,
const std::string &  annotation_prefix = "blake2s_gadget" 
)

Member Function Documentation

◆ expected_constraints()

template<typename FieldT >
static size_t libzeth::BLAKE2s_256< FieldT >::expected_constraints ( const bool  ensure_output_bitness)
static

◆ generate_r1cs_constraints()

template<typename FieldT >
void libzeth::BLAKE2s_256< FieldT >::generate_r1cs_constraints ( const bool  ensure_output_bitness = true)

◆ generate_r1cs_witness()

template<typename FieldT >
void libzeth::BLAKE2s_256< FieldT >::generate_r1cs_witness ( )

◆ get_block_len()

template<typename FieldT >
static constexpr size_t libzeth::BLAKE2s_256< FieldT >::get_block_len ( )
staticconstexpr

◆ get_digest_len()

template<typename FieldT >
static constexpr size_t libzeth::BLAKE2s_256< FieldT >::get_digest_len ( )
staticconstexpr

◆ get_hash()

template<typename FieldT >
static libff::bit_vector libzeth::BLAKE2s_256< FieldT >::get_hash ( const libff::bit_vector &  input)
static

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