Public Types |
Public Member Functions |
Static Public Member Functions |
Public Attributes |
List of all members
nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::short_weierstrass, coordinates::affine > Struct Template Reference
A struct representing an element from the group G1 of short Weierstrass curve of affine coordinates representation. Description: https://hyperelliptic.org/EFD/g1p/auto-shortw.html. More...
#include <element_g1_affine.hpp>
Collaboration diagram for nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::short_weierstrass, coordinates::affine >:
Public Types | |
using | coordinates = coordinates::affine |
using | field_type = typename CurveParams::field_type |
using | form = forms::short_weierstrass |
using | group_type = typename params_type::template group_type< coordinates > |
Public Member Functions | |
constexpr | curve_element () |
constexpr | curve_element (field_value_type in_X, field_value_type in_Y) |
constexpr curve_element | doubled () const |
Affine doubling formulas: 2(x1,y1)=(x3,y3) where x3 = (3*x12+a)2/(2*y1)2-x1-x1 y3 = (2*x1+x1)*(3*x12+a)/(2*y1)-(3*x12+a)3/(2*y1)3-y1. More... | |
constexpr bool | is_zero () const |
constexpr bool | operator!= (const curve_element &other) const |
constexpr curve_element | operator+ (const curve_element &other) const |
constexpr curve_element | operator- () const |
constexpr curve_element | operator- (const curve_element &other) const |
constexpr curve_element | operator= (const curve_element &other) |
constexpr bool | operator== (const curve_element &other) const |
constexpr curve_element< params_type, form, typename curves::coordinates::projective > | to_projective () const |
Static Public Member Functions | |
constexpr static curve_element | one () |
Get the generator of group G1. More... | |
constexpr static curve_element | zero () |
Get the point at infinity. More... | |
Public Attributes | |
field_value_type | X |
field_value_type | Y |
Detailed Description
template<typename CurveParams>
struct nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::short_weierstrass, coordinates::affine >
A struct representing an element from the group G1 of short Weierstrass curve of affine coordinates representation. Description: https://hyperelliptic.org/EFD/g1p/auto-shortw.html.
Member Typedef Documentation
◆ coordinates
template<typename CurveParams >
using nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::short_weierstrass, coordinates::affine >::coordinates = coordinates::affine |
◆ field_type
template<typename CurveParams >
using nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::short_weierstrass, coordinates::affine >::field_type = typename CurveParams::field_type |
◆ form
template<typename CurveParams >
using nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::short_weierstrass, coordinates::affine >::form = forms::short_weierstrass |
◆ group_type
template<typename CurveParams >
using nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::short_weierstrass, coordinates::affine >::group_type = typename params_type::template group_type<coordinates> |
Constructor & Destructor Documentation
◆ curve_element() [1/2]
template<typename CurveParams >
|
inlineconstexpr |
- Returns
- the point at infinity by default
◆ curve_element() [2/2]
template<typename CurveParams >
|
inlineconstexpr |
- Returns
- the selected point $(X:Y)$ in the affine coordinates
Member Function Documentation
◆ doubled()
template<typename CurveParams >
|
inlineconstexpr |
Affine doubling formulas: 2(x1,y1)=(x3,y3) where x3 = (3*x12+a)2/(2*y1)2-x1-x1 y3 = (2*x1+x1)*(3*x12+a)/(2*y1)-(3*x12+a)3/(2*y1)3-y1.
- Returns
- doubled element from group G1
◆ is_zero()
template<typename CurveParams >
|
inlineconstexpr |
- Returns
- true if element from group G1 is the point at infinity
◆ one()
template<typename CurveParams >
|
inlinestaticconstexpr |
Get the generator of group G1.
◆ operator!=()
template<typename CurveParams >
|
inlineconstexpr |
◆ operator+()
template<typename CurveParams >
|
inlineconstexpr |
◆ operator-() [1/2]
template<typename CurveParams >
|
inlineconstexpr |
◆ operator-() [2/2]
template<typename CurveParams >
|
inlineconstexpr |
◆ operator=()
template<typename CurveParams >
|
inlineconstexpr |
◆ operator==()
template<typename CurveParams >
|
inlineconstexpr |
◆ to_projective()
template<typename CurveParams >
|
inlineconstexpr |
- Returns
- return the corresponding element from affine coordinates to projective coordinates
◆ zero()
template<typename CurveParams >
|
inlinestaticconstexpr |
Get the point at infinity.
Member Data Documentation
◆ X
template<typename CurveParams >
field_value_type nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::short_weierstrass, coordinates::affine >::X |
◆ Y
template<typename CurveParams >
field_value_type nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::short_weierstrass, coordinates::affine >::Y |
The documentation for this struct was generated from the following file: