Clearmatics Libsnark
0.1
C++ library for zkSNARK proofs
|
#include <fp2_gadgets.hpp>
Public Types | |
typedef Fp2T::my_Fp | FieldT |
Public Member Functions | |
Fp2_variable (protoboard< FieldT > &pb, const std::string &annotation_prefix) | |
Fp2_variable (protoboard< FieldT > &pb, const Fp2T &el, const std::string &annotation_prefix) | |
Fp2_variable (protoboard< FieldT > &pb, const Fp2T &el, const pb_linear_combination< FieldT > &coeff, const std::string &annotation_prefix) | |
Fp2_variable (protoboard< FieldT > &pb, const pb_linear_combination< FieldT > &c0, const pb_linear_combination< FieldT > &c1, const std::string &annotation_prefix) | |
void | generate_r1cs_equals_const_constraints (const Fp2T &el) |
void | generate_r1cs_witness (const Fp2T &el) |
Fp2T | get_element () const |
Fp2_variable< Fp2T > | operator* (const FieldT &coeff) const |
Fp2_variable< Fp2T > | operator* (const Fp2T &fp2_const) const |
Fp2_variable< Fp2T > | operator+ (const Fp2_variable< Fp2T > &other) const |
Fp2_variable< Fp2T > | operator+ (const Fp2T &fp2_const) const |
Fp2_variable< Fp2T > | operator- (const Fp2_variable< Fp2T > &other) const |
Fp2_variable< Fp2T > | operator- () const |
Fp2_variable< Fp2T > | mul_by_X () const |
Fp2_variable< Fp2T > | frobenius_map (size_t power) const |
void | evaluate () const |
bool | is_constant () const |
![]() | |
gadget (protoboard< Fp2T::my_Fp > &pb, const std::string &annotation_prefix) | |
Static Public Member Functions | |
static size_t | size_in_bits () |
static size_t | num_variables () |
Public Attributes | |
pb_linear_combination< FieldT > | c0 |
pb_linear_combination< FieldT > | c1 |
pb_linear_combination_array< FieldT > | all_vars |
Additional Inherited Members | |
![]() | |
protoboard< Fp2T::my_Fp > & | pb |
const std::string | annotation_prefix |
Gadget that represents an Fp2 variable.
Definition at line 27 of file fp2_gadgets.hpp.
typedef Fp2T::my_Fp libsnark::Fp2_variable< Fp2T >::FieldT |
Definition at line 30 of file fp2_gadgets.hpp.
libsnark::Fp2_variable< Fp2T >::Fp2_variable | ( | protoboard< FieldT > & | pb, |
const std::string & | annotation_prefix | ||
) |
libsnark::Fp2_variable< Fp2T >::Fp2_variable | ( | protoboard< FieldT > & | pb, |
const Fp2T & | el, | ||
const std::string & | annotation_prefix | ||
) |
libsnark::Fp2_variable< Fp2T >::Fp2_variable | ( | protoboard< FieldT > & | pb, |
const Fp2T & | el, | ||
const pb_linear_combination< FieldT > & | coeff, | ||
const std::string & | annotation_prefix | ||
) |
libsnark::Fp2_variable< Fp2T >::Fp2_variable | ( | protoboard< FieldT > & | pb, |
const pb_linear_combination< FieldT > & | c0, | ||
const pb_linear_combination< FieldT > & | c1, | ||
const std::string & | annotation_prefix | ||
) |
void libsnark::Fp2_variable< Fp2T >::evaluate | ( | ) | const |
Fp2_variable<Fp2T> libsnark::Fp2_variable< Fp2T >::frobenius_map | ( | size_t | power | ) | const |
void libsnark::Fp2_variable< Fp2T >::generate_r1cs_equals_const_constraints | ( | const Fp2T & | el | ) |
void libsnark::Fp2_variable< Fp2T >::generate_r1cs_witness | ( | const Fp2T & | el | ) |
Fp2T libsnark::Fp2_variable< Fp2T >::get_element | ( | ) | const |
bool libsnark::Fp2_variable< Fp2T >::is_constant | ( | ) | const |
Fp2_variable<Fp2T> libsnark::Fp2_variable< Fp2T >::mul_by_X | ( | ) | const |
|
static |
Fp2_variable<Fp2T> libsnark::Fp2_variable< Fp2T >::operator* | ( | const FieldT & | coeff | ) | const |
Fp2_variable<Fp2T> libsnark::Fp2_variable< Fp2T >::operator* | ( | const Fp2T & | fp2_const | ) | const |
Fp2_variable<Fp2T> libsnark::Fp2_variable< Fp2T >::operator+ | ( | const Fp2_variable< Fp2T > & | other | ) | const |
Fp2_variable<Fp2T> libsnark::Fp2_variable< Fp2T >::operator+ | ( | const Fp2T & | fp2_const | ) | const |
Fp2_variable<Fp2T> libsnark::Fp2_variable< Fp2T >::operator- | ( | ) | const |
Fp2_variable<Fp2T> libsnark::Fp2_variable< Fp2T >::operator- | ( | const Fp2_variable< Fp2T > & | other | ) | const |
|
static |
pb_linear_combination_array<FieldT> libsnark::Fp2_variable< Fp2T >::all_vars |
Definition at line 35 of file fp2_gadgets.hpp.
pb_linear_combination<FieldT> libsnark::Fp2_variable< Fp2T >::c0 |
Definition at line 32 of file fp2_gadgets.hpp.
pb_linear_combination<FieldT> libsnark::Fp2_variable< Fp2T >::c1 |
Definition at line 33 of file fp2_gadgets.hpp.