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 | List of all members
libff::edwards_G2 Class Reference

#include <edwards_g2.hpp>

Collaboration diagram for libff::edwards_G2:
Collaboration graph
[legend]

Public Types

typedef edwards_Fq base_field
 
typedef edwards_Fq3 twist_field
 
typedef edwards_Fr scalar_field
 

Public Member Functions

 edwards_G2 ()
 
 edwards_G2 (const edwards_Fq3 &X, const edwards_Fq3 &Y)
 
void print () const
 
void print_coordinates () const
 
void to_affine_coordinates ()
 
void to_special ()
 
bool is_special () const
 
bool is_zero () const
 
bool operator== (const edwards_G2 &other) const
 
bool operator!= (const edwards_G2 &other) const
 
edwards_G2 operator+ (const edwards_G2 &other) const
 
edwards_G2 operator- () const
 
edwards_G2 operator- (const edwards_G2 &other) const
 
edwards_G2 add (const edwards_G2 &other) const
 
edwards_G2 mixed_add (const edwards_G2 &other) const
 
edwards_G2 dbl () const
 
edwards_G2 mul_by_q () const
 
bool is_well_formed () const
 
void write_uncompressed (std::ostream &) const
 
void write_compressed (std::ostream &) const
 

Static Public Member Functions

static edwards_Fq3 mul_by_a (const edwards_Fq3 &elt)
 
static edwards_Fq3 mul_by_d (const edwards_Fq3 &elt)
 
static const edwards_G2zero ()
 
static const edwards_G2one ()
 
static edwards_G2 random_element ()
 
static size_t size_in_bits ()
 
static bigint< base_field::num_limbsbase_field_char ()
 
static bigint< scalar_field::num_limbsorder ()
 
static void read_uncompressed (std::istream &, edwards_G2 &)
 
static void read_compressed (std::istream &, edwards_G2 &)
 
static void batch_to_special_all_non_zeros (std::vector< edwards_G2 > &vec)
 

Public Attributes

edwards_Fq3 X
 
edwards_Fq3 Y
 
edwards_Fq3 Z
 

Static Public Attributes

static std::vector< size_t > wnaf_window_table
 
static std::vector< size_t > fixed_base_exp_window_table
 
static edwards_G2 G2_zero
 
static edwards_G2 G2_one
 

Detailed Description

Definition at line 22 of file edwards_g2.hpp.

Member Typedef Documentation

◆ base_field

Definition at line 45 of file edwards_g2.hpp.

◆ scalar_field

Definition at line 47 of file edwards_g2.hpp.

◆ twist_field

Definition at line 46 of file edwards_g2.hpp.

Constructor & Destructor Documentation

◆ edwards_G2() [1/2]

libff::edwards_G2::edwards_G2 ( )

Definition at line 24 of file edwards_g2.cpp.

25 {
26  this->X = G2_zero.X;
27  this->Y = G2_zero.Y;
28  this->Z = G2_zero.Z;
29 }
Here is the caller graph for this function:

◆ edwards_G2() [2/2]

libff::edwards_G2::edwards_G2 ( const edwards_Fq3 X,
const edwards_Fq3 Y 
)
inline

Definition at line 50 of file edwards_g2.hpp.

51  : X(Y), Y(X), Z(X * Y){};

Member Function Documentation

◆ add()

edwards_G2 libff::edwards_G2::add ( const edwards_G2 other) const

Definition at line 210 of file edwards_g2.cpp.

