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::bn128_G2 Class Reference

#include <bn128_g2.hpp>

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

Public Types

typedef bn128_Fq base_field
 
typedef bn128_Fr scalar_field
 

Public Member Functions

void fill_coord (bn::Fp2 coord[3]) const
 
 bn128_G2 ()
 
 bn128_G2 (bn::Fp2 coord[3])
 
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 bn128_G2 &other) const
 
bool operator!= (const bn128_G2 &other) const
 
bn128_G2 operator+ (const bn128_G2 &other) const
 
bn128_G2 operator- () const
 
bn128_G2 operator- (const bn128_G2 &other) const
 
bn128_G2 add (const bn128_G2 &other) const
 
bn128_G2 mixed_add (const bn128_G2 &other) const
 
bn128_G2 dbl () const
 
bn128_G2 mul_by_cofactor () const
 
bool is_well_formed () const
 
bool is_in_safe_subgroup () const
 
void write_uncompressed (std::ostream &) const
 
void write_compressed (std::ostream &) const
 

Static Public Member Functions

static const bn128_G2zero ()
 
static const bn128_G2one ()
 
static bn128_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 &, bn128_G2 &)
 
static void read_compressed (std::istream &, bn128_G2 &)
 
static void batch_to_special_all_non_zeros (std::vector< bn128_G2 > &vec)
 

Public Attributes

bn::Fp2 X
 
bn::Fp2 Y
 
bn::Fp2 Z
 

Static Public Attributes

static std::vector< size_t > wnaf_window_table
 
static std::vector< size_t > fixed_base_exp_window_table
 
static bn128_G2 G2_zero
 
static bn128_G2 G2_one
 
static const mp_size_t h_bitcount = 256
 
static const mp_size_t h_limbs
 
static bigint< h_limbsh
 

Detailed Description

Definition at line 24 of file bn128_g2.hpp.

Member Typedef Documentation

◆ base_field

Definition at line 39 of file bn128_g2.hpp.

◆ scalar_field

Definition at line 40 of file bn128_g2.hpp.

Constructor & Destructor Documentation

◆ bn128_G2() [1/2]

libff::bn128_G2::bn128_G2 ( )

Definition at line 72 of file bn128_g2.cpp.

73 {
74  this->X = G2_zero.X;
75  this->Y = G2_zero.Y;
76  this->Z = G2_zero.Z;
77 }

◆ bn128_G2() [2/2]

libff::bn128_G2::bn128_G2 ( bn::Fp2  coord[3])
inline

Definition at line 57 of file bn128_g2.hpp.

57 : X(coord[0]), Y(coord[1]), Z(coord[2]){};

Member Function Documentation

◆ add()

bn128_G2 libff::bn128_G2::add ( const bn128_G2 other) const

Definition at line 195 of file bn128_g2.cpp.

196 {
197 #ifdef PROFILE_OP_COUNTS
198  this->add_cnt++;
199 #endif
200 
201  bn::Fp2 this_coord[3], other_coord[3], result_coord[3];
202  this->fill_coord(this_coord);
203  other.fill_coord(other_coord);
204  bn::ecop::ECAdd(result_coord, this_coord, other_coord);
205 
206  bn128_G2 result(result_coord);
207  return result;
208 }
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::bn128_G2::base_field_char ( )
inlinestatic

Definition at line 88 of file bn128_g2.hpp.

89  {
90  return base_field::field_char();
91  }
Here is the call graph for this function:

◆ batch_to_special_all_non_zeros()

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

Definition at line 483 of file bn128_g2.cpp.

484 {
485  std::vector<bn::Fp2> Z_vec;
486  Z_vec.reserve(vec.size());
487 
488  for (auto &el : vec) {
489  Z_vec.emplace_back(el.Z);
490  }
491  bn_batch_invert<bn::Fp2>(Z_vec);
492 
493  const bn::Fp2 one = 1;
494 
495  for (size_t i = 0; i < vec.size(); ++i) {
496  bn::Fp2 Z2, Z3;
497  bn::Fp2::square(Z2, Z_vec[i]);
498  bn::Fp2::mul(Z3, Z2, Z_vec[i]);
499 
500  bn::Fp2::mul(vec[i].X, vec[i].X, Z2);
501  bn::Fp2::mul(vec[i].Y, vec[i].Y, Z3);
502  vec[i].Z = one;
503  }
504 }
Here is the call graph for this function:

