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

#include <binary_operation.hpp>

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

Public Member Functions

 xor_constant_gadget (libsnark::protoboard< FieldT > &pb, const libsnark::pb_variable_array< FieldT > &a, const libsnark::pb_variable_array< FieldT > &b, const std::vector< FieldT > &c, const libsnark::pb_variable_array< FieldT > &res, const std::string &annotation_prefix="xor_constant_gadget")
 
void generate_r1cs_constraints ()
 
void generate_r1cs_witness ()
 

Public Attributes

libsnark::pb_variable_array< FieldT > res
 

Detailed Description

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

xor_constant_gadget computes res = a XOR b XOR c with c constant this gadget does not ensure the booleaness of the inputs however given the inputs are boolean, the output is automatically boolean

Definition at line 46 of file binary_operation.hpp.

Constructor & Destructor Documentation

◆ xor_constant_gadget()

template<typename FieldT >
libzeth::xor_constant_gadget< FieldT >::xor_constant_gadget ( libsnark::protoboard< FieldT > &  pb,
const libsnark::pb_variable_array< FieldT > &  a,
const libsnark::pb_variable_array< FieldT > &  b,
const std::vector< FieldT > &  c,
const libsnark::pb_variable_array< FieldT > &  res,
const std::string &  annotation_prefix = "xor_constant_gadget< FieldT >" 
)

Member Function Documentation

◆ generate_r1cs_constraints()

template<typename FieldT >
void libzeth::xor_constant_gadget< FieldT >::generate_r1cs_constraints ( )

◆ generate_r1cs_witness()

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

Member Data Documentation

◆ res

template<typename FieldT >
libsnark::pb_variable_array<FieldT> libzeth::xor_constant_gadget< FieldT >::res

Definition at line 54 of file binary_operation.hpp.


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