Clearmatics Libff  0.1
C++ library for Finite Fields and Elliptic Curves
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
libff::Fp12_2over3over2_model< n, modulus > Class Template Reference

#include <fp12_2over3over2.hpp>

Collaboration diagram for libff::Fp12_2over3over2_model< n, modulus >:
Collaboration graph
[legend]

Public Types

typedef Fp_model< n, modulus > my_Fp
 
typedef Fp2_model< n, modulus > my_Fp2
 
typedef Fp6_3over2_model< n, modulus > my_Fp6
 

Public Member Functions

 Fp12_2over3over2_model ()
 
 Fp12_2over3over2_model (const my_Fp6 &c0, const my_Fp6 &c1)
 
void clear ()
 
void print () const
 
bool is_zero () const
 
bool operator== (const Fp12_2over3over2_model &other) const
 
bool operator!= (const Fp12_2over3over2_model &other) const
 
Fp12_2over3over2_model operator+ (const Fp12_2over3over2_model &other) const
 
Fp12_2over3over2_model operator- (const Fp12_2over3over2_model &other) const
 
Fp12_2over3over2_model operator* (const Fp12_2over3over2_model &other) const
 
Fp12_2over3over2_model operator- () const
 
Fp12_2over3over2_model squared () const
 default is squared_complex More...
 
Fp12_2over3over2_model squared_karatsuba () const
 
Fp12_2over3over2_model squared_complex () const
 
Fp12_2over3over2_model inverse () const
 
Fp12_2over3over2_model Frobenius_map (unsigned long power) const
 
Fp12_2over3over2_model unitary_inverse () const
 
Fp12_2over3over2_model cyclotomic_squared () const
 
Fp12_2over3over2_model mul_by_024 (const my_Fp2 &ell_0, const my_Fp2 &ell_VW, const my_Fp2 &ell_VV) const
 
Fp12_2over3over2_model mul_by_045 (const my_Fp2 &ell_0, const my_Fp2 &ell_VW, const my_Fp2 &ell_VV) const
 
template<mp_size_t m>
Fp12_2over3over2_model cyclotomic_exp (const bigint< m > &exponent) const
 

Static Public Member Functions

static Fp12_2over3over2_model< n, modulus > zero ()
 
static Fp12_2over3over2_model< n, modulus > one ()
 
static Fp12_2over3over2_model< n, modulus > random_element ()
 
static my_Fp6 mul_by_non_residue (const my_Fp6 &elt)
 
static bigint< n > base_field_char ()
 
static constexpr size_t extension_degree ()
 

Public Attributes

my_Fp6 coeffs [2]
 

Static Public Attributes

static bigint< 12 *n > euler
 
static std::size_t s
 
static bigint< 12 *n > t
 
static bigint< 12 *n > t_minus_1_over_2
 
static Fp12_2over3over2_model< n, modulus > nqr
 
static Fp12_2over3over2_model< n, modulus > nqr_to_t
 
static Fp2_model< n, modulus > non_residue
 
static Fp2_model< n, modulus > Frobenius_coeffs_c1 [12]
 non_residue^((modulus^i-1)/6) for i=0,...,11 More...
 
static const size_t tower_extension_degree = 2
 

Friends

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

Detailed Description

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

Arithmetic in the finite field F[((p^2)^3)^2].

Let p := modulus. This interface provides arithmetic for the extension field Fp12 = Fp6[W]/(W^2-V) where Fp6 = Fp2[V]/(V^3-non_residue) and non_residue is in Fp2

ASSUMPTION: p = 1 (mod 6)

Definition at line 20 of file fp12_2over3over2.hpp.

Member Typedef Documentation

◆ my_Fp

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

Definition at line 52 of file fp12_2over3over2.hpp.

◆ my_Fp2

template<mp_size_t n, const bigint< n > & modulus>
typedef Fp2_model<n, modulus> libff::Fp12_2over3over2_model< n, modulus >::my_Fp2

Definition at line 53 of file fp12_2over3over2.hpp.

◆ my_Fp6

template<mp_size_t n, const bigint< n > & modulus>
typedef Fp6_3over2_model<n, modulus> libff::Fp12_2over3over2_model< n, modulus >::my_Fp6

Definition at line 54 of file fp12_2over3over2.hpp.

Constructor & Destructor Documentation

◆ Fp12_2over3over2_model() [1/2]

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

Definition at line 63 of file fp12_2over3over2.hpp.

63 {};

◆ Fp12_2over3over2_model() [2/2]

template<mp_size_t n, const bigint< n > & modulus>
libff::Fp12_2over3over2_model< n, modulus >::Fp12_2over3over2_model ( const my_Fp6 c0,
const my_Fp6 c1 
)
inline

Definition at line 64 of file fp12_2over3over2.hpp.

65  {
66  this->coeffs[0] = c0;
67  this->coeffs[1] = c1;
68  return;
69  };

Member Function Documentation

◆ base_field_char()

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

Definition at line 115 of file fp12_2over3over2.hpp.

115 { return modulus; }

◆ clear()

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

Definition at line 71 of file fp12_2over3over2.hpp.

72  {
73  coeffs[0].clear();
74  coeffs[1].clear();
75  }
Here is the call graph for this function:

◆ cyclotomic_exp()

template<mp_size_t n, const bigint< n > & modulus>
template<mp_size_t m>
Fp12_2over3over2_model libff::Fp12_2over3over2_model< n, modulus >::cyclotomic_exp ( const bigint< m > &  exponent) const
Here is the caller graph for this function:

◆ cyclotomic_squared()

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

◆ extension_degree()

