|
Clearmatics Libff
0.1
C++ library for Finite Fields and Elliptic Curves
|
#include <fp2.hpp>

Public Types | |
| typedef Fp_model< n, modulus > | my_Fp |
Public Member Functions | |
| Fp2_model () | |
| Fp2_model (const my_Fp &c0, const my_Fp &c1) | |
| void | clear () |
| void | print () const |
| bool | is_zero () const |
| bool | operator== (const Fp2_model &other) const |
| bool | operator!= (const Fp2_model &other) const |
| Fp2_model | operator+ (const Fp2_model &other) const |
| Fp2_model | operator- (const Fp2_model &other) const |
| Fp2_model | operator* (const Fp2_model &other) const |
| Fp2_model | operator- () const |
| Fp2_model | squared () const |
| default is squared_complex More... | |
| Fp2_model | inverse () const |
| Fp2_model | Frobenius_map (unsigned long power) const |
| Fp2_model | sqrt () const |
| HAS TO BE A SQUARE (else does not terminate) More... | |
| Fp2_model | squared_karatsuba () const |
| Fp2_model | squared_complex () const |
| template<mp_size_t m> | |
| Fp2_model | operator^ (const bigint< m > &other) const |
Static Public Member Functions | |
| static void | static_init () |
| static const Fp2_model< n, modulus > & | zero () |
| static const Fp2_model< n, modulus > & | one () |
| static Fp2_model< n, modulus > | random_element () |
| static size_t | size_in_bits () |
| static bigint< n > | base_field_char () |
| static constexpr size_t | extension_degree () |
Public Attributes | |
| my_Fp | coeffs [2] |
Static Public Attributes | |
| static const size_t | tower_extension_degree = 2 |
| static bigint< 2 *n > | euler |
| (modulus^2-1)/2 More... | |
| static size_t | s |
| modulus^2 = 2^s * t + 1 More... | |
| static bigint< 2 *n > | t |
| with t odd More... | |
| static bigint< 2 *n > | t_minus_1_over_2 |
| (t-1)/2 More... | |
| static my_Fp | non_residue |
| static Fp2_model< n, modulus > | nqr |
| a quadratic nonresidue in Fp2 More... | |
| static Fp2_model< n, modulus > | nqr_to_t |
| nqr^t More... | |
| static my_Fp | Frobenius_coeffs_c1 [2] |
| non_residue^((modulus^i-1)/2) for i=0,1 More... | |
Static Protected Attributes | |
| static bool | s_initialized |
| static Fp2_model< n, modulus > | s_zero |
| static Fp2_model< n, modulus > | s_one |
Friends | |
| std::ostream & | operator (std::ostream &out, const Fp2_model< n, modulus > &el) |
| std::istream & | operator>> (std::istream &in, Fp2_model< n, modulus > &el) |
Arithmetic in the field F[p^2].
Let p := modulus. This interface provides arithmetic for the extension field. Fp2 = Fp[U]/(U^2-non_residue), where non_residue is in Fp.
ASSUMPTION: p = 1 (mod 6)
| typedef Fp_model<n, modulus> libff::Fp2_model< n, modulus >::my_Fp |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inlinestaticconstexpr |
| Fp2_model libff::Fp2_model< n, modulus >::Frobenius_map | ( | unsigned long | power | ) | const |
| Fp2_model libff::Fp2_model< n, modulus >::inverse | ( | ) | const |

|
inline |
|
static |
| bool libff::Fp2_model< n, modulus >::operator!= | ( | const Fp2_model< n, modulus > & | other | ) | const |
| Fp2_model libff::Fp2_model< n, modulus >::operator* | ( | const Fp2_model< n, modulus > & | other | ) | const |
| Fp2_model libff::Fp2_model< n, modulus >::operator+ | ( | const Fp2_model< n, modulus > & | other | ) | const |
| Fp2_model libff::Fp2_model< n, modulus >::operator- | ( | ) | const |
| Fp2_model libff::Fp2_model< n, modulus >::operator- | ( | const Fp2_model< n, modulus > & | other | ) | const |
| bool libff::Fp2_model< n, modulus >::operator== | ( | const Fp2_model< n, modulus > & | other | ) | const |
| Fp2_model libff::Fp2_model< n, modulus >::operator^ | ( | const bigint< m > & | other | ) | const |
|
inline |
|
static |
|
inlinestatic |
| Fp2_model libff::Fp2_model< n, modulus >::sqrt | ( | ) | const |
HAS TO BE A SQUARE (else does not terminate)

| Fp2_model libff::Fp2_model< n, modulus >::squared | ( | ) | const |
default is squared_complex

| Fp2_model libff::Fp2_model< n, modulus >::squared_complex | ( | ) | const |
| Fp2_model libff::Fp2_model< n, modulus >::squared_karatsuba | ( | ) | const |
|
static |
|
static |
|
friend |
|
friend |
| my_Fp libff::Fp2_model< n, modulus >::coeffs[2] |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
static |
|
static |
|
static |
1.8.17