UltrafastSecp256k1 3.50.0
Ultra high-performance secp256k1 elliptic curve cryptography library
Loading...
Searching...
No Matches
secp256k1::fast::Point Class Reference

#include <point.hpp>

Public Member Functions

 Point ()
 
FieldElement x () const
 
FieldElement y () const
 
bool is_infinity () const noexcept
 
bool is_gen () const noexcept
 
std::array< uint8_t, 16 > x_first_half () const
 
std::array< uint8_t, 16 > x_second_half () const
 
const FieldElementX () const noexcept
 
const FieldElementY () const noexcept
 
const FieldElementz () const noexcept
 
Point add (const Point &other) const
 
Point dbl () const
 
Point scalar_mul (const Scalar &scalar) const
 
Point scalar_mul_precomputed_k (const Scalar &k) const
 
Point scalar_mul_predecomposed (const Scalar &k1, const Scalar &k2, bool neg1, bool neg2) const
 
Point scalar_mul_precomputed_wnaf (const std::vector< int32_t > &wnaf1, const std::vector< int32_t > &wnaf2, bool neg1, bool neg2) const
 
Point scalar_mul_precomputed_wnaf (const int32_t *wnaf1, std::size_t len1, const int32_t *wnaf2, std::size_t len2, bool neg1, bool neg2) const
 
Point scalar_mul_with_plan (const KPlan &plan) const
 
Point negate () const
 
Point next () const
 
Point prev () const
 
void next_inplace ()
 
void prev_inplace ()
 
void add_inplace (const Point &other)
 
void sub_inplace (const Point &other)
 
void add_mixed_inplace (const FieldElement &ax, const FieldElement &ay)
 
void sub_mixed_inplace (const FieldElement &ax, const FieldElement &ay)
 
void dbl_inplace ()
 
void negate_inplace ()
 
void add_affine_constant_inplace (const FieldElement &ax, const FieldElement &ay)
 
bool has_even_y () const
 
std::pair< std::array< uint8_t, 32 >, bool > x_bytes_and_parity () const
 
std::array< uint8_t, 32 > x_only_bytes () const
 
void normalize ()
 
bool is_normalized () const noexcept
 
std::array< std::uint8_t, 33 > to_compressed () const
 
std::array< std::uint8_t, 65 > to_uncompressed () const
 
const FieldElementx_raw () const noexcept
 
const FieldElementy_raw () const noexcept
 
const FieldElementz_raw () const noexcept
 

Static Public Member Functions

static Point generator ()
 
static Point infinity ()
 
static Point from_affine (const FieldElement &x, const FieldElement &y)
 
static Point from_hex (const std::string &x_hex, const std::string &y_hex)
 
static void batch_normalize (const Point *points, size_t n, FieldElement *out_x, FieldElement *out_y)
 
static void batch_to_compressed (const Point *points, size_t n, std::array< uint8_t, 33 > *out)
 
static void batch_x_only_bytes (const Point *points, size_t n, std::array< uint8_t, 32 > *out)
 
static Point dual_scalar_mul_gen_point (const Scalar &a, const Scalar &b, const Point &P)
 
static Point from_jacobian_coords (const FieldElement &x, const FieldElement &y, const FieldElement &z, bool infinity)
 

Detailed Description

Definition at line 83 of file point.hpp.

Constructor & Destructor Documentation

◆ Point()

secp256k1::fast::Point::Point ( )

Member Function Documentation

◆ add()

Point secp256k1::fast::Point::add ( const Point other) const

Referenced by ufsecp_pubkey_tweak_add().

◆ add_affine_constant_inplace()

void secp256k1::fast::Point::add_affine_constant_inplace ( const FieldElement ax,
const FieldElement ay 
)

◆ add_inplace()

void secp256k1::fast::Point::add_inplace ( const Point other)

◆ add_mixed_inplace()

void secp256k1::fast::Point::add_mixed_inplace ( const FieldElement ax,
const FieldElement ay 
)

◆ batch_normalize()

static void secp256k1::fast::Point::batch_normalize ( const Point points,
size_t  n,
FieldElement out_x,
FieldElement out_y 
)
static

◆ batch_to_compressed()

static void secp256k1::fast::Point::batch_to_compressed ( const Point points,
size_t  n,
std::array< uint8_t, 33 > *  out 
)
static

◆ batch_x_only_bytes()

static void secp256k1::fast::Point::batch_x_only_bytes ( const Point points,
size_t  n,
std::array< uint8_t, 32 > *  out 
)
static

◆ dbl()

Point secp256k1::fast::Point::dbl ( ) const

◆ dbl_inplace()

void secp256k1::fast::Point::dbl_inplace ( )

◆ dual_scalar_mul_gen_point()

static Point secp256k1::fast::Point::dual_scalar_mul_gen_point ( const Scalar a,
const Scalar b,
const Point P 
)
static

◆ from_affine()

