Clearmatics Libsnark
0.1
C++ library for zkSNARK proofs
|
#include <gadget.hpp>
Public Member Functions | |
void | generateConstraints () |
void | generateWitness () |
![]() | |
Gadget (ProtoboardPtr pb) | |
void | addUnaryConstraint (const LinearCombination &a, const ::std::string &name) |
void | addRank1Constraint (const LinearCombination &a, const LinearCombination &b, const LinearCombination &c, const ::std::string &name) |
void | enforceBooleanity (const Variable &var) |
FElem & | val (const Variable &var) |
FElem | val (const LinearCombination &lc) |
FieldType | fieldType () const |
bool | flagIsSet (const FlagVariable &flag) const |
Static Public Member Functions | |
static GadgetPtr | create (ProtoboardPtr pb, const LinearCombination &condition, const FlagVariable &flag) |
Additional Inherited Members | |
![]() | |
ProtoboardPtr | pb_ |
A gadget for the following semantics: condition != 0 --> flag = 1 condition == 0 --> flag = 0 Uses 2 constraints
Definition at line 730 of file gadget.hpp.
|
static |
Definition at line 1008 of file gadget.cpp.
|
virtual |
Implements gadgetlib2::Gadget.
Definition at line 1018 of file gadget.cpp.
|
virtual |
Reimplemented from gadgetlib2::Gadget.
Definition at line 1029 of file gadget.cpp.