Zeth - Zerocash on Ethereum
0.8
Reference implementation of the Zeth protocol by Clearmatics
|
#include <binary_operation.hpp>
Public Member Functions | |
double_bit32_sum_eq_gadget (libsnark::protoboard< FieldT > &pb, const libsnark::pb_variable_array< FieldT > &a, const libsnark::pb_variable_array< FieldT > &b, const libsnark::pb_variable_array< FieldT > &res, const std::string &annotation_prefix="double_bit32_sum_eq_gadget") | |
void | generate_r1cs_constraints (bool enforce_boolean=true) |
void | generate_r1cs_witness () |
Public Attributes | |
libsnark::pb_variable_array< FieldT > | res |
double_bit32_sum_eq_gadget checks that res = a + b % 2**32 with a, b and res being 32-bit long arrays this gadget does not ensure the booleaness of the inputs if enforce_boolean is set to true, the output booleaness is checked
Definition at line 98 of file binary_operation.hpp.
libzeth::double_bit32_sum_eq_gadget< FieldT >::double_bit32_sum_eq_gadget | ( | libsnark::protoboard< FieldT > & | pb, |
const libsnark::pb_variable_array< FieldT > & | a, | ||
const libsnark::pb_variable_array< FieldT > & | b, | ||
const libsnark::pb_variable_array< FieldT > & | res, | ||
const std::string & | annotation_prefix = "double_bit32_sum_eq_gadget< FieldT >" |
||
) |
void libzeth::double_bit32_sum_eq_gadget< FieldT >::generate_r1cs_constraints | ( | bool | enforce_boolean = true | ) |
void libzeth::double_bit32_sum_eq_gadget< FieldT >::generate_r1cs_witness | ( | ) |
libsnark::pb_variable_array<FieldT> libzeth::double_bit32_sum_eq_gadget< FieldT >::res |
Definition at line 105 of file binary_operation.hpp.