Crypto++  5.6.4
Free C++ class library of cryptographic schemes
Public Types | Public Member Functions | List of all members
EC2N Class Reference

Elliptic Curve over GF(2^n) More...

+ Inheritance diagram for EC2N:

Public Types

typedef GF2NP Field
 
typedef Field::Element FieldElement
 
typedef EC2NPoint Point
 
- Public Types inherited from AbstractGroup< EC2NPoint >
typedef EC2NPoint Element
 

Public Member Functions

 EC2N (const Field &field, const Field::Element &a, const Field::Element &b)
 
 EC2N (BufferedTransformation &bt)
 
void DEREncode (BufferedTransformation &bt) const
 
bool Equal (const Point &P, const Point &Q) const
 Compare two elements for equality. More...
 
const PointIdentity () const
 Provides the Identity element. More...
 
const PointInverse (const Point &P) const
 Inverts the element in the group. More...
 
bool InversionIsFast () const
 Determine if inversion is fast. More...
 
const PointAdd (const Point &P, const Point &Q) const
 Adds elements in the group. More...
 
const PointDouble (const Point &P) const
 Doubles an element in the group. More...
 
Point Multiply (const Integer &k, const Point &P) const
 
Point CascadeMultiply (const Integer &k1, const Point &P, const Integer &k2, const Point &Q) const
 
bool ValidateParameters (RandomNumberGenerator &rng, unsigned int level=3) const
 
bool VerifyPoint (const Point &P) const
 
unsigned int EncodedPointSize (bool compressed=false) const
 
bool DecodePoint (Point &P, BufferedTransformation &bt, size_t len) const
 
bool DecodePoint (Point &P, const byte *encodedPoint, size_t len) const
 
void EncodePoint (byte *encodedPoint, const Point &P, bool compressed) const
 
void EncodePoint (BufferedTransformation &bt, const Point &P, bool compressed) const
 
Point BERDecodePoint (BufferedTransformation &bt) const
 
void DEREncodePoint (BufferedTransformation &bt, const Point &P, bool compressed) const
 
Integer FieldSize () const
 
const FieldGetField () const
 
const FieldElement & GetA () const
 
const FieldElement & GetB () const
 
bool operator== (const EC2N &rhs) const
 
- Public Member Functions inherited from AbstractGroup< EC2NPoint >
virtual const ElementSubtract (const Element &a, const Element &b) const
 Subtracts elements in the group. More...
 
virtual ElementAccumulate (Element &a, const Element &b) const
 TODO. More...
 
virtual ElementReduce (Element &a, const Element &b) const
 Reduces an element in the congruence class. More...
 
virtual Element ScalarMultiply (const Element &a, const Integer &e) const
 Performs a scalar multiplication. More...
 
virtual Element CascadeScalarMultiply (const Element &x, const Integer &e1, const Element &y, const Integer &e2) const
 TODO. More...
 
virtual void SimultaneousMultiply (Element *results, const Element &base, const Integer *exponents, unsigned int exponentsCount) const
 Multiplies a base to multiple exponents in a group. More...
 

Detailed Description

Elliptic Curve over GF(2^n)

Definition at line 44 of file ec2n.h.

Member Function Documentation

bool EC2N::Equal ( const Point a,
const Point b 
) const
virtual

Compare two elements for equality.

Parameters
afirst element
bsecond element
Returns
true if the elements are equal, false otherwise

Equal() tests the elements for equality using a==b

Implements AbstractGroup< EC2NPoint >.

Definition at line 164 of file ec2n.cpp.

const EC2N::Point & EC2N::Identity ( ) const
virtual

Provides the Identity element.

Returns
the Identity element

Implements AbstractGroup< EC2NPoint >.

Definition at line 178 of file ec2n.cpp.

const EC2N::Point & EC2N::Inverse ( const Point a) const
virtual

Inverts the element in the group.

Parameters
afirst element
Returns
the inverse of the element

Implements AbstractGroup< EC2NPoint >.

Definition at line 183 of file ec2n.cpp.

bool EC2N::InversionIsFast ( ) const
inlinevirtual

Determine if inversion is fast.

Returns
true if inversion is fast, false otherwise

Reimplemented from AbstractGroup< EC2NPoint >.

Definition at line 64 of file ec2n.h.

const EC2N::Point & EC2N::Add ( const Point a,
const Point b 
) const
virtual

Adds elements in the group.

Parameters
afirst element
bsecond element
Returns
the sum of a and b

Implements AbstractGroup< EC2NPoint >.

Definition at line 196 of file ec2n.cpp.

const EC2N::Point & EC2N::Double ( const Point a) const
virtual

Doubles an element in the group.

Parameters
athe element
Returns
the element doubled

Reimplemented from AbstractGroup< EC2NPoint >.

Definition at line 218 of file ec2n.cpp.


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