template<mp_size_t n, const bigint< n > & modulus>
static constexpr size_t libff::Fp12_2over3over2_model< n, modulus >::extension_degree ( )
inlinestaticconstexpr

Definition at line 116 of file fp12_2over3over2.hpp.

116 { return 12; }

◆ Frobenius_map()

template<mp_size_t n, const bigint< n > & modulus>
Fp12_2over3over2_model libff::Fp12_2over3over2_model< n, modulus >::Frobenius_map ( unsigned long  power) const
Here is the caller graph for this function:

◆ inverse()

template<mp_size_t n, const bigint< n > & modulus>
Fp12_2over3over2_model libff::Fp12_2over3over2_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::Fp12_2over3over2_model< n, modulus >::is_zero ( ) const
inline

Definition at line 87 of file fp12_2over3over2.hpp.

87 { return coeffs[0].is_zero() && coeffs[1].is_zero(); }
Here is the call graph for this function:

◆ mul_by_024()

template<mp_size_t n, const bigint< n > & modulus>
Fp12_2over3over2_model libff::Fp12_2over3over2_model< n, modulus >::mul_by_024 ( const my_Fp2 ell_0,
const my_Fp2 ell_VW,
const my_Fp2 ell_VV 
) const
Here is the caller graph for this function:

◆ mul_by_045()

template<mp_size_t n, const bigint< n > & modulus>
Fp12_2over3over2_model libff::Fp12_2over3over2_model< n, modulus >::mul_by_045 ( const my_Fp2 ell_0,
const my_Fp2 ell_VW,
const my_Fp2 ell_VV 
) const
Here is the caller graph for this function:

◆ mul_by_non_residue()

template<mp_size_t n, const bigint< n > & modulus>
static my_Fp6 libff::Fp12_2over3over2_model< n, modulus >::mul_by_non_residue ( const my_Fp6 elt)
static

◆ one()

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

◆ operator!=()

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

◆ operator*()

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

◆ operator+()

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

◆ operator-() [1/2]

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

◆ operator-() [2/2]

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

◆ operator==()

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

◆ print()

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

Definition at line 76 of file fp12_2over3over2.hpp.

77  {
78  printf("c0/c1:\n");
79  coeffs[0].print();
80  coeffs[1].print();
81  }
Here is the call graph for this function:

◆ random_element()

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

◆ squared()

template<mp_size_t n, const bigint< n > & modulus>
Fp12_2over3over2_model libff::Fp12_2over3over2_model< n, modulus >::squared ( ) const

default is squared_complex

Here is the caller graph for this function:

◆ squared_complex()

template<mp_size_t n, const bigint< n > & modulus>
Fp12_2over3over2_model libff::Fp12_2over3over2_model< n, modulus >::squared_complex ( ) const

◆ squared_karatsuba()

template<mp_size_t n, const bigint< n > & modulus>
Fp12_2over3over2_model libff::Fp12_2over3over2_model< n, modulus >::squared_karatsuba ( ) const

◆ unitary_inverse()

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

◆ zero()

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

Friends And Related Function Documentation

◆ operator

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

◆ operator>>

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

Member Data Documentation

◆ coeffs

template<mp_size_t n, const bigint< n > & modulus>
my_Fp6 libff::Fp12_2over3over2_model< n, modulus >::coeffs[2]

Definition at line 62 of file fp12_2over3over2.hpp.

◆ euler

template<mp_size_t n, const bigint< n > & modulus>
bigint< 12 *n > libff::Fp12_2over3over2_model< n, modulus >::euler
static

Definition at line 40 of file fp12_2over3over2.hpp.

◆ Frobenius_coeffs_c1

template<mp_size_t n, const bigint< n > & modulus>
Fp2_model< n, modulus > libff::Fp12_2over3over2_model< n, modulus >::Frobenius_coeffs_c1
static

non_residue^((modulus^i-1)/6) for i=0,...,11

Definition at line 58 of file fp12_2over3over2.hpp.

◆ non_residue

template<mp_size_t n, const bigint< n > & modulus>
Fp2_model< n, modulus > libff::Fp12_2over3over2_model< n, modulus >::non_residue
static

Definition at line 56 of file fp12_2over3over2.hpp.

◆ nqr

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

Definition at line 48 of file fp12_2over3over2.hpp.

◆ nqr_to_t

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

Definition at line 50 of file fp12_2over3over2.hpp.

◆ s

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

Definition at line 42 of file fp12_2over3over2.hpp.

◆ t

template<mp_size_t n, const bigint< n > & modulus>
bigint< 12 *n > libff::Fp12_2over3over2_model< n, modulus >::t
static

Definition at line 44 of file fp12_2over3over2.hpp.

◆ t_minus_1_over_2

template<mp_size_t n, const bigint< n > & modulus>
bigint< 12 *n > libff::Fp12_2over3over2_model< n, modulus >::t_minus_1_over_2
static

Definition at line 46 of file fp12_2over3over2.hpp.

◆ tower_extension_degree

template<mp_size_t n, const bigint< n > & modulus>
const size_t libff::Fp12_2over3over2_model< n, modulus >::tower_extension_degree = 2
static

Definition at line 60 of file fp12_2over3over2.hpp.


The documentation for this class was generated from the following file:
libff::Fp6_3over2_model::print
void print() const
Definition: fp6_3over2.hpp:76
libff::Fp6_3over2_model::clear
void clear()
Definition: fp6_3over2.hpp:70
libff::Fp6_3over2_model::is_zero
bool is_zero() const
Definition: fp6_3over2.hpp:88
libff::Fp12_2over3over2_model::coeffs
my_Fp6 coeffs[2]
Definition: fp12_2over3over2.hpp:62