nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 > Struct Reference

A struct representing an elememnt from the group G2 of Edwards curve. More...

#include <element_g2.hpp>

+ Collaboration diagram for nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >:

Public Types

typedef policy_type::g1_field_type::value_type g1_field_type_value
 
typedef policy_type::g2_field_type::value_type g2_field_type_value
 
using group_type = edwards_g2< 183, forms::twisted_edwards, coordinates::inverted >
 
using policy_type = edwards_basic_policy< 183 >
 
using underlying_field_value_type = g2_field_type_value
 

Public Member Functions

constexpr element_edwards_g2 doubled () const
 
constexpr element_edwards_g2 ()
 
constexpr element_edwards_g2 (underlying_field_value_type in_X, underlying_field_value_type in_Y, underlying_field_value_type in_Z)
 
constexpr element_edwards_g2 (underlying_field_value_type X, underlying_field_value_type Y)
 
constexpr bool is_special () const
 
constexpr bool is_zero () const
 
constexpr element_edwards_g2 mixed_add (const element_edwards_g2 &other) const
 “Mixed addition” refers to the case Z2 known to be 1. More...
 
constexpr bool operator!= (const element_edwards_g2 &other) const
 
constexpr element_edwards_g2 operator+ (const element_edwards_g2 &other) const
 
constexpr element_edwards_g2 operator- () const
 
constexpr element_edwards_g2 operator- (const element_edwards_g2 &other) const
 
constexpr element_edwards_g2 operator= (const element_edwards_g2 &other)
 
constexpr bool operator== (const element_edwards_g2 &other) const
 
constexpr element_edwards_g2 to_affine () const
 
constexpr element_edwards_g2 to_projective () const
 

Static Public Member Functions

constexpr static underlying_field_value_type mul_by_a (const underlying_field_value_type &elt)
 
constexpr static underlying_field_value_type mul_by_d (const underlying_field_value_type &elt)
 
constexpr static element_edwards_g2 one ()
 Get the generator of group G2. More...
 
constexpr static element_edwards_g2 zero ()
 Get the point at infinity. More...
 

Public Attributes

underlying_field_value_type X
 
underlying_field_value_type Y
 
underlying_field_value_type Z
 

Static Public Attributes

constexpr static const g2_field_type_value twist
 

Detailed Description

A struct representing an elememnt from the group G2 of Edwards curve.

Member Typedef Documentation

◆ g1_field_type_value

typedef policy_type::g1_field_type::value_type nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::g1_field_type_value

◆ g2_field_type_value

typedef policy_type::g2_field_type::value_type nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::g2_field_type_value

◆ group_type

◆ policy_type

◆ underlying_field_value_type

Constructor & Destructor Documentation

◆ element_edwards_g2() [1/3]

Returns
the point at infinity by default

◆ element_edwards_g2() [2/3]

Returns
the selected point $(X:Y:Z)$ in the projective coordinates

◆ element_edwards_g2() [3/3]

Returns
the selected point $(X:Y:X*Y)$ in the inverted coordinates

Member Function Documentation

◆ doubled()

constexpr element_edwards_g2 nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::doubled ( ) const
inlineconstexpr
Returns
doubled element from group G2

◆ is_special()

constexpr bool nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::is_special ( ) const
inlineconstexpr
Returns
true if element from group G2 in affine coordinates

◆ is_zero()

constexpr bool nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::is_zero ( ) const
inlineconstexpr
Returns
true if element from group G2 is the point at infinity

◆ mixed_add()

constexpr element_edwards_g2 nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::mixed_add ( const element_edwards_g2< 183 > &  other) const
inlineconstexpr

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

Returns
addition of two elements from group G2

◆ mul_by_a()

constexpr static underlying_field_value_type nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::mul_by_a ( const underlying_field_value_type elt)
inlinestaticconstexpr

◆ mul_by_d()

constexpr static underlying_field_value_type nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::mul_by_d ( const underlying_field_value_type elt)
inlinestaticconstexpr

◆ one()

constexpr static element_edwards_g2 nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::one ( )
inlinestaticconstexpr

Get the generator of group G2.

◆ operator!=()

constexpr bool nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::operator!= ( const element_edwards_g2< 183 > &  other) const
inlineconstexpr

◆ operator+()

constexpr element_edwards_g2 nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::operator+ ( const element_edwards_g2< 183 > &  other) const
inlineconstexpr

◆ operator-() [1/2]

constexpr element_edwards_g2 nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::operator- ( ) const
inlineconstexpr

◆ operator-() [2/2]

constexpr element_edwards_g2 nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::operator- ( const element_edwards_g2< 183 > &  other) const
inlineconstexpr

◆ operator=()

constexpr element_edwards_g2 nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::operator= ( const element_edwards_g2< 183 > &  other)
inlineconstexpr

◆ operator==()

constexpr bool nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::operator== ( const element_edwards_g2< 183 > &  other) const
inlineconstexpr

◆ to_affine()

constexpr element_edwards_g2 nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::to_affine ( ) const
inlineconstexpr
Returns
return the corresponding element from inverted coordinates to affine coordinates

◆ to_projective()

constexpr element_edwards_g2 nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::to_projective ( ) const
inlineconstexpr
Returns
return the corresponding element from projective coordinates to affine coordinates

◆ zero()

constexpr static element_edwards_g2 nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::zero ( )
inlinestaticconstexpr

Get the point at infinity.

Member Data Documentation

◆ twist

constexpr static const g2_field_type_value nil::crypto3::algebra::curves::detail::element_edwards_g2< 183 >::twist
staticconstexpr
Initial value:
g2_field_type_value::underlying_type::zero(), g2_field_type_value::underlying_type::one(),
g2_field_type_value::underlying_type::zero())
policy_type::g2_field_type::value_type g2_field_type_value
Definition: algebra/include/nil/crypto3/algebra/curves/detail/edwards/element_g2.hpp:61

◆ X

◆ Y

◆ Z


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