Crypto++ 8.7
Free C++ class library of cryptographic schemes
Public Member Functions | List of all members
EncodedPoint< Point > Class Template Referenceabstract

Abstract class for encoding and decoding ellicptic curve points. More...

#include <ecpoint.h>

Public Member Functions

virtual bool DecodePoint (Point &P, BufferedTransformation &bt, size_t len) const =0
 Decodes an elliptic curve point. More...
 
virtual bool DecodePoint (Point &P, const byte *encodedPoint, size_t len) const =0
 Decodes an elliptic curve point. More...
 
virtual bool VerifyPoint (const Point &P) const =0
 Verifies points on elliptic curve. More...
 
virtual unsigned int EncodedPointSize (bool compressed=false) const =0
 Determines encoded point size. More...
 
virtual void EncodePoint (byte *encodedPoint, const Point &P, bool compressed) const =0
 Encodes an elliptic curve point. More...
 
virtual void EncodePoint (BufferedTransformation &bt, const Point &P, bool compressed) const =0
 Encodes an elliptic curve point. More...
 
virtual Point BERDecodePoint (BufferedTransformation &bt) const =0
 BER Decodes an elliptic curve point. More...
 
virtual void DEREncodePoint (BufferedTransformation &bt, const Point &P, bool compressed) const =0
 DER Encodes an elliptic curve point. More...
 

Detailed Description

template<class Point>
class EncodedPoint< Point >

Abstract class for encoding and decoding ellicptic curve points.

Template Parameters
Pointellicptic curve point

EncodedPoint is an interface for encoding and decoding elliptic curve points. The template parameter Point should be a class like ECP or EC2N.

Since
Crypto++ 6.0

Definition at line 90 of file ecpoint.h.

Constructor & Destructor Documentation

◆ ~EncodedPoint()

template<class Point >
virtual EncodedPoint< Point >::~EncodedPoint ( )
inlinevirtual

Definition at line 93 of file ecpoint.h.

Member Function Documentation

◆ DecodePoint() [1/2]

template<class Point >
virtual bool EncodedPoint< Point >::DecodePoint ( Point &  P,
BufferedTransformation bt,
size_t  len 
) const
pure virtual

Decodes an elliptic curve point.

Parameters
Ppoint which is decoded
btsource BufferedTransformation
lennumber of bytes to read from the BufferedTransformation
Returns
true if a point was decoded, false otherwise

Implemented in EC2N, and ECP.

◆ DecodePoint() [2/2]

template<class Point >
virtual bool EncodedPoint< Point >::DecodePoint ( Point &  P,
const byte encodedPoint,
size_t  len 
) const
pure virtual

Decodes an elliptic curve point.

Parameters
Ppoint which is decoded
encodedPointbyte array with the encoded point
lenthe size of the array
Returns
true if a point was decoded, false otherwise

Implemented in EC2N, and ECP.

◆ VerifyPoint()

template<class Point >
virtual bool EncodedPoint< Point >::VerifyPoint ( const Point &  P) const
pure virtual

Verifies points on elliptic curve.

Parameters
Ppoint to verify
Returns
true if the point is valid, false otherwise

Implemented in EC2N, and ECP.

◆ EncodedPointSize()

template<class Point >
virtual unsigned int EncodedPoint< Point >::EncodedPointSize ( bool  compressed = false) const
pure virtual

Determines encoded point size.

Parameters
compressedflag indicating if the point is compressed
Returns
the minimum number of bytes required to encode the point

Implemented in EC2N, and ECP.

◆ EncodePoint() [1/2]

template<class Point >
virtual void EncodedPoint< Point >::EncodePoint ( byte encodedPoint,
const Point &  P,
bool  compressed 
) const
pure virtual

Encodes an elliptic curve point.

Parameters
Ppoint which is decoded
encodedPointbyte array for the encoded point
compressedflag indicating if the point is compressed

encodedPoint must be at least EncodedPointSize() in length

Implemented in EC2N, and ECP.

◆ EncodePoint() [2/2]

template<class Point >
virtual void EncodedPoint< Point >::EncodePoint ( BufferedTransformation bt,
const Point &  P,
bool  compressed 
) const
pure virtual

Encodes an elliptic curve point.

Parameters
bttarget BufferedTransformation
Ppoint which is encoded
compressedflag indicating if the point is compressed

Implemented in EC2N, and ECP.

◆ BERDecodePoint()

template<class Point >
virtual Point EncodedPoint< Point >::BERDecodePoint ( BufferedTransformation bt) const
pure virtual

BER Decodes an elliptic curve point.

Parameters
btsource BufferedTransformation
Returns
the decoded elliptic curve point

Implemented in EC2N, and ECP.

◆ DEREncodePoint()

template<class Point >
virtual void EncodedPoint< Point >::DEREncodePoint ( BufferedTransformation bt,
const Point &  P,
bool  compressed 
) const
pure virtual

DER Encodes an elliptic curve point.

Parameters
bttarget BufferedTransformation
Ppoint which is encoded
compressedflag indicating if the point is compressed

Implemented in EC2N, and ECP.


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