scclib
Stable Cloud Computing C++ Library
Public Member Functions | Static Public Member Functions | Friends | List of all members
scc::crypto::EccGfpPoint Class Reference

Public Member Functions

 EccGfpPoint ()
 Construct an invalid point.
 
 EccGfpPoint (const EccGfp &curve)
 Construct a point on the elliptic curve. More...
 
 EccGfpPoint (const EccGfp::Type &curve_type)
 
void reset ()
 Reset the point to invalid.
 
void reset (const EccGfp &)
 Reset the point to fall on the elliptic curve. More...
 
void set (const scc::crypto::Bignum &, const scc::crypto::Bignum &)
 Set point. More...
 
void set (const scc::crypto::Bignum &x, const scc::crypto::Bignum &y, EccGfp &curve)
 Set point to a new curve. More...
 
void set (const void *, int)
 Set the point from a data string. More...
 
void set (const std::vector< char > &v)
 
void set (const void *loc, int len, EccGfp &curve)
 Set the point from a data string on a new curve. More...
 
void set (const std::vector< char > &v, EccGfp &curve)
 
void set ()
 Set point to infinity. More...
 
void get (scc::crypto::Bignum &, scc::crypto::Bignum &) const
 Get the coordinates. More...
 
void get (std::vector< char > &) const
 Get the coordinates to a data string. More...
 
bool infinite (const EccGfp &curve) const
 
bool infinite () const
 
bool valid (const EccGfp &curve) const
 
bool valid () const
 
bool equal (const EccGfpPoint &) const
 Test for equality with a second point.
 
bool operator== (const EccGfpPoint &b) const
 
bool operator!= (const EccGfpPoint &b) const
 

Static Public Member Functions

static bool infinite (const EccGfpPoint &, const EccGfp &)
 Test the point for infinity on a curve. More...
 
static bool infinite (const EccGfpPoint &)
 Test the point for infinity. More...
 
static bool valid (const EccGfpPoint &, const EccGfp &)
 Verify the point on a curve. More...
 
static bool valid (const EccGfpPoint &)
 Verify the point. More...
 

Friends

class EccGfp
 
class EcdsaSignature
 

Detailed Description

Definition at line 196 of file ecc.h.

Constructor & Destructor Documentation

◆ EccGfpPoint()

scc::crypto::EccGfpPoint::EccGfpPoint ( const EccGfp curve)
inline

Construct a point on the elliptic curve.

Point is set to infinity.

Definition at line 207 of file ecc.h.

Member Function Documentation

◆ get() [1/2]

void scc::crypto::EccGfpPoint::get ( scc::crypto::Bignum ,
scc::crypto::Bignum  
) const

Get the coordinates.

Parameters
xX coordinate
yY coordinate

Throws an exception if the point is invalid.

◆ get() [2/2]

void scc::crypto::EccGfpPoint::get ( std::vector< char > &  ) const

Get the coordinates to a data string.

String will be reset to the coordinate data length.

Throws an exception if the point is invalid.

◆ infinite() [1/2]

static bool scc::crypto::EccGfpPoint::infinite ( const EccGfpPoint )
static

Test the point for infinity.

Failure means the point is invalid, or is not the infinity point.

◆ infinite() [2/2]

static bool scc::crypto::EccGfpPoint::infinite ( const EccGfpPoint ,
const EccGfp  
)
static

Test the point for infinity on a curve.

Failure means the point is invalid, or is not the infinity point.

◆ reset()

void scc::crypto::EccGfpPoint::reset ( const EccGfp )

Reset the point to fall on the elliptic curve.

Point will be initially set to infinity.

◆ set() [1/5]

void scc::crypto::EccGfpPoint::set ( )

Set point to infinity.

Throws exception if point is invalid.

◆ set() [2/5]

void scc::crypto::EccGfpPoint::set ( const scc::crypto::Bignum ,
const scc::crypto::Bignum  
)

Set point.

Parameters
xX coordinate
yY coordinate

Throws an exception if the point is invalid or coordinates are not on the curve.

◆ set() [3/5]

void scc::crypto::EccGfpPoint::set ( const scc::crypto::Bignum x,
const scc::crypto::Bignum y,
EccGfp curve 
)
inline

Set point to a new curve.

Throws an exception if the coordinates are not on the curve.

Definition at line 239 of file ecc.h.

◆ set() [4/5]

void scc::crypto::EccGfpPoint::set ( const void *  ,
int   
)

Set the point from a data string.

Throws an exception if the point or input data is invalid.

◆ set() [5/5]

void scc::crypto::EccGfpPoint::set ( const void *  loc,
int  len,
EccGfp curve 
)
inline

Set the point from a data string on a new curve.

Throws an exception if the point or input data is invalid.

Definition at line 258 of file ecc.h.

◆ valid() [1/2]

static bool scc::crypto::EccGfpPoint::valid ( const EccGfpPoint )
static

Verify the point.

Failure means the point is invalid, infinite or does not fall on the curve.

◆ valid() [2/2]

static bool scc::crypto::EccGfpPoint::valid ( const EccGfpPoint ,
const EccGfp  
)
static

Verify the point on a curve.

Failure means the point is invalid, infinite or does not fall on the curve.


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