211 {
212 #ifdef PROFILE_OP_COUNTS
213  this->add_cnt++;
214 #endif
215  // NOTE: does not handle O and pts of order 2,4
216  // http://www.hyperelliptic.org/EFD/g1p/auto-twisted-inverted.html#addition-add-2008-bbjlp
217 
218  // A = Z1*Z2
219  const edwards_Fq3 A = (this->Z) * (other.Z);
220  // B = d*A^2
221  const edwards_Fq3 B = edwards_G2::mul_by_d(A.squared());
222  // C = X1*X2
223  const edwards_Fq3 C = (this->X) * (other.X);
224  // D = Y1*Y2
225  const edwards_Fq3 D = (this->Y) * (other.Y);
226  // E = C*D
227  const edwards_Fq3 E = C * D;
228  // H = C-a*D
229  const edwards_Fq3 H = C - edwards_G2::mul_by_a(D);
230  // I = (X1+Y1)*(X2+Y2)-C-D
231  const edwards_Fq3 I = (this->X + this->Y) * (other.X + other.Y) - C - D;
232  // X3 = (E+B)*H
233  const edwards_Fq3 X3 = (E + B) * H;
234  // Y3 = (E-B)*I
235  const edwards_Fq3 Y3 = (E - B) * I;
236  // Z3 = A*H*I
237  const edwards_Fq3 Z3 = A * H * I;
238 
239  return edwards_G2(X3, Y3, Z3);
240 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ base_field_char()

static bigint<base_field::num_limbs> libff::edwards_G2::base_field_char ( )
inlinestatic

Definition at line 81 of file edwards_g2.hpp.

82  {
83  return base_field::field_char();
84  }
Here is the call graph for this function:

◆ batch_to_special_all_non_zeros()

void libff::edwards_G2::batch_to_special_all_non_zeros ( std::vector< edwards_G2 > &  vec)
static

Definition at line 446 of file edwards_g2.cpp.

447 {
448  std::vector<edwards_Fq3> Z_vec;
449  Z_vec.reserve(vec.size());
450 
451  for (auto &el : vec) {
452  Z_vec.emplace_back(el.Z);
453  }
454  batch_invert<edwards_Fq3>(Z_vec);
455 
456  const edwards_Fq3 one = edwards_Fq3::one();
457 
458  for (size_t i = 0; i < vec.size(); ++i) {
459  vec[i].X = vec[i].X * Z_vec[i];
460  vec[i].Y = vec[i].Y * Z_vec[i];
461  vec[i].Z = one;
462  }
463 }
Here is the call graph for this function:

◆ dbl()

edwards_G2 libff::edwards_G2::dbl ( ) const

Definition at line 287 of file edwards_g2.cpp.

288 {
289 #ifdef PROFILE_OP_COUNTS
290  this->dbl_cnt++;
291 #endif
292  if (this->is_zero()) {
293  return (*this);
294  } else {
295  // NOTE: does not handle O and pts of order 2,4
296  // http://www.hyperelliptic.org/EFD/g1p/auto-twisted-inverted.html#doubling-dbl-2008-bbjlp
297 
298  // A = X1^2
299  const edwards_Fq3 A = (this->X).squared();
300  // B = Y1^2
301  const edwards_Fq3 B = (this->Y).squared();
302  // U = a*B
303  const edwards_Fq3 U = edwards_G2::mul_by_a(B);
304  // C = A+U
305  const edwards_Fq3 C = A + U;
306  // D = A-U
307  const edwards_Fq3 D = A - U;
308  // E = (X1+Y1)^2-A-B
309  const edwards_Fq3 E = (this->X + this->Y).squared() - A - B;
310  // X3 = C*D
311  const edwards_Fq3 X3 = C * D;
312  const edwards_Fq3 dZZ = edwards_G2::mul_by_d(this->Z.squared());
313  // Y3 = E*(C-2*d*Z1^2)
314  const edwards_Fq3 Y3 = E * (C - dZZ - dZZ);
315  // Z3 = D*E
316  const edwards_Fq3 Z3 = D * E;
317 
318  return edwards_G2(X3, Y3, Z3);
319  }
320 }
Here is the call graph for this function:

◆ is_special()

bool libff::edwards_G2::is_special ( ) const

Definition at line 146 of file edwards_g2.cpp.

147 {
148  return (this->is_zero() || this->Z == edwards_Fq3::one());
149 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_well_formed()

bool libff::edwards_G2::is_well_formed ( ) const

Definition at line 330 of file edwards_g2.cpp.

331 {
332  // Note that point at infinity is the only special case we must check as
333  // inverted representation does no cover points (0, +-c) and (+-c, 0).
334  if (this->is_zero()) {
335  return true;
336  } else {
337  // a x^2 + y^2 = 1 + d x^2 y^2
338  //
339  // We are using inverted, so equation we need to check is actually
340  //
341  // a (z/x)^2 + (z/y)^2 = 1 + d z^4 / (x^2 * y^2)
342  // z^2 (a y^2 + x^2 - dz^2) = x^2 y^2
343  edwards_Fq3 X2 = this->X.squared();
344  edwards_Fq3 Y2 = this->Y.squared();
345  edwards_Fq3 Z2 = this->Z.squared();
348  return (Z2 * (aY2 + X2 - dZ2) == X2 * Y2);
349  }
350 }
Here is the call graph for this function:

◆ is_zero()

bool libff::edwards_G2::is_zero ( ) const

Definition at line 151 of file edwards_g2.cpp.

152 {
153  return (this->Y.is_zero() && this->Z.is_zero());
154 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mixed_add()

edwards_G2 libff::edwards_G2::mixed_add ( const edwards_G2 other) const

Definition at line 242 of file edwards_g2.cpp.

243 {
244 #ifdef PROFILE_OP_COUNTS
245  this->add_cnt++;
246 #endif
247  // handle special cases having to do with O
248  if (this->is_zero()) {
249  return other;
250  }
251 
252  if (other.is_zero()) {
253  return *this;
254  }
255 
256 #ifdef DEBUG
257  assert(other.is_special());
258 #endif
259 
260  // NOTE: does not handle O and pts of order 2,4
261  // http://www.hyperelliptic.org/EFD/g1p/auto-edwards-inverted.html#addition-madd-2007-lb
262 
263  // A = Z1*Z2
264  const edwards_Fq3 A = this->Z;
265  // B = d*A^2
266  const edwards_Fq3 B = edwards_G2::mul_by_d(A.squared());
267  // C = X1*X2
268  const edwards_Fq3 C = (this->X) * (other.X);
269  // D = Y1*Y2
270  const edwards_Fq3 D = (this->Y) * (other.Y);
271  // E = C*D
272  const edwards_Fq3 E = C * D;
273  // H = C-a*D
274  const edwards_Fq3 H = C - edwards_G2::mul_by_a(D);
275  // I = (X1+Y1)*(X2+Y2)-C-D
276  const edwards_Fq3 I = (this->X + this->Y) * (other.X + other.Y) - C - D;
277  // X3 = (E+B)*H
278  const edwards_Fq3 X3 = (E + B) * H;
279  // Y3 = (E-B)*I
280  const edwards_Fq3 Y3 = (E - B) * I;
281  // Z3 = A*H*I
282  const edwards_Fq3 Z3 = A * H * I;
283 
284  return edwards_G2(X3, Y3, Z3);
285 }
Here is the call graph for this function:

◆ mul_by_a()

edwards_Fq3 libff::edwards_G2::mul_by_a ( const edwards_Fq3 elt)
static

Definition at line 31 of file edwards_g2.cpp.

32 {
33  // should be
34  // edwards_Fq3(
35  // edwards_twist_mul_by_a_c0 * elt.coeffs[2],
36  // edwards_twist_mul_by_a_c1 * elt.coeffs[0],
37  // edwards_twist_mul_by_a_c2 * elt.coeffs[1])
38  // but optimizing the fact that edwards_twist_mul_by_a_c1 =
39  // edwards_twist_mul_by_a_c2 = 1
40  return edwards_Fq3(
41  edwards_twist_mul_by_a_c0 * elt.coeffs[2],
42  elt.coeffs[0],
43  elt.coeffs[1]);
44 }
Here is the caller graph for this function:

◆ mul_by_d()

edwards_Fq3 libff::edwards_G2::mul_by_d ( const edwards_Fq3 elt)
static

Definition at line 46 of file edwards_g2.cpp.

47 {
48  return edwards_Fq3(
49  edwards_twist_mul_by_d_c0 * elt.coeffs[2],
50  edwards_twist_mul_by_d_c1 * elt.coeffs[0],
51  edwards_twist_mul_by_d_c2 * elt.coeffs[1]);
52 }
Here is the caller graph for this function:

◆ mul_by_q()

edwards_G2 libff::edwards_G2::mul_by_q ( ) const

Definition at line 322 of file edwards_g2.cpp.

323 {
324  return edwards_G2(
325  (this->X).Frobenius_map(1),
326  edwards_twist_mul_by_q_Y * (this->Y).Frobenius_map(1),
327  edwards_twist_mul_by_q_Z * (this->Z).Frobenius_map(1));
328 }
Here is the call graph for this function:

◆ one()

const edwards_G2 & libff::edwards_G2::one ( )
static

Definition at line 354 of file edwards_g2.cpp.

354 { return G2_one; }
Here is the caller graph for this function:

◆ operator!=()

bool libff::edwards_G2::operator!= ( const edwards_G2 other) const

Definition at line 181 of file edwards_g2.cpp.

182 {
183  return !(operator==(other));
184 }
Here is the call graph for this function:

◆ operator+()

edwards_G2 libff::edwards_G2::operator+ ( const edwards_G2 other) const

Definition at line 186 of file edwards_g2.cpp.

187 {
188  // handle special cases having to do with O
189  if (this->is_zero()) {
190  return other;
191  }
192 
193  if (other.is_zero()) {
194  return (*this);
195  }
196 
197  return this->add(other);
198 }
Here is the call graph for this function:

◆ operator-() [1/2]

edwards_G2 libff::edwards_G2::operator- ( ) const

Definition at line 200 of file edwards_g2.cpp.

201 {
202  return edwards_G2(-(this->X), this->Y, this->Z);
203 }
Here is the call graph for this function:

◆ operator-() [2/2]

edwards_G2 libff::edwards_G2::operator- ( const edwards_G2 other) const

Definition at line 205 of file edwards_g2.cpp.

206 {
207  return (*this) + (-other);
208 }

◆ operator==()

bool libff::edwards_G2::operator== ( const edwards_G2 other) const

Definition at line 156 of file edwards_g2.cpp.

157 {
158  if (this->is_zero()) {
159  return other.is_zero();
160  }
161 
162  if (other.is_zero()) {
163  return false;
164  }
165 
166  /* now neither is O */
167 
168  // X1/Z1 = X2/Z2 <=> X1*Z2 = X2*Z1
169  if ((this->X * other.Z) != (other.X * this->Z)) {
170  return false;
171  }
172 
173  // Y1/Z1 = Y2/Z2 <=> Y1*Z2 = Y2*Z1
174  if ((this->Y * other.Z) != (other.Y * this->Z)) {
175  return false;
176  }
177 
178  return true;
179 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ order()

static bigint<scalar_field::num_limbs> libff::edwards_G2::order ( )
inlinestatic

Definition at line 85 of file edwards_g2.hpp.

86  {
87  return scalar_field::field_char();
88  }
Here is the call graph for this function:

◆ print()

void libff::edwards_G2::print ( ) const

Definition at line 54 of file edwards_g2.cpp.

55 {
56  if (this->is_zero()) {
57  printf("O\n");
58  } else {
59  edwards_G2 copy(*this);
60  copy.to_affine_coordinates();
61  gmp_printf(
62  "(%Nd*z^2 + %Nd*z + %Nd , %Nd*z^2 + %Nd*z + %Nd)\n",
63  copy.X.coeffs[2].as_bigint().data,
65  copy.X.coeffs[1].as_bigint().data,
67  copy.X.coeffs[0].as_bigint().data,
69  copy.Y.coeffs[2].as_bigint().data,
71  copy.Y.coeffs[1].as_bigint().data,
73  copy.Y.coeffs[0].as_bigint().data,
75  }
76 }
Here is the call graph for this function:

◆ print_coordinates()

void libff::edwards_G2::print_coordinates ( ) const

Definition at line 78 of file edwards_g2.cpp.

79 {
80  if (this->is_zero()) {
81  printf("O\n");
82  } else {
83  gmp_printf(
84  "(%Nd*z^2 + %Nd*z + %Nd : %Nd*z^2 + %Nd*z + %Nd : %Nd*z^2 + %Nd*z "
85  "+ %Nd)\n",
86  this->X.coeffs[2].as_bigint().data,
88  this->X.coeffs[1].as_bigint().data,
90  this->X.coeffs[0].as_bigint().data,
92  this->Y.coeffs[2].as_bigint().data,
94  this->Y.coeffs[1].as_bigint().data,
96  this->Y.coeffs[0].as_bigint().data,
98  this->Z.coeffs[2].as_bigint().data,
100  this->Z.coeffs[1].as_bigint().data,
102  this->Z.coeffs[0].as_bigint().data,
104  }
105 }
Here is the call graph for this function:

◆ random_element()

edwards_G2 libff::edwards_G2::random_element ( )
static

Definition at line 356 of file edwards_g2.cpp.

357 {
358  return edwards_Fr::random_element().as_bigint() * G2_one;
359 }
Here is the call graph for this function:

◆ read_compressed()

void libff::edwards_G2::read_compressed ( std::istream &  in,
edwards_G2 g 
)
static

Definition at line 394 of file edwards_g2.cpp.

395 {
396  // a x^2 + y^2 = 1 + d x^2 y^2
397  // y = sqrt((1-ax^2)/(1-dx^2))
398  edwards_Fq3 tX, tY;
399  unsigned char Y_lsb;
400  in >> tX;
402 
403  in.read((char *)&Y_lsb, 1);
404  Y_lsb -= '0';
405 
406  edwards_Fq3 tX2 = tX.squared();
407  const edwards_Fq3 tY2 =
409  (edwards_Fq3::one() - edwards_G2::mul_by_d(tX2)).inverse();
410  tY = tY2.sqrt();
411 
412  if ((tY.coeffs[0].as_bigint().data[0] & 1) != Y_lsb) {
413  tY = -tY;
414  }
415 
416  // using inverted coordinates
417  g.X = tY;
418  g.Y = tX;
419  g.Z = tX * tY;
420 
421 #ifdef USE_MIXED_ADDITION
422  g.to_special();
423 #endif
424 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_uncompressed()

void libff::edwards_G2::read_uncompressed ( std::istream &  in,
edwards_G2 g 
)
static

Definition at line 377 of file edwards_g2.cpp.

378 {
379  edwards_Fq3 tX, tY;
380  in >> tX;
382  in >> tY;
383 
384  // using inverted coordinates
385  g.X = tY;
386  g.Y = tX;
387  g.Z = tX * tY;
388 
389 #ifdef USE_MIXED_ADDITION
390  g.to_special();
391 #endif
392 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ size_in_bits()

static size_t libff::edwards_G2::size_in_bits ( )
inlinestatic

Definition at line 80 of file edwards_g2.hpp.

80 { return twist_field::size_in_bits() + 1; }
Here is the call graph for this function:

◆ to_affine_coordinates()

void libff::edwards_G2::to_affine_coordinates ( )

Definition at line 107 of file edwards_g2.cpp.

108 {
109  if (this->is_zero()) {
110  this->X = edwards_Fq3::zero();
111  this->Y = edwards_Fq3::one();
112  this->Z = edwards_Fq3::one();
113  } else {
114  // go from inverted coordinates to projective coordinates
115  edwards_Fq3 tX = this->Y * this->Z;
116  edwards_Fq3 tY = this->X * this->Z;
117  edwards_Fq3 tZ = this->X * this->Y;
118  // go from projective coordinates to affine coordinates
119  edwards_Fq3 tZ_inv = tZ.inverse();
120  this->X = tX * tZ_inv;
121  this->Y = tY * tZ_inv;
122  this->Z = edwards_Fq3::one();
123  }
124 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_special()

void libff::edwards_G2::to_special ( )

Definition at line 126 of file edwards_g2.cpp.

127 {
128  if (this->Z.is_zero()) {
129  return;
130  }
131 
132 #if defined(DEBUG) && !defined(NDEBUG)
133  const edwards_G2 copy(*this);
134 #endif
135 
136  edwards_Fq3 Z_inv = this->Z.inverse();
137  this->X = this->X * Z_inv;
138  this->Y = this->Y * Z_inv;
139  this->Z = edwards_Fq3::one();
140 
141 #ifdef DEBUG
142  assert((*this) == copy);
143 #endif
144 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_compressed()

void libff::edwards_G2::write_compressed ( std::ostream &  out) const

Definition at line 368 of file edwards_g2.cpp.

369 {
370  edwards_G2 copy(*this);
371  copy.to_affine_coordinates();
372  /* storing LSB of Y */
373  out << copy.X << OUTPUT_SEPARATOR
374  << (copy.Y.coeffs[0].as_bigint().data[0] & 1);
375 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_uncompressed()

void libff::edwards_G2::write_uncompressed ( std::ostream &  out) const

Definition at line 361 of file edwards_g2.cpp.

362 {
363  edwards_G2 copy(*this);
364  copy.to_affine_coordinates();
365  out << copy.X << OUTPUT_SEPARATOR << copy.Y;
366 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zero()

const edwards_G2 & libff::edwards_G2::zero ( )
static

Definition at line 352 of file edwards_g2.cpp.

352 { return G2_zero; }

Member Data Documentation

◆ fixed_base_exp_window_table

std::vector< size_t > libff::edwards_G2::fixed_base_exp_window_table
static

Definition at line 30 of file edwards_g2.hpp.

◆ G2_one

edwards_G2 libff::edwards_G2::G2_one
static

Definition at line 33 of file edwards_g2.hpp.

◆ G2_zero

edwards_G2 libff::edwards_G2::G2_zero
static

Definition at line 32 of file edwards_g2.hpp.

◆ wnaf_window_table

std::vector< size_t > libff::edwards_G2::wnaf_window_table
static

Definition at line 29 of file edwards_g2.hpp.

◆ X

edwards_Fq3 libff::edwards_G2::X

Definition at line 35 of file edwards_g2.hpp.

◆ Y

edwards_Fq3 libff::edwards_G2::Y

Definition at line 35 of file edwards_g2.hpp.

◆ Z

edwards_Fq3 libff::edwards_G2::Z

Definition at line 35 of file edwards_g2.hpp.


The documentation for this class was generated from the following files:
libff::edwards_twist_mul_by_d_c0
edwards_Fq edwards_twist_mul_by_d_c0
Definition: edwards_init.cpp:26
libff::Fp_model::random_element
static Fp_model< n, modulus > random_element()
returns random element of Fp_model
libff::edwards_G2::one
static const edwards_G2 & one()
Definition: edwards_g2.cpp:354
libff::edwards_G2::G2_one
static edwards_G2 G2_one
Definition: edwards_g2.hpp:33
libff::Fp3_model< edwards_q_limbs, edwards_modulus_q >::one
static Fp3_model< n, modulus > one()
libff::edwards_G2::G2_zero
static edwards_G2 G2_zero
Definition: edwards_g2.hpp:32
libff::edwards_G2::operator==
bool operator==(const edwards_G2 &other) const
Definition: edwards_g2.cpp:156
libff::edwards_G2::Z
edwards_Fq3 Z
Definition: edwards_g2.hpp:35
libff::edwards_G2::mul_by_a
static edwards_Fq3 mul_by_a(const edwards_Fq3 &elt)
Definition: edwards_g2.cpp:31
libff::edwards_twist_mul_by_q_Z
edwards_Fq edwards_twist_mul_by_q_Z
Definition: edwards_init.cpp:30
libff::edwards_G2::X
edwards_Fq3 X
Definition: edwards_g2.hpp:35
libff::Fp3_model::coeffs
my_Fp coeffs[3]
Definition: fp3.hpp:59
libff::edwards_G2::is_zero
bool is_zero() const
Definition: edwards_g2.cpp:151
OUTPUT_SEPARATOR
#define OUTPUT_SEPARATOR
Definition: serialization.hpp:69
libff::edwards_G2::mul_by_d
static edwards_Fq3 mul_by_d(const edwards_Fq3 &elt)
Definition: edwards_g2.cpp:46
libff::consume_OUTPUT_SEPARATOR
void consume_OUTPUT_SEPARATOR(std::istream &in)
libff::Fp_model< edwards_q_limbs, edwards_modulus_q >::num_limbs
static const mp_size_t num_limbs
Definition: fp.hpp:47
libff::edwards_twist_mul_by_a_c0
edwards_Fq edwards_twist_mul_by_a_c0
Definition: edwards_init.cpp:23
libff::Fp_model< edwards_q_limbs, edwards_modulus_q >::field_char
static const bigint< n > & field_char()
Definition: fp.hpp:136
libff::edwards_Fq3
Fp3_model< edwards_q_limbs, edwards_modulus_q > edwards_Fq3
Definition: edwards_init.hpp:31
libff::edwards_twist_mul_by_q_Y
edwards_Fq edwards_twist_mul_by_q_Y
Definition: edwards_init.cpp:29
libff::Fp_model::as_bigint
bigint< n > as_bigint() const
libff::edwards_G2::add
edwards_G2 add(const edwards_G2 &other) const
Definition: edwards_g2.cpp:210
libff::edwards_twist_mul_by_d_c1
edwards_Fq edwards_twist_mul_by_d_c1
Definition: edwards_init.cpp:27
libff::edwards_G2::Y
edwards_Fq3 Y
Definition: edwards_g2.hpp:35
libff::Fp3_model::inverse
Fp3_model inverse() const
libff::Fp3_model::sqrt
Fp3_model sqrt() const
HAS TO BE A SQUARE (else does not terminate)
libff::Fp3_model::is_zero
bool is_zero() const
Definition: fp3.hpp:89
libff::Fp3_model< edwards_q_limbs, edwards_modulus_q >::size_in_bits
static size_t size_in_bits()
Definition: fp3.hpp:109
libff::edwards_twist_mul_by_d_c2
edwards_Fq edwards_twist_mul_by_d_c2
Definition: edwards_init.cpp:28
libff::edwards_G2::edwards_G2
edwards_G2()
Definition: edwards_g2.cpp:24
libff::Fp3_model::squared
Fp3_model squared() const
libff::Fp3_model< edwards_q_limbs, edwards_modulus_q >::zero
static Fp3_model< n, modulus > zero()