nil::crypto3::zk::components::element_fp2< Fp2T > Struct Template Reference

#include <element_fp2.hpp>

+ Inheritance diagram for nil::crypto3::zk::components::element_fp2< Fp2T >:
+ Collaboration diagram for nil::crypto3::zk::components::element_fp2< Fp2T >:

Public Types

using base_field_type = typename field_type::base_field_type
 
using base_field_value_type = typename base_field_type::value_type
 
using data_type = std::array< underlying_element_type, field_type::arity/underlying_field_type::arity >
 
using field_type = Fp2T
 
using underlying_element_type = element_fp< underlying_field_type >
 
using underlying_field_type = typename field_type::underlying_field_type
 

Public Member Functions

 element_fp2 (blueprint< base_field_type > &bp)
 
 element_fp2 (blueprint< base_field_type > &bp, const typename field_type::value_type &el)
 
 element_fp2 (blueprint< base_field_type > &bp, const typename field_type::value_type &el, const blueprint_linear_combination< base_field_type > &coeff)
 
 element_fp2 (blueprint< base_field_type > &bp, const underlying_element_type &c0_lc, const underlying_element_type &c1_lc)
 
void evaluate () const
 
void generate_r1cs_equals_const_constraints (const typename Fp2T::value_type &el)
 
void generate_r1cs_witness (const typename Fp2T::value_type &el)
 
Fp2T::value_type get_element ()
 
bool is_constant () const
 
element_fp2 mul_by_X () const
 
element_fp2 operator* (const base_field_value_type &coeff) const
 
element_fp2 operator+ (const element_fp2 &other) const
 
element_fp2 operator+ (const typename Fp2T::value_type &other) const
 

Static Public Member Functions

static std::size_t num_variables ()
 
static std::size_t size_in_bits ()
 

Public Attributes

blueprint_linear_combination_vector< base_field_typeall_vars
 
data_type data
 

Protected Attributes

blueprint< Fp2T::underlying_field_type > & bp
 

Detailed Description

template<typename Fp2T>
struct nil::crypto3::zk::components::element_fp2< Fp2T >

Component that represents an element Fp2 component.

Member Typedef Documentation

◆ base_field_type

template<typename Fp2T >
using nil::crypto3::zk::components::element_fp2< Fp2T >::base_field_type = typename field_type::base_field_type

◆ base_field_value_type

template<typename Fp2T >
using nil::crypto3::zk::components::element_fp2< Fp2T >::base_field_value_type = typename base_field_type::value_type

◆ data_type

template<typename Fp2T >
using nil::crypto3::zk::components::element_fp2< Fp2T >::data_type = std::array<underlying_element_type, field_type::arity / underlying_field_type::arity>

◆ field_type

template<typename Fp2T >
using nil::crypto3::zk::components::element_fp2< Fp2T >::field_type = Fp2T

◆ underlying_element_type

◆ underlying_field_type

template<typename Fp2T >
using nil::crypto3::zk::components::element_fp2< Fp2T >::underlying_field_type = typename field_type::underlying_field_type

Constructor & Destructor Documentation

◆ element_fp2() [1/4]

template<typename Fp2T >
nil::crypto3::zk::components::element_fp2< Fp2T >::element_fp2 ( blueprint< base_field_type > &  bp)
inline

◆ element_fp2() [2/4]

template<typename Fp2T >
nil::crypto3::zk::components::element_fp2< Fp2T >::element_fp2 ( blueprint< base_field_type > &  bp,
const typename field_type::value_type &  el 
)
inline

◆ element_fp2() [3/4]

template<typename Fp2T >
nil::crypto3::zk::components::element_fp2< Fp2T >::element_fp2 ( blueprint< base_field_type > &  bp,
const typename field_type::value_type &  el,
const blueprint_linear_combination< base_field_type > &  coeff 
)
inline

◆ element_fp2() [4/4]

template<typename Fp2T >
nil::crypto3::zk::components::element_fp2< Fp2T >::element_fp2 ( blueprint< base_field_type > &  bp,
const underlying_element_type c0_lc,
const underlying_element_type c1_lc 
)
inline

Member Function Documentation

◆ evaluate()

template<typename Fp2T >
void nil::crypto3::zk::components::element_fp2< Fp2T >::evaluate ( ) const
inline

◆ generate_r1cs_equals_const_constraints()

template<typename Fp2T >
void nil::crypto3::zk::components::element_fp2< Fp2T >::generate_r1cs_equals_const_constraints ( const typename Fp2T::value_type &  el)
inline

◆ generate_r1cs_witness()

template<typename Fp2T >
void nil::crypto3::zk::components::element_fp2< Fp2T >::generate_r1cs_witness ( const typename Fp2T::value_type &  el)
inline

◆ get_element()

template<typename Fp2T >
Fp2T::value_type nil::crypto3::zk::components::element_fp2< Fp2T >::get_element ( )
inline

◆ is_constant()

template<typename Fp2T >
bool nil::crypto3::zk::components::element_fp2< Fp2T >::is_constant ( ) const
inline

◆ mul_by_X()

template<typename Fp2T >
element_fp2 nil::crypto3::zk::components::element_fp2< Fp2T >::mul_by_X ( ) const
inline

◆ num_variables()

template<typename Fp2T >
static std::size_t nil::crypto3::zk::components::element_fp2< Fp2T >::num_variables ( )
inlinestatic

◆ operator*()

template<typename Fp2T >
element_fp2 nil::crypto3::zk::components::element_fp2< Fp2T >::operator* ( const base_field_value_type coeff) const
inline

◆ operator+() [1/2]

template<typename Fp2T >
element_fp2 nil::crypto3::zk::components::element_fp2< Fp2T >::operator+ ( const element_fp2< Fp2T > &  other) const
inline

◆ operator+() [2/2]

template<typename Fp2T >
element_fp2 nil::crypto3::zk::components::element_fp2< Fp2T >::operator+ ( const typename Fp2T::value_type &  other) const
inline

◆ size_in_bits()

template<typename Fp2T >
static std::size_t nil::crypto3::zk::components::element_fp2< Fp2T >::size_in_bits ( )
inlinestatic

Member Data Documentation

◆ all_vars

◆ bp

blueprint<Fp2T::underlying_field_type >& nil::crypto3::zk::components::component< Fp2T::underlying_field_type >::bp
protectedinherited

◆ data

template<typename Fp2T >
data_type nil::crypto3::zk::components::element_fp2< Fp2T >::data

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