Clearmatics Libsnark
0.1
C++ library for zkSNARK proofs
|
#include <bacs.hpp>
Public Member Functions | |
FieldT | evaluate (const bacs_variable_assignment< FieldT > &input) const |
void | print (const std::map< size_t, std::string > &variable_annotations=std::map< size_t, std::string >()) const |
bool | operator== (const bacs_gate< FieldT > &other) const |
Public Attributes | |
linear_combination< FieldT > | lhs |
linear_combination< FieldT > | rhs |
variable< FieldT > | output |
bool | is_circuit_output |
Friends | |
std::ostream & | operator (std::ostream &out, const bacs_gate< FieldT > &g) |
std::istream & | operator>> (std::istream &in, bacs_gate< FieldT > &g) |
A BACS gate is a formal expression of the form lhs * rhs = output , where lhs and rhs are linear combinations (of variables) and output is a variable.
In other words, a BACS gate is an arithmetic gate that is bilinear.
FieldT libsnark::bacs_gate< FieldT >::evaluate | ( | const bacs_variable_assignment< FieldT > & | input | ) | const |
bool libsnark::bacs_gate< FieldT >::operator== | ( | const bacs_gate< FieldT > & | other | ) | const |
void libsnark::bacs_gate< FieldT >::print | ( | const std::map< size_t, std::string > & | variable_annotations = std::map< size_t, std::string >() | ) | const |
|
friend |
|
friend |
bool libsnark::bacs_gate< FieldT >::is_circuit_output |
linear_combination<FieldT> libsnark::bacs_gate< FieldT >::lhs |
variable<FieldT> libsnark::bacs_gate< FieldT >::output |
linear_combination<FieldT> libsnark::bacs_gate< FieldT >::rhs |