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

#include <sha256_ethereum.hpp>

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

Public Types

typedef libff::bit_vector hash_value_type
 
typedef libsnark::merkle_authentication_path merkle_authentication_path_type
 

Public Member Functions

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

Static Public Member Functions

static size_t get_block_len ()
 
static 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::sha256_ethereum< FieldT >

Definition at line 26 of file sha256_ethereum.hpp.

Member Typedef Documentation

◆ hash_value_type

template<typename FieldT >
typedef libff::bit_vector libzeth::sha256_ethereum< FieldT >::hash_value_type

Definition at line 39 of file sha256_ethereum.hpp.

◆ merkle_authentication_path_type

template<typename FieldT >
typedef libsnark::merkle_authentication_path libzeth::sha256_ethereum< FieldT >::merkle_authentication_path_type

Definition at line 42 of file sha256_ethereum.hpp.

Constructor & Destructor Documentation

◆ sha256_ethereum()

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

Member Function Documentation

◆ expected_constraints()

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

◆ generate_r1cs_constraints()

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

◆ generate_r1cs_witness()

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

◆ get_block_len()

template<typename FieldT >
static size_t libzeth::sha256_ethereum< FieldT >::get_block_len ( )
static

◆ get_digest_len()

template<typename FieldT >
static size_t libzeth::sha256_ethereum< FieldT >::get_digest_len ( )
static

◆ get_hash()

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

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