◆ dbl()

bn128_G2 libff::bn128_G2::dbl ( ) const

Definition at line 295 of file bn128_g2.cpp.

296 {
297 #ifdef PROFILE_OP_COUNTS
298  this->dbl_cnt++;
299 #endif
300 
301  bn::Fp2 this_coord[3], result_coord[3];
302  this->fill_coord(this_coord);
303  bn::ecop::ECDouble(result_coord, this_coord);
304 
305  bn128_G2 result(result_coord);
306  return result;
307 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ fill_coord()

void libff::bn128_G2::fill_coord ( bn::Fp2  coord[3]) const
inline

Definition at line 49 of file bn128_g2.hpp.

50  {
51  coord[0] = this->X;
52  coord[1] = this->Y;
53  coord[2] = this->Z;
54  };
Here is the caller graph for this function:

◆ is_in_safe_subgroup()

bool libff::bn128_G2::is_in_safe_subgroup ( ) const

Definition at line 338 of file bn128_g2.cpp.

339 {
340  return zero() == scalar_field::mod * (*this);
341 }
Here is the call graph for this function:

◆ is_special()

bool libff::bn128_G2::is_special ( ) const

Definition at line 121 of file bn128_g2.cpp.

121 { return (this->is_zero() || this->Z == 1); }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_well_formed()

bool libff::bn128_G2::is_well_formed ( ) const

Definition at line 311 of file bn128_g2.cpp.

312 {
313  if (this->is_zero()) {
314  return true;
315  } else {
316  // y^2 = x^3 + b
317  //
318  // We are using Jacobian coordinates, so equation we need to check is
319  // actually
320  //
321  // (y/z^3)^2 = (x/z^2)^3 + b
322  // y^2 / z^6 = x^3 / z^6 + b
323  // y^2 = x^3 + b z^6
324  bn::Fp2 X2, Y2, Z2;
325  bn::Fp2::square(X2, this->X);
326  bn::Fp2::square(Y2, this->Y);
327  bn::Fp2::square(Z2, this->Z);
328 
329  bn::Fp2 X3, Z3, Z6;
330  bn::Fp2::mul(X3, X2, this->X);
331  bn::Fp2::mul(Z3, Z2, this->Z);
332  bn::Fp2::square(Z6, Z3);
333 
334  return (Y2 == X3 + bn128_twist_coeff_b * Z6);
335  }
336 }
Here is the call graph for this function:

◆ is_zero()

bool libff::bn128_G2::is_zero ( ) const

Definition at line 123 of file bn128_g2.cpp.

123 { return Z.isZero(); }
Here is the caller graph for this function:

◆ mixed_add()

bn128_G2 libff::bn128_G2::mixed_add ( const bn128_G2 other) const

Definition at line 210 of file bn128_g2.cpp.

211 {
212  if (this->is_zero()) {
213  return other;
214  }
215 
216  if (other.is_zero()) {
217  return *this;
218  }
219 
220  // no need to handle points of order 2,4
221  // (they cannot exist in a prime-order subgroup)
222 
223 #ifdef DEBUG
224  assert(other.is_special());
225 #endif
226 
227  // check for doubling case
228 
229  // using Jacobian coordinates so:
230  // (X1:Y1:Z1) = (X2:Y2:Z2)
231  // iff
232  // X1/Z1^2 == X2/Z2^2 and Y1/Z1^3 == Y2/Z2^3
233  // iff
234  // X1 * Z2^2 == X2 * Z1^2 and Y1 * Z2^3 == Y2 * Z1^3
235 
236  // we know that Z2 = 1
237 
238  bn::Fp2 Z1Z1;
239  bn::Fp2::square(Z1Z1, this->Z);
240  const bn::Fp2 &U1 = this->X;
241  bn::Fp2 U2;
242  bn::Fp2::mul(U2, other.X, Z1Z1);
243  bn::Fp2 Z1_cubed;
244  bn::Fp2::mul(Z1_cubed, this->Z, Z1Z1);
245 
246  const bn::Fp2 &S1 = this->Y;
247  bn::Fp2 S2;
248  // S2 = Y2*Z1*Z1Z1
249  bn::Fp2::mul(S2, other.Y, Z1_cubed);
250 
251  if (U1 == U2 && S1 == S2) {
252  // dbl case; nothing of above can be reused
253  return this->dbl();
254  }
255 
256 #ifdef PROFILE_OP_COUNTS
257  this->add_cnt++;
258 #endif
259 
260  bn128_G2 result;
261  bn::Fp2 H, HH, I, J, r, V, tmp;
262  // H = U2-X1
263  bn::Fp2::sub(H, U2, this->X);
264  // HH = H^2
265  bn::Fp2::square(HH, H);
266  // I = 4*HH
267  bn::Fp2::add(tmp, HH, HH);
268  bn::Fp2::add(I, tmp, tmp);
269  // J = H*I
270  bn::Fp2::mul(J, H, I);
271  // r = 2*(S2-Y1)
272  bn::Fp2::sub(tmp, S2, this->Y);
273  bn::Fp2::add(r, tmp, tmp);
274  // V = X1*I
275  bn::Fp2::mul(V, this->X, I);
276  // X3 = r^2-J-2*V
277  bn::Fp2::square(result.X, r);
278  bn::Fp2::sub(result.X, result.X, J);
279  bn::Fp2::sub(result.X, result.X, V);
280  bn::Fp2::sub(result.X, result.X, V);
281  // Y3 = r*(V-X3)-2*Y1*J
282  bn::Fp2::sub(tmp, V, result.X);
283  bn::Fp2::mul(result.Y, r, tmp);
284  bn::Fp2::mul(tmp, this->Y, J);
285  bn::Fp2::sub(result.Y, result.Y, tmp);
286  bn::Fp2::sub(result.Y, result.Y, tmp);
287  // Z3 = (Z1+H)^2-Z1Z1-HH
288  bn::Fp2::add(tmp, this->Z, H);
289  bn::Fp2::square(result.Z, tmp);
290  bn::Fp2::sub(result.Z, result.Z, Z1Z1);
291  bn::Fp2::sub(result.Z, result.Z, HH);
292  return result;
293 }
Here is the call graph for this function:

◆ mul_by_cofactor()

bn128_G2 libff::bn128_G2::mul_by_cofactor ( ) const

Definition at line 309 of file bn128_g2.cpp.

309 { return bn128_G2::h * (*this); }

◆ one()

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

Definition at line 345 of file bn128_g2.cpp.

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

◆ operator!=()

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

Definition at line 156 of file bn128_g2.cpp.

157 {
158  return !(operator==(other));
159 }
Here is the call graph for this function:

◆ operator+()

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

Definition at line 161 of file bn128_g2.cpp.

162 {
163  // handle special cases having to do with O
164  if (this->is_zero()) {
165  return other;
166  }
167 
168  if (other.is_zero()) {
169  return *this;
170  }
171 
172  // no need to handle points of order 2,4
173  // (they cannot exist in a prime-order subgroup)
174 
175  // handle double case, and then all the rest
176  if (this->operator==(other)) {
177  return this->dbl();
178  } else {
179  return this->add(other);
180  }
181 }
Here is the call graph for this function:

◆ operator-() [1/2]

bn128_G2 libff::bn128_G2::operator- ( ) const

Definition at line 183 of file bn128_g2.cpp.

184 {
185  bn128_G2 result(*this);
186  bn::Fp2::neg(result.Y, result.Y);
187  return result;
188 }

◆ operator-() [2/2]

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

Definition at line 190 of file bn128_g2.cpp.

191 {
192  return (*this) + (-other);
193 }

◆ operator==()

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

Definition at line 125 of file bn128_g2.cpp.

126 {
127  if (this->is_zero()) {
128  return other.is_zero();
129  }
130 
131  if (other.is_zero()) {
132  return false;
133  }
134 
135  // now neither is O
136 
137  bn::Fp2 Z1sq, Z2sq, lhs, rhs;
138  bn::Fp2::square(Z1sq, this->Z);
139  bn::Fp2::square(Z2sq, other.Z);
140  bn::Fp2::mul(lhs, Z2sq, this->X);
141  bn::Fp2::mul(rhs, Z1sq, other.X);
142 
143  if (lhs != rhs) {
144  return false;
145  }
146 
147  bn::Fp2 Z1cubed, Z2cubed;
148  bn::Fp2::mul(Z1cubed, Z1sq, this->Z);
149  bn::Fp2::mul(Z2cubed, Z2sq, other.Z);
150  bn::Fp2::mul(lhs, Z2cubed, this->Y);
151  bn::Fp2::mul(rhs, Z1cubed, other.Y);
152 
153  return (lhs == rhs);
154 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ order()

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

Definition at line 92 of file bn128_g2.hpp.

93  {
94  return scalar_field::field_char();
95  }
Here is the call graph for this function:

◆ print()

void libff::bn128_G2::print ( ) const

Definition at line 79 of file bn128_g2.cpp.

80 {
81  if (this->is_zero()) {
82  printf("O\n");
83  } else {
84  bn128_G2 copy(*this);
85  copy.to_affine_coordinates();
86  std::cout << "(" << copy.X.toString(10) << " : " << copy.Y.toString(10)
87  << " : " << copy.Z.toString(10) << ")\n";
88  }
89 }
Here is the call graph for this function:

◆ print_coordinates()

void libff::bn128_G2::print_coordinates ( ) const

Definition at line 91 of file bn128_g2.cpp.

92 {
93  if (this->is_zero()) {
94  printf("O\n");
95  } else {
96  std::cout << "(" << X.toString(10) << " : " << Y.toString(10) << " : "
97  << Z.toString(10) << ")\n";
98  }
99 }
Here is the call graph for this function:

◆ random_element()

bn128_G2 libff::bn128_G2::random_element ( )
static

Definition at line 347 of file bn128_g2.cpp.

348 {
349  return bn128_Fr::random_element().as_bigint() * G2_one;
350 }
Here is the call graph for this function:

◆ read_compressed()

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

Definition at line 419 of file bn128_g2.cpp.

420 {
421  char is_zero;
422  // this reads is_zero;
423  in.read((char *)&is_zero, 1);
424  is_zero -= '0';
426 
427  bn::Fp2 tX;
428 #ifndef BINARY_OUTPUT
429  in >> tX.a_;
431  in >> tX.b_;
432 #else
433  in.read((char *)&tX.a_, sizeof(tX.a_));
434  in.read((char *)&tX.b_, sizeof(tX.b_));
435 #endif
437  unsigned char Y_lsb;
438  in.read((char *)&Y_lsb, 1);
439  Y_lsb -= '0';
440 
441  // y = +/- sqrt(x^3 + b)
442  if (!is_zero) {
443  g.X = tX;
444  bn::Fp2 tX2, tY2;
445  bn::Fp2::square(tX2, tX);
446  bn::Fp2::mul(tY2, tX2, tX);
447  bn::Fp2::add(tY2, tY2, bn128_twist_coeff_b);
448 
449  g.Y = bn128_G2::sqrt(tY2);
450  if ((((unsigned char *)&g.Y.a_)[0] & 1) != Y_lsb) {
451  bn::Fp2::neg(g.Y, g.Y);
452  }
453  }
454 
455  // finalize
456  if (!is_zero) {
457  g.Z = bn::Fp2(bn::Fp(1), bn::Fp(0));
458  } else {
459  g = bn128_G2::zero();
460  }
461 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ read_uncompressed()

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

Definition at line 388 of file bn128_g2.cpp.

389 {
390  char is_zero;
391  // this reads is_zero;
392  in.read((char *)&is_zero, 1);
393  is_zero -= '0';
395 
396 #ifndef BINARY_OUTPUT
397  in >> g.X.a_;
399  in >> g.X.b_;
401  in >> g.Y.a_;
403  in >> g.Y.b_;
404 #else
405  in.read((char *)&g.X.a_, sizeof(g.X.a_));
406  in.read((char *)&g.X.b_, sizeof(g.X.b_));
407  in.read((char *)&g.Y.a_, sizeof(g.Y.a_));
408  in.read((char *)&g.Y.b_, sizeof(g.Y.b_));
409 #endif
410 
411  // finalize
412  if (!is_zero) {
413  g.Z = bn::Fp2(bn::Fp(1), bn::Fp(0));
414  } else {
415  g = bn128_G2::zero();
416  }
417 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ size_in_bits()

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

Definition at line 87 of file bn128_g2.hpp.

87 { return 2 * base_field::size_in_bits() + 1; }
Here is the call graph for this function:

◆ to_affine_coordinates()

void libff::bn128_G2::to_affine_coordinates ( )

Definition at line 101 of file bn128_g2.cpp.

102 {
103  if (this->is_zero()) {
104  X = 0;
105  Y = 1;
106  Z = 0;
107  } else {
108  bn::Fp2 r;
109  r = Z;
110  r.inverse();
111  bn::Fp2::square(Z, r);
112  X *= Z;
113  r *= Z;
114  Y *= r;
115  Z = 1;
116  }
117 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_special()

void libff::bn128_G2::to_special ( )

Definition at line 119 of file bn128_g2.cpp.

119 { this->to_affine_coordinates(); }
Here is the call graph for this function:

◆ write_compressed()

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

Definition at line 371 of file bn128_g2.cpp.

372 {
373  bn128_G2 gcopy(*this);
374  gcopy.to_affine_coordinates();
375 
376  out << (gcopy.is_zero() ? '1' : '0') << OUTPUT_SEPARATOR;
377 
378 #ifndef BINARY_OUTPUT
379  out << gcopy.X.a_ << OUTPUT_SEPARATOR << gcopy.X.b_;
380 #else
381  out.write((char *)&gcopy.X.a_, sizeof(gcopy.X.a_));
382  out.write((char *)&gcopy.X.b_, sizeof(gcopy.X.b_));
383 #endif
384  out << OUTPUT_SEPARATOR
385  << (((unsigned char *)&gcopy.Y.a_)[0] & 1 ? '1' : '0');
386 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_uncompressed()

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

Definition at line 352 of file bn128_g2.cpp.

353 {
354  bn128_G2 gcopy(*this);
355  gcopy.to_affine_coordinates();
356 
357  out << (gcopy.is_zero() ? '1' : '0') << OUTPUT_SEPARATOR;
358 
359  /* no point compression case */
360 #ifndef BINARY_OUTPUT
361  out << gcopy.X.a_ << OUTPUT_SEPARATOR << gcopy.X.b_ << OUTPUT_SEPARATOR;
362  out << gcopy.Y.a_ << OUTPUT_SEPARATOR << gcopy.Y.b_;
363 #else
364  out.write((char *)&gcopy.X.a_, sizeof(gcopy.X.a_));
365  out.write((char *)&gcopy.X.b_, sizeof(gcopy.X.b_));
366  out.write((char *)&gcopy.Y.a_, sizeof(gcopy.Y.a_));
367  out.write((char *)&gcopy.Y.b_, sizeof(gcopy.Y.b_));
368 #endif
369 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zero()

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

Definition at line 343 of file bn128_g2.cpp.

343 { return G2_zero; }
Here is the caller graph for this function:

Member Data Documentation

◆ fixed_base_exp_window_table

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

Definition at line 35 of file bn128_g2.hpp.

◆ G2_one

bn128_G2 libff::bn128_G2::G2_one
static

Definition at line 37 of file bn128_g2.hpp.

◆ G2_zero

bn128_G2 libff::bn128_G2::G2_zero
static

Definition at line 36 of file bn128_g2.hpp.

◆ h

bigint< bn128_G2::h_limbs > libff::bn128_G2::h
static

Definition at line 46 of file bn128_g2.hpp.

◆ h_bitcount

const mp_size_t libff::bn128_G2::h_bitcount = 256
static

Definition at line 43 of file bn128_g2.hpp.

◆ h_limbs

const mp_size_t libff::bn128_G2::h_limbs
static
Initial value:
=
(h_bitcount + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS

Definition at line 44 of file bn128_g2.hpp.

◆ wnaf_window_table

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

Definition at line 34 of file bn128_g2.hpp.

◆ X

bn::Fp2 libff::bn128_G2::X

Definition at line 48 of file bn128_g2.hpp.

◆ Y

bn::Fp2 libff::bn128_G2::Y

Definition at line 48 of file bn128_g2.hpp.

◆ Z

bn::Fp2 libff::bn128_G2::Z

Definition at line 48 of file bn128_g2.hpp.


The documentation for this class was generated from the following files:
libff::bn128_G2::Z
bn::Fp2 Z
Definition: bn128_g2.hpp:48
libff::bn128_G2::dbl
bn128_G2 dbl() const
Definition: bn128_g2.cpp:295
libff::Fp_model::random_element
static Fp_model< n, modulus > random_element()
returns random element of Fp_model
libff::bn128_G2::fill_coord
void fill_coord(bn::Fp2 coord[3]) const
Definition: bn128_g2.hpp:49
libff::bn128_G2::add
bn128_G2 add(const bn128_G2 &other) const
Definition: bn128_g2.cpp:195
libff::bn128_G2::h
static bigint< h_limbs > h
Definition: bn128_g2.hpp:46
libff::bn128_G2::X
bn::Fp2 X
Definition: bn128_g2.hpp:48
libff::bn128_G2::G2_one
static bn128_G2 G2_one
Definition: bn128_g2.hpp:37
OUTPUT_SEPARATOR
#define OUTPUT_SEPARATOR
Definition: serialization.hpp:69
libff::bn128_G2::Y
bn::Fp2 Y
Definition: bn128_g2.hpp:48
libff::Fp_model::size_in_bits
static size_t size_in_bits()
Definition: fp.hpp:134
libff::consume_OUTPUT_SEPARATOR
void consume_OUTPUT_SEPARATOR(std::istream &in)
libff::bn128_G2::h_bitcount
static const mp_size_t h_bitcount
Definition: bn128_g2.hpp:43
libff::bn128_G2::zero
static const bn128_G2 & zero()
Definition: bn128_g2.cpp:343
libff::Fp_model::field_char
static const bigint< n > & field_char()
Definition: fp.hpp:136
libff::bn128_twist_coeff_b
bn::Fp2 bn128_twist_coeff_b
Definition: bn128_init.cpp:24
libff::bn128_G2::operator==
bool operator==(const bn128_G2 &other) const
Definition: bn128_g2.cpp:125
libff::bn128_G2::G2_zero
static bn128_G2 G2_zero
Definition: bn128_g2.hpp:36
libff::bn128_G2::one
static const bn128_G2 & one()
Definition: bn128_g2.cpp:345
libff::bn128_G2::is_zero
bool is_zero() const
Definition: bn128_g2.cpp:123
libff::Fp_model::mod
static const constexpr bigint< n > & mod
Definition: fp.hpp:48
libff::bn128_G2::bn128_G2
bn128_G2()
Definition: bn128_g2.cpp:72
libff::bn128_G2::to_affine_coordinates
void to_affine_coordinates()
Definition: bn128_g2.cpp:101