Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

ECParameters Class Template Reference

Elliptic Curve Parameters. More...

#include <eccrypto.h>

Inheritance diagram for ECParameters:

PK_Precomputation ECDHC ECMQVC ECPublicKey ECDigestVerifier ECEncryptor ECPrivateKey ECDecryptor ECDigestSigner List of all members.

Public Types

typedef EC::Point Point

Public Methods

 ECParameters ()
 ECParameters (const OID &oid)
 ECParameters (const EC &ec,const Point &G,const Integer &n)
 ECParameters (const EC &ec,const Point &G,const Integer &n,const Integer &k)
 ECParameters (BufferedTransformation &bt)
void LoadRecommendedParameters (const OID &oid)
void BERDecode (BufferedTransformation &bt)
void DEREncode (BufferedTransformation &bt)const
bool ValidateParameters (RandomNumberGenerator &rng)const
void Precompute (unsigned int precomputationStorage=16)
void LoadPrecomputation (BufferedTransformation &storedPrecomputation)
 retrieve previously saved precomputation. More...

void SavePrecomputation (BufferedTransformation &storedPrecomputation)const
 save precomputation for later use. More...

void SetPointCompression (bool compress)
bool GetPointCompression ()const
void SetEncodeAsOID (bool encodeAsOID)
bool GetEncodeAsOID ()const
const EC& GetCurve ()const
const Point& GetBasePoint ()const
const IntegerGetBasePointOrder ()const
const bool CofactorPresent ()const
const IntegerGetCofactor ()const

Static Public Methods

OID GetNextRecommendedParametersOID (const OID &oid)

Protected Methods

unsigned int EncodedPointSize ()const
void EncodePoint (byte *encodedPoint,const Point &P)const
unsigned int FieldElementLength ()const
unsigned int ExponentLength ()const
unsigned int ExponentBitLength ()const

Protected Attributes

OID m_oid
value_ptr<EC> m_ec
Point m_G
EcPrecomputation<EC> m_Gpc
Integer m_n
bool m_cofactorPresent
bool m_compress
bool m_encodeAsOID
Integer m_k

Detailed Description

template<class EC> class ECParameters

Elliptic Curve Parameters.

This class corresponds to the ASN.1 sequence of the same name in ANSI X9.62 (also SEC 1).

Definition at line 51 of file eccrypto.h.


Member Typedef Documentation

template<class EC>
typedef EC::Point ECParameters<EC>::Point
 

Definition at line 54 of file eccrypto.h.


Constructor & Destructor Documentation

template<class EC>
ECParameters<EC>::ECParameters<EC> ( ) [inline]
 

Definition at line 56 of file eccrypto.h.

template<class EC>
ECParameters<EC>::ECParameters<EC> ( const OID & oid ) [inline]
 

Definition at line 57 of file eccrypto.h.

template<class EC>
ECParameters<EC>::ECParameters<EC> ( const EC & ec,
const Point & G,
const Integer & n ) [inline]
 

Definition at line 59 of file eccrypto.h.

template<class EC>
ECParameters<EC>::ECParameters<EC> ( const EC & ec,
const Point & G,
const Integer & n,
const Integer & k ) [inline]
 

Definition at line 61 of file eccrypto.h.

template<class EC>
ECParameters<EC>::ECParameters<EC> ( BufferedTransformation & bt ) [inline]
 

Definition at line 63 of file eccrypto.h.


Member Function Documentation

template<class EC>
void ECParameters< EC >::BERDecode ( BufferedTransformation & bt )
 

Definition at line 370 of file eccrypto.cpp.

template<class EC>
const bool ECParameters<EC>::CofactorPresent ( ) const [inline]
 

Definition at line 88 of file eccrypto.h.

template<class EC>
void ECParameters< EC >::DEREncode ( BufferedTransformation & bt ) const
 

Definition at line 393 of file eccrypto.cpp.

template<class EC>
void ECParameters<EC>::EncodePoint ( byte * encodedPoint,
const Point & P ) const [inline, protected]
 

Definition at line 93 of file eccrypto.h.

template<class EC>
unsigned int ECParameters<EC>::EncodedPointSize ( ) const [inline, protected]
 

Definition at line 92 of file eccrypto.h.

template<class EC>
unsigned int ECParameters<EC>::ExponentBitLength ( ) const [inline, protected]
 