static Point secp256k1::fast::Point::from_affine ( const FieldElement x,
const FieldElement y 
)
static

◆ from_hex()

static Point secp256k1::fast::Point::from_hex ( const std::string &  x_hex,
const std::string &  y_hex 
)
static

◆ from_jacobian_coords()

static Point secp256k1::fast::Point::from_jacobian_coords ( const FieldElement x,
const FieldElement y,
const FieldElement z,
bool  infinity 
)
static

◆ generator()

static Point secp256k1::fast::Point::generator ( )
static

◆ has_even_y()

bool secp256k1::fast::Point::has_even_y ( ) const

◆ infinity()

static Point secp256k1::fast::Point::infinity ( )
static

Referenced by point_from_compressed().

◆ is_gen()

bool secp256k1::fast::Point::is_gen ( ) const
inlinenoexcept

Definition at line 98 of file point.hpp.

◆ is_infinity()

◆ is_normalized()

bool secp256k1::fast::Point::is_normalized ( ) const
inlinenoexcept

Definition at line 210 of file point.hpp.

◆ negate()

Point secp256k1::fast::Point::negate ( ) const

◆ negate_inplace()

void secp256k1::fast::Point::negate_inplace ( )

◆ next()

Point secp256k1::fast::Point::next ( ) const

◆ next_inplace()

void secp256k1::fast::Point::next_inplace ( )

◆ normalize()

void secp256k1::fast::Point::normalize ( )

◆ prev()

Point secp256k1::fast::Point::prev ( ) const

◆ prev_inplace()

void secp256k1::fast::Point::prev_inplace ( )

◆ scalar_mul()

Point secp256k1::fast::Point::scalar_mul ( const Scalar scalar) const

◆ scalar_mul_precomputed_k()

Point secp256k1::fast::Point::scalar_mul_precomputed_k ( const Scalar k) const

◆ scalar_mul_precomputed_wnaf() [1/2]

Point secp256k1::fast::Point::scalar_mul_precomputed_wnaf ( const int32_t *  wnaf1,
std::size_t  len1,
const int32_t *  wnaf2,
std::size_t  len2,
bool  neg1,
bool  neg2 
) const

◆ scalar_mul_precomputed_wnaf() [2/2]

Point secp256k1::fast::Point::scalar_mul_precomputed_wnaf ( const std::vector< int32_t > &  wnaf1,
const std::vector< int32_t > &  wnaf2,
bool  neg1,
bool  neg2 
) const

◆ scalar_mul_predecomposed()

Point secp256k1::fast::Point::scalar_mul_predecomposed ( const Scalar k1,
const Scalar k2,
bool  neg1,
bool  neg2 
) const

◆ scalar_mul_with_plan()

Point secp256k1::fast::Point::scalar_mul_with_plan ( const KPlan plan) const

◆ sub_inplace()

void secp256k1::fast::Point::sub_inplace ( const Point other)

◆ sub_mixed_inplace()

void secp256k1::fast::Point::sub_mixed_inplace ( const FieldElement ax,
const FieldElement ay 
)

◆ to_compressed()

std::array< std::uint8_t, 33 > secp256k1::fast::Point::to_compressed ( ) const

Referenced by point_to_compressed().

◆ to_uncompressed()

std::array< std::uint8_t, 65 > secp256k1::fast::Point::to_uncompressed ( ) const

◆ x()

FieldElement secp256k1::fast::Point::x ( ) const

◆ X()

const FieldElement & secp256k1::fast::Point::X ( ) const
inlinenoexcept

Definition at line 116 of file point.hpp.

◆ x_bytes_and_parity()

std::pair< std::array< uint8_t, 32 >, bool > secp256k1::fast::Point::x_bytes_and_parity ( ) const

◆ x_first_half()

std::array< uint8_t, 16 > secp256k1::fast::Point::x_first_half ( ) const

◆ x_only_bytes()

std::array< uint8_t, 32 > secp256k1::fast::Point::x_only_bytes ( ) const

◆ x_raw()

const FieldElement & secp256k1::fast::Point::x_raw ( ) const
inlinenoexcept

Definition at line 224 of file point.hpp.

◆ x_second_half()

std::array< uint8_t, 16 > secp256k1::fast::Point::x_second_half ( ) const

◆ y()

FieldElement secp256k1::fast::Point::y ( ) const

◆ Y()

const FieldElement & secp256k1::fast::Point::Y ( ) const
inlinenoexcept

Definition at line 117 of file point.hpp.

◆ y_raw()

const FieldElement & secp256k1::fast::Point::y_raw ( ) const
inlinenoexcept

Definition at line 225 of file point.hpp.

◆ z()

const FieldElement & secp256k1::fast::Point::z ( ) const
inlinenoexcept

Definition at line 118 of file point.hpp.

◆ z_raw()

const FieldElement & secp256k1::fast::Point::z_raw ( ) const
inlinenoexcept

Definition at line 226 of file point.hpp.


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