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

#include <prf.hpp>

Inheritance diagram for libzeth::PRF_pk_gadget< FieldT, HashT >:
Inheritance graph
[legend]
Collaboration diagram for libzeth::PRF_pk_gadget< FieldT, HashT >:
Collaboration graph
[legend]

Public Member Functions

 PRF_pk_gadget (libsnark::protoboard< FieldT > &pb, const libsnark::pb_variable< FieldT > &ZERO, const libsnark::pb_variable_array< FieldT > &a_sk, const libsnark::pb_variable_array< FieldT > &h_sig, size_t index, std::shared_ptr< libsnark::digest_variable< FieldT >> result, const std::string &annotation_prefix=" pk_PRF_gadget")
 
- Public Member Functions inherited from libzeth::PRF_gadget< FieldT, HashT >
 PRF_gadget (libsnark::protoboard< FieldT > &pb, const libsnark::pb_variable_array< FieldT > &x, const libsnark::pb_variable_array< FieldT > &y, std::shared_ptr< libsnark::digest_variable< FieldT >> result, const std::string &annotation_prefix="PRF_gadget")
 
void generate_r1cs_constraints ()
 
void generate_r1cs_witness ()
 

Detailed Description

template<typename FieldT, typename HashT>
class libzeth::PRF_pk_gadget< FieldT, HashT >

PRF to generate the h_i h_i = blake2sCompress("0" || index || "00" || [a_sk]_252 || h_sig) See ZCash protocol specification paper, page 57

Definition at line 106 of file prf.hpp.

Constructor & Destructor Documentation

◆ PRF_pk_gadget()

template<typename FieldT , typename HashT >
libzeth::PRF_pk_gadget< FieldT, HashT >::PRF_pk_gadget ( libsnark::protoboard< FieldT > &  pb,
const libsnark::pb_variable< FieldT > &  ZERO,
const libsnark::pb_variable_array< FieldT > &  a_sk,
const libsnark::pb_variable_array< FieldT > &  h_sig,
size_t  index,
std::shared_ptr< libsnark::digest_variable< FieldT >>  result,
const std::string &  annotation_prefix = " pk_PRF_gadget" 
)

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