![]() |
Gray C++ Libraries
0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
|
#include <cECPGroupParams.h>
Public Member Functions | |
| cECPPoint () | |
| ~cECPPoint () | |
| void | SetEmptyPoint () |
| bool | IsEqualPoint (const cECPPoint &ref) const |
| bool | isZeroPoint () const |
| bool | IsMatchParams (const cECPPoint &ref) const |
| void | SetPointNormal () |
| void | SetCopyPoint (const cECPPoint &Q) |
| bool | SetPointFromStr (RADIX_t radix, const char *x, const char *y) |
| HRESULT | WritePointBinary (BYTE *pBuf, size_t nSizeBuffer, size_t nSizeP, bool bCompressed) const |
| HRESULT | WritePointLen (BYTE *pBuf, size_t nSizeBuffer, size_t nSizeP, bool bCompressed) const |
| HRESULT | ReadPointBinary (size_t nSizeP, const BYTE *pBuf, size_t nSizeBuffer) |
| HRESULT | ReadPointLen (size_t nSizeP, const BYTE *pBuf, size_t nSizeBuffer) |
| HRESULT | ReadPointASN (size_t nSizeP, cASNReader &r0) |
Public Attributes | |
| cBigInteger | m_X |
| the point's X coordinate More... | |
| cBigInteger | m_Y |
| the point's Y coordinate More... | |
| cBigInteger | m_Z |
| the point's Z coordinate. Z == 0 or Z == 1 More... | |
ECP point structure for Jacobian coordinates.
|
inline |
|
inline |
|
inline |
| bool GrayLib::cECPPoint::IsMatchParams | ( | const cECPPoint & | ref | ) | const |
For Y we may only know the parity bit, so compare only that
|
inline |
is a point is zero?
| HRESULT GrayLib::cECPPoint::ReadPointASN | ( | size_t | nSizeP, |
| cASNReader & | r0 | ||
| ) |
| HRESULT GrayLib::cECPPoint::ReadPointBinary | ( | size_t | nSizeP, |
| const BYTE * | pBuf, | ||
| size_t | nSizeBuffer | ||
| ) |
Import a point from unsigned binary data (SEC1 2.3.4) http://www.secg.org/sec1-v2.pdf
| HRESULT GrayLib::cECPPoint::ReadPointLen | ( | size_t | nSizeP, |
| const BYTE * | pBuf, | ||
| size_t | nSizeBuffer | ||
| ) |
Import a point from a TLS ECPoint record (RFC 4492)
| void GrayLib::cECPPoint::SetCopyPoint | ( | const cECPPoint & | Q | ) |
Copy the contents of point Q
|
inline |
| bool GrayLib::cECPPoint::SetPointFromStr | ( | RADIX_t | radix, |
| const char * | x, | ||
| const char * | y | ||
| ) |
Import a non-zero point from two ASCII strings
| void GrayLib::cECPPoint::SetPointNormal | ( | ) |
Set point to zero
| HRESULT GrayLib::cECPPoint::WritePointBinary | ( | BYTE * | pBuf, |
| size_t | nSizeBuffer, | ||
| size_t | nSizeP, | ||
| bool | bCompressed | ||
| ) | const |
Export a point into unsigned binary data (SEC1 2.3.3)
| HRESULT GrayLib::cECPPoint::WritePointLen | ( | BYTE * | pBuf, |
| size_t | nSizeBuffer, | ||
| size_t | nSizeP, | ||
| bool | bCompressed | ||
| ) | const |
Export a point as a TLS ECPoint record (RFC 4492)
struct {
opaque point <1..2^8-1>;
} ECPoint;
buffer length must be at least one, for our length byte | cBigInteger GrayLib::cECPPoint::m_X |
the point's X coordinate
| cBigInteger GrayLib::cECPPoint::m_Y |
the point's Y coordinate
| cBigInteger GrayLib::cECPPoint::m_Z |
the point's Z coordinate. Z == 0 or Z == 1