#include <edwards_g1.hpp>
Definition at line 21 of file edwards_g1.hpp.
◆ base_field
◆ scalar_field
◆ edwards_G1() [1/2]
libff::edwards_G1::edwards_G1 |
( |
| ) |
|
◆ edwards_G1() [2/2]
◆ add()
Definition at line 165 of file edwards_g1.cpp.
167 #ifdef PROFILE_OP_COUNTS
186 edwards_Fq I = (this->
X + this->
Y) * (other.X + other.Y) - C - D;
◆ base_field_char()
◆ batch_to_special_all_non_zeros()
void libff::edwards_G1::batch_to_special_all_non_zeros |
( |
std::vector< edwards_G1 > & |
vec | ) |
|
|
static |
Definition at line 388 of file edwards_g1.cpp.
390 std::vector<edwards_Fq> Z_vec;
391 Z_vec.reserve(vec.size());
393 for (
auto &el : vec) {
394 Z_vec.emplace_back(el.Z);
396 batch_invert<edwards_Fq>(Z_vec);
400 for (
size_t i = 0; i < vec.size(); ++i) {
401 vec[i].X = vec[i].X * Z_vec[i];
402 vec[i].Y = vec[i].Y * Z_vec[i];
◆ dbl()
◆ is_special()
bool libff::edwards_G1::is_special |
( |
| ) |
const |
◆ is_well_formed()
bool libff::edwards_G1::is_well_formed |
( |
| ) |
const |
◆ is_zero()
bool libff::edwards_G1::is_zero |
( |
| ) |
const |
◆ mixed_add()
Definition at line 197 of file edwards_g1.cpp.
199 #ifdef PROFILE_OP_COUNTS
207 if (other.is_zero()) {
212 assert(other.is_special());
231 edwards_Fq I = (this->
X + this->
Y) * (other.X + other.Y) - C - D;
◆ one()
◆ operator!=()
bool libff::edwards_G1::operator!= |
( |
const edwards_G1 & |
other | ) |
const |
◆ operator+()
Definition at line 141 of file edwards_g1.cpp.
148 if (other.is_zero()) {
152 return this->
add(other);
◆ operator-() [1/2]
◆ operator-() [2/2]
◆ operator==()
bool libff::edwards_G1::operator== |
( |
const edwards_G1 & |
other | ) |
const |
Definition at line 111 of file edwards_g1.cpp.
114 return other.is_zero();
117 if (other.is_zero()) {
124 if ((this->
X * other.Z) != (other.X * this->Z)) {
129 if ((this->
Y * other.Z) != (other.Y * this->Z)) {
◆ order()
◆ print()
void libff::edwards_G1::print |
( |
| ) |
const |
Definition at line 30 of file edwards_g1.cpp.
36 copy.to_affine_coordinates();
39 copy.X.as_bigint().data,
41 copy.Y.as_bigint().data,
◆ print_coordinates()
void libff::edwards_G1::print_coordinates |
( |
| ) |
const |
Definition at line 46 of file edwards_g1.cpp.
52 "(%Nd : %Nd : %Nd)\n",
55 this->Y.as_bigint().data,
57 this->Z.as_bigint().data,
◆ random_element()
◆ read_compressed()
void libff::edwards_G1::read_compressed |
( |
std::istream & |
in, |
|
|
edwards_G1 & |
g |
|
) |
| |
|
static |
Definition at line 337 of file edwards_g1.cpp.
346 in.read((
char *)&Y_lsb, 1);
354 if ((tY.as_bigint().data[0] & 1) != Y_lsb) {
363 #ifdef USE_MIXED_ADDITION
◆ read_uncompressed()
void libff::edwards_G1::read_uncompressed |
( |
std::istream & |
in, |
|
|
edwards_G1 & |
g |
|
) |
| |
|
static |
◆ size_in_bits()
static size_t libff::edwards_G1::size_in_bits |
( |
| ) |
|
|
inlinestatic |
◆ to_affine_coordinates()
void libff::edwards_G1::to_affine_coordinates |
( |
| ) |
|
Definition at line 62 of file edwards_g1.cpp.
75 this->
X = tX * tZ_inv;
76 this->Y = tY * tZ_inv;
◆ to_special()
void libff::edwards_G1::to_special |
( |
| ) |
|
Definition at line 81 of file edwards_g1.cpp.
92 this->
X = this->
X * Z_inv;
93 this->
Y = this->
Y * Z_inv;
97 assert((*
this) == copy);
◆ write_compressed()
void libff::edwards_G1::write_compressed |
( |
std::ostream & |
out | ) |
const |
◆ write_uncompressed()
void libff::edwards_G1::write_uncompressed |
( |
std::ostream & |
out | ) |
const |
◆ zero()
◆ fixed_base_exp_window_table
std::vector< size_t > libff::edwards_G1::fixed_base_exp_window_table |
|
static |
◆ G1_one
◆ G1_zero
◆ wnaf_window_table
std::vector< size_t > libff::edwards_G1::wnaf_window_table |
|
static |
The documentation for this class was generated from the following files:
- /home/runner/work/libff/libff/libff/algebra/curves/edwards/edwards_g1.hpp
- /home/runner/work/libff/libff/libff/algebra/curves/edwards/edwards_g1.cpp