nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 > Struct Template Reference

A struct representing an element from the group G1 of twisted Edwards curve of extended coordinates with a=-1 coordinates representation. Description: https://hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html. More...

#include <element_g1.hpp>

+ Collaboration diagram for nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >:

Public Types

using coordinates = coordinates::extended_with_a_minus_1
 
using field_type = typename params_type::field_type
 
using form = forms::twisted_edwards
 
using group_type = typename params_type::template group_type< coordinates >
 
using params_type = CurveParams
 

Public Member Functions

constexpr curve_element ()
 
constexpr curve_element (field_value_type X, field_value_type Y, field_value_type T, field_value_type Z)
 
constexpr curve_element doubled () const
 
constexpr bool is_well_formed () const
 
constexpr bool is_zero () const
 
curve_element mixed_add (const curve_element &other) const
 “Mixed addition” refers to the case Z2 known to be 1. More...
 
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, curves::coordinates::affineto_affine () 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 T
 
field_value_type X
 
field_value_type Y
 
field_value_type Z
 

Detailed Description

template<typename CurveParams>
struct nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >

A struct representing an element from the group G1 of twisted Edwards curve of extended coordinates with a=-1 coordinates representation. Description: https://hyperelliptic.org/EFD/g1p/auto-twisted-extended-1.html.

Member Typedef Documentation

◆ coordinates

template<typename CurveParams >
using nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::coordinates = coordinates::extended_with_a_minus_1

◆ field_type

template<typename CurveParams >
using nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::field_type = typename params_type::field_type

◆ form

template<typename CurveParams >
using nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::form = forms::twisted_edwards

◆ group_type

template<typename CurveParams >
using nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::group_type = typename params_type::template group_type<coordinates>

◆ params_type

template<typename CurveParams >
using nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::params_type = CurveParams

Constructor & Destructor Documentation

◆ curve_element() [1/2]

template<typename CurveParams >
constexpr nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::curve_element ( )
inlineconstexpr
Returns
the point at infinity by default

◆ curve_element() [2/2]

template<typename CurveParams >
constexpr nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::curve_element ( field_value_type  X,
field_value_type  Y,
field_value_type  T,
field_value_type  Z 
)
inlineconstexpr
Returns
the selected point (X:Y:Z)

Member Function Documentation

◆ doubled()

template<typename CurveParams >
constexpr curve_element nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::doubled ( ) const
inlineconstexpr
Returns
doubled element from group G1

◆ is_well_formed()

template<typename CurveParams >
constexpr bool nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::is_well_formed ( ) const
inlineconstexpr
Returns
true if element from group G1 lies on the elliptic curve

◆ is_zero()

template<typename CurveParams >
constexpr bool nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::is_zero ( ) const
inlineconstexpr
Returns
true if element from group G1 is the point at infinity

◆ mixed_add()

template<typename CurveParams >
curve_element nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::mixed_add ( const curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 > &  other) const
inline

“Mixed addition” refers to the case Z2 known to be 1.

Returns
addition of two elements from group G1

◆ one()

template<typename CurveParams >
constexpr static curve_element nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::one ( )
inlinestaticconstexpr

Get the generator of group G1.

◆ operator!=()

template<typename CurveParams >
constexpr bool nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::operator!= ( const curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 > &  other) const
inlineconstexpr

◆ operator+()

template<typename CurveParams >
constexpr curve_element nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::operator+ ( const curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 > &  other) const
inlineconstexpr

◆ operator-() [1/2]

template<typename CurveParams >
constexpr curve_element nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::operator- ( ) const
inlineconstexpr

◆ operator-() [2/2]

template<typename CurveParams >
constexpr curve_element nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::operator- ( const curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 > &  other) const
inlineconstexpr

◆ operator=()

template<typename CurveParams >
constexpr curve_element nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::operator= ( const curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 > &  other)
inlineconstexpr

◆ operator==()

template<typename CurveParams >
constexpr bool nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::operator== ( const curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 > &  other) const
inlineconstexpr

◆ to_affine()

template<typename CurveParams >
constexpr curve_element<params_type, form, curves::coordinates::affine> nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::to_affine ( ) const
inlineconstexpr
Returns
return the corresponding element from extended coordinates with a=-1 coordinates to affine coordinates

◆ zero()

template<typename CurveParams >
constexpr static curve_element nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::zero ( )
inlinestaticconstexpr

Get the point at infinity.

Member Data Documentation

◆ T

template<typename CurveParams >
field_value_type nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::T

◆ X

template<typename CurveParams >
field_value_type nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::X

◆ Y

template<typename CurveParams >
field_value_type nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::Y

◆ Z

template<typename CurveParams >
field_value_type nil::crypto3::algebra::curves::detail::curve_element< CurveParams, forms::twisted_edwards, coordinates::extended_with_a_minus_1 >::Z

The documentation for this struct was generated from the following file: