Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
libff::Fp3_model< n, modulus > Class Template Reference

#include <fp3.hpp>

Collaboration diagram for libff::Fp3_model< n, modulus >:

Public Types

typedef Fp_model< n, modulus > my_Fp
 

Public Member Functions

 Fp3_model ()
 
 Fp3_model (const my_Fp &c0, const my_Fp &c1, const my_Fp &c2)
 
void clear ()
 
void print () const
 
bool is_zero () const
 
bool operator== (const Fp3_model &other) const
 
bool operator!= (const Fp3_model &other) const
 
Fp3_model operator+ (const Fp3_model &other) const
 
Fp3_model operator- (const Fp3_model &other) const
 
Fp3_model operator* (const Fp3_model &other) const
 
Fp3_model operator- () const
 
Fp3_model squared () const
 
Fp3_model inverse () const
 
Fp3_model Frobenius_map (unsigned long power) const
 
Fp3_model sqrt () const
 
template<mp_size_t m>
Fp3_model operator^ (const bigint< m > &other) const
 

Static Public Member Functions

static Fp3_model< n, modulus > zero ()
 
static Fp3_model< n, modulus > one ()
 
static Fp3_model< n, modulus > random_element ()
 
static size_t size_in_bits ()
 
static bigint< n > base_field_char ()
 

Public Attributes

my_Fp c0
 
my_Fp c1
 
my_Fp c2
 

Static Public Attributes

static bigint< 3 *n > euler
 
static size_t s
 
static bigint< 3 *n > t
 
static bigint< 3 *n > t_minus_1_over_2
 
static my_Fp non_residue
 
static Fp3_model< n, modulus > nqr
 
static Fp3_model< n, modulus > nqr_to_t
 
static my_Fp Frobenius_coeffs_c1 [3]
 
static my_Fp Frobenius_coeffs_c2 [3]
 

Friends

std::ostream & operator (std::ostream &out, const Fp3_model< n, modulus > &el)
 
std::istream & operator>> (std::istream &in, Fp3_model< n, modulus > &el)
 

Detailed Description

template<mp_size_t n, const bigint< n > & modulus>
class libff::Fp3_model< n, modulus >

Arithmetic in the field F[p^3].

Let p := modulus. This interface provides arithmetic for the extension field Fp3 = Fp[U]/(U^3-non_residue), where non_residue is in Fp.

ASSUMPTION: p = 1 (mod 6)

Definition at line 36 of file fp3.hpp.

Member Typedef Documentation

◆ my_Fp

template<mp_size_t n, const bigint< n > & modulus>
Fp_model<n, modulus> libff::Fp3_model< n, modulus >::my_Fp

Definition at line 38 of file fp3.hpp.

Constructor & Destructor Documentation

◆ Fp3_model() [1/2]

template<mp_size_t n, const bigint< n > & modulus>
libff::Fp3_model< n, modulus >::Fp3_model ( )
inline

Definition at line 51 of file fp3.hpp.

51{};

◆ Fp3_model() [2/2]

template<mp_size_t n, const bigint< n > & modulus>
libff::Fp3_model< n, modulus >::Fp3_model ( const my_Fp & c0,
const my_Fp & c1,
const my_Fp & c2 )
inline

Definition at line 52 of file fp3.hpp.

52: c0(c0), c1(c1), c2(c2) {};

Member Function Documentation

◆ base_field_char()

template<mp_size_t n, const bigint< n > & modulus>
static bigint< n > libff::Fp3_model< n, modulus >::base_field_char ( )
inlinestatic

Definition at line 78 of file fp3.hpp.

78{ return modulus; }

◆ clear()

template<mp_size_t n, const bigint< n > & modulus>
void libff::Fp3_model< n, modulus >::clear ( )
inline

Definition at line 54 of file fp3.hpp.

54{ c0.clear(); c1.clear(); c2.clear(); }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Frobenius_map()

template<mp_size_t n, const bigint< n > & modulus>
Fp3_model libff::Fp3_model< n, modulus >::Frobenius_map ( unsigned long power) const

◆ inverse()

template<mp_size_t n, const bigint< n > & modulus>
Fp3_model libff::Fp3_model< n, modulus >::inverse ( ) const
Here is the caller graph for this function:

◆ is_zero()

template<mp_size_t n, const bigint< n > & modulus>
bool libff::Fp3_model< n, modulus >::is_zero ( ) const
inline

Definition at line 61 of file fp3.hpp.

61{ return c0.is_zero() && c1.is_zero() && c2.is_zero(); }
bool is_zero() const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ one()

template<mp_size_t n, const bigint< n > & modulus>
static Fp3_model< n, modulus > libff::Fp3_model< n, modulus >::one ( )
static

◆ operator!=()

template<mp_size_t n, const bigint< n > & modulus>
bool libff::Fp3_model< n, modulus >::operator!= ( const Fp3_model< n, modulus > & other) const

◆ operator*()

template<mp_size_t n, const bigint< n > & modulus>
Fp3_model libff::Fp3_model< n, modulus >::operator* ( const Fp3_model< n, modulus > & other) const

◆ operator+()

template<mp_size_t n, const bigint< n > & modulus>
Fp3_model libff::Fp3_model< n, modulus >::operator+ ( const Fp3_model< n, modulus > & other) const

