Clearmatics Libsnark  0.1
C++ library for zkSNARK proofs
Public Types | Public Member Functions | Public Attributes | List of all members
libsnark::Fp4_variable< Fp4T > Class Template Reference

#include <fp4_gadgets.hpp>

Inheritance diagram for libsnark::Fp4_variable< Fp4T >:
Inheritance graph
[legend]
Collaboration diagram for libsnark::Fp4_variable< Fp4T >:
Collaboration graph
[legend]

Public Types

typedef Fp4T::my_Fp FieldT
 
typedef Fp4T::my_Fpe Fp2T
 

Public Member Functions

 Fp4_variable (protoboard< FieldT > &pb, const std::string &annotation_prefix)
 
 Fp4_variable (protoboard< FieldT > &pb, const Fp4T &el, const std::string &annotation_prefix)
 
 Fp4_variable (protoboard< FieldT > &pb, const Fp2_variable< Fp2T > &c0, const Fp2_variable< Fp2T > &c1, const std::string &annotation_prefix)
 
void generate_r1cs_equals_const_constraints (const Fp4T &el)
 
void generate_r1cs_witness (const Fp4T &el)
 
Fp4T get_element ()
 
Fp4_variable< Fp4T > Frobenius_map (const size_t power) const
 
void evaluate () const
 
- Public Member Functions inherited from libsnark::gadget< Fp4T::my_Fp >
 gadget (protoboard< Fp4T::my_Fp > &pb, const std::string &annotation_prefix)
 

Public Attributes

Fp2_variable< Fp2Tc0
 
Fp2_variable< Fp2Tc1
 

Additional Inherited Members

- Protected Attributes inherited from libsnark::gadget< Fp4T::my_Fp >
protoboard< Fp4T::my_Fp > & pb
 
const std::string annotation_prefix
 

Detailed Description

template<typename Fp4T>
class libsnark::Fp4_variable< Fp4T >

Gadget that represents an Fp4 variable.

Definition at line 27 of file fp4_gadgets.hpp.

Member Typedef Documentation

◆ FieldT

template<typename Fp4T >
typedef Fp4T::my_Fp libsnark::Fp4_variable< Fp4T >::FieldT

Definition at line 30 of file fp4_gadgets.hpp.

◆ Fp2T

template<typename Fp4T >
typedef Fp4T::my_Fpe libsnark::Fp4_variable< Fp4T >::Fp2T

Definition at line 31 of file fp4_gadgets.hpp.

Constructor & Destructor Documentation

◆ Fp4_variable() [1/3]

template<typename Fp4T >
libsnark::Fp4_variable< Fp4T >::Fp4_variable ( protoboard< FieldT > &  pb,
const std::string &  annotation_prefix 
)

◆ Fp4_variable() [2/3]

template<typename Fp4T >
libsnark::Fp4_variable< Fp4T >::Fp4_variable ( protoboard< FieldT > &  pb,
const Fp4T &  el,
const std::string &  annotation_prefix 
)

◆ Fp4_variable() [3/3]

template<typename Fp4T >
libsnark::Fp4_variable< Fp4T >::Fp4_variable ( protoboard< FieldT > &  pb,
const Fp2_variable< Fp2T > &  c0,
const Fp2_variable< Fp2T > &  c1,
const std::string &  annotation_prefix 
)

Member Function Documentation

◆ evaluate()

template<typename Fp4T >
void libsnark::Fp4_variable< Fp4T >::evaluate ( ) const

◆ Frobenius_map()

template<typename Fp4T >
Fp4_variable<Fp4T> libsnark::Fp4_variable< Fp4T >::Frobenius_map ( const size_t  power) const

◆ generate_r1cs_equals_const_constraints()

template<typename Fp4T >
void libsnark::Fp4_variable< Fp4T >::generate_r1cs_equals_const_constraints ( const Fp4T &  el)

◆ generate_r1cs_witness()

template<typename Fp4T >
void libsnark::Fp4_variable< Fp4T >::generate_r1cs_witness ( const Fp4T &  el)

◆ get_element()

template<typename Fp4T >
Fp4T libsnark::Fp4_variable< Fp4T >::get_element ( )

Member Data Documentation

◆ c0

template<typename Fp4T >
Fp2_variable<Fp2T> libsnark::Fp4_variable< Fp4T >::c0

Definition at line 33 of file fp4_gadgets.hpp.

◆ c1

template<typename Fp4T >
Fp2_variable<Fp2T> libsnark::Fp4_variable< Fp4T >::c1

Definition at line 34 of file fp4_gadgets.hpp.


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