Definition at line 96 of file eccrypto.h.

template<class EC>
unsigned int ECParameters<EC>::ExponentLength ( ) const [inline, protected]
 

Definition at line 95 of file eccrypto.h.

template<class EC>
unsigned int ECParameters<EC>::FieldElementLength ( ) const [inline, protected]
 

Definition at line 94 of file eccrypto.h.

template<class EC>
const Point & ECParameters<EC>::GetBasePoint ( ) const [inline]
 

Definition at line 86 of file eccrypto.h.

template<class EC>
const Integer & ECParameters<EC>::GetBasePointOrder ( ) const [inline]
 

Definition at line 87 of file eccrypto.h.

template<class EC>
const Integer & ECParameters<EC>::GetCofactor ( ) const [inline]
 

Definition at line 89 of file eccrypto.h.

template<class EC>
const EC & ECParameters<EC>::GetCurve ( ) const [inline]
 

Definition at line 85 of file eccrypto.h.

template<class EC>
bool ECParameters<EC>::GetEncodeAsOID ( ) const [inline]
 

Definition at line 83 of file eccrypto.h.

template<class EC>
OID ECParameters< EC >::GetNextRecommendedParametersOID ( const OID & oid ) [static]
 

Definition at line 336 of file eccrypto.cpp.

template<class EC>
bool ECParameters<EC>::GetPointCompression ( ) const [inline]
 

Definition at line 80 of file eccrypto.h.

template<class EC>
void ECParameters< EC >::LoadPrecomputation ( BufferedTransformation & bt ) [virtual]
 

retrieve previously saved precomputation.

Reimplemented from PK_Precomputation.

Reimplemented in ECPublicKey.

Definition at line 426 of file eccrypto.cpp.

template<class EC>
void ECParameters< EC >::LoadRecommendedParameters ( const OID & oid )
 

Definition at line 347 of file eccrypto.cpp.

template<class EC>
void ECParameters< EC >::Precompute ( unsigned int precomputationStorage = 16 ) [virtual]
 

The exact semantics of Precompute() is varies, but typically it means calculate a table of n objects that can be used later to speed up computation.

Reimplemented from PK_Precomputation.

Reimplemented in ECPublicKey.

Definition at line 420 of file eccrypto.cpp.

template<class EC>
void ECParameters< EC >::SavePrecomputation ( BufferedTransformation & bt ) const [virtual]
 

save precomputation for later use.

Reimplemented from PK_Precomputation.

Reimplemented in ECPublicKey.

Definition at line 432 of file eccrypto.cpp.

template<class EC>
void ECParameters<EC>::SetEncodeAsOID ( bool encodeAsOID ) [inline]
 

Definition at line 82 of file eccrypto.h.

template<class EC>
void ECParameters<EC>::SetPointCompression ( bool compress ) [inline]
 

Definition at line 79 of file eccrypto.h.

template<class EC>
bool ECParameters< EC >::ValidateParameters ( RandomNumberGenerator & rng ) const
 

Definition at line 410 of file eccrypto.cpp.


Member Data Documentation

template<class EC>
Point ECParameters<EC>::m_G [protected]
 

Definition at line 100 of file eccrypto.h.

template<class EC>
EcPrecomputation< EC > ECParameters<EC>::m_Gpc [protected]
 

Definition at line 101 of file eccrypto.h.

template<class EC>
bool ECParameters<EC>::m_cofactorPresent [protected]
 

Definition at line 103 of file eccrypto.h.

template<class EC>
bool ECParameters<EC>::m_compress [protected]
 

Definition at line 103 of file eccrypto.h.

template<class EC>
value_ptr< EC > ECParameters<EC>::m_ec [protected]
 

Definition at line 99 of file eccrypto.h.

template<class EC>
bool ECParameters<EC>::m_encodeAsOID [protected]
 

Definition at line 103 of file eccrypto.h.

template<class EC>
Integer ECParameters<EC>::m_k [protected]
 

Definition at line 104 of file eccrypto.h.

template<class EC>
Integer ECParameters<EC>::m_n [protected]
 

Definition at line 102 of file eccrypto.h.

template<class EC>
OID ECParameters<EC>::m_oid [protected]
 

Definition at line 98 of file eccrypto.h.


The documentation for this class was generated from the following files:
Generated at Mon Jan 15 01:16:47 2001 for Crypto++ by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000