◆ operator-() [1/2]

template<mp_size_t n, const bigint< n > & modulus>
Fp3_model libff::Fp3_model< n, modulus >::operator- ( ) const

◆ operator-() [2/2]

template<mp_size_t n, const bigint< n > & modulus>
Fp3_model libff::Fp3_model< n, modulus >::operator- ( const Fp3_model< n, modulus > & other) const

◆ operator==()

template<mp_size_t n, const bigint< n > & modulus>
bool libff::Fp3_model< n, modulus >::operator== ( const Fp3_model< n, modulus > & other) const

◆ operator^()

template<mp_size_t n, const bigint< n > & modulus>
template<mp_size_t m>
Fp3_model libff::Fp3_model< n, modulus >::operator^ ( const bigint< m > & other) const

◆ print()

template<mp_size_t n, const bigint< n > & modulus>
void libff::Fp3_model< n, modulus >::print ( ) const
inline

Definition at line 55 of file fp3.hpp.

55{ printf("c0/c1/c2:\n"); c0.print(); c1.print(); c2.print(); }
void print() const
LOGGING_API void printf(Category category, const char *format,...)
Definition Logging.cpp:30
Here is the call graph for this function:
Here is the caller graph for this function:

◆ random_element()

template<mp_size_t n, const bigint< n > & modulus>
static Fp3_model< n, modulus > libff::Fp3_model< n, modulus >::random_element ( )
static

◆ size_in_bits()

template<mp_size_t n, const bigint< n > & modulus>
static size_t libff::Fp3_model< n, modulus >::size_in_bits ( )
inlinestatic

Definition at line 77 of file fp3.hpp.

77{ return 3*my_Fp::size_in_bits(); }
static size_t size_in_bits()
Definition fp.hpp:114
Here is the call graph for this function:

◆ sqrt()

template<mp_size_t n, const bigint< n > & modulus>
Fp3_model libff::Fp3_model< n, modulus >::sqrt ( ) const

◆ squared()

template<mp_size_t n, const bigint< n > & modulus>
Fp3_model libff::Fp3_model< n, modulus >::squared ( ) const
Here is the caller graph for this function:

◆ zero()

template<mp_size_t n, const bigint< n > & modulus>
static Fp3_model< n, modulus > libff::Fp3_model< n, modulus >::zero ( )
static

Friends And Related Symbol Documentation

◆ operator

template<mp_size_t n, const bigint< n > & modulus>
std::ostream & operator ( std::ostream & out,
const Fp3_model< n, modulus > & el )
friend

◆ operator>>

template<mp_size_t n, const bigint< n > & modulus>
std::istream & operator>> ( std::istream & in,
Fp3_model< n, modulus > & el )
friend

Member Data Documentation

◆ c0

template<mp_size_t n, const bigint< n > & modulus>
my_Fp libff::Fp3_model< n, modulus >::c0

Definition at line 50 of file fp3.hpp.

◆ c1

template<mp_size_t n, const bigint< n > & modulus>
my_Fp libff::Fp3_model< n, modulus >::c1

Definition at line 50 of file fp3.hpp.

◆ c2

template<mp_size_t n, const bigint< n > & modulus>
my_Fp libff::Fp3_model< n, modulus >::c2

Definition at line 50 of file fp3.hpp.

◆ euler

template<mp_size_t n, const bigint< n > & modulus>
bigint< 3 *n > libff::Fp3_model< n, modulus >::euler
static

Definition at line 40 of file fp3.hpp.

◆ Frobenius_coeffs_c1

template<mp_size_t n, const bigint< n > & modulus>
Fp_model< n, modulus > libff::Fp3_model< n, modulus >::Frobenius_coeffs_c1
static

Definition at line 47 of file fp3.hpp.

◆ Frobenius_coeffs_c2

template<mp_size_t n, const bigint< n > & modulus>
Fp_model< n, modulus > libff::Fp3_model< n, modulus >::Frobenius_coeffs_c2
static

Definition at line 48 of file fp3.hpp.

◆ non_residue

template<mp_size_t n, const bigint< n > & modulus>
Fp_model< n, modulus > libff::Fp3_model< n, modulus >::non_residue
static

Definition at line 44 of file fp3.hpp.

◆ nqr

template<mp_size_t n, const bigint< n > & modulus>
Fp3_model< n, modulus > libff::Fp3_model< n, modulus >::nqr
static

Definition at line 45 of file fp3.hpp.

◆ nqr_to_t

template<mp_size_t n, const bigint< n > & modulus>
Fp3_model< n, modulus > libff::Fp3_model< n, modulus >::nqr_to_t
static

Definition at line 46 of file fp3.hpp.

◆ s

template<mp_size_t n, const bigint< n > & modulus>
size_t libff::Fp3_model< n, modulus >::s
static

Definition at line 41 of file fp3.hpp.

◆ t

template<mp_size_t n, const bigint< n > & modulus>
bigint< 3 *n > libff::Fp3_model< n, modulus >::t
static

Definition at line 42 of file fp3.hpp.

◆ t_minus_1_over_2

template<mp_size_t n, const bigint< n > & modulus>
bigint< 3 *n > libff::Fp3_model< n, modulus >::t_minus_1_over_2
static

Definition at line 43 of file fp3.hpp.


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