| 
    Crypto++ 8.9
    
   Free C++ class library of cryptographic schemes 
   | 
 
Elliptic Curve over GF(2^n) More...
#include <ec2n.h>
 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 () | |
| Construct an EC2N.   | |
| EC2N (const Field &field, const Field::Element &a, const Field::Element &b) | |
| Construct an EC2N.   | |
| EC2N (BufferedTransformation &bt) | |
| Construct an EC2N from BER encoded parameters.   | |
| void | DEREncode (BufferedTransformation &bt) const | 
| Encode the fields fieldID and curve of the sequence ECParameters.   | |
| bool | Equal (const Point &P, const Point &Q) const | 
| Compare two elements for equality.   | |
| const Point & | Identity () const | 
| Provides the Identity element.   | |
| const Point & | Inverse (const Point &P) const | 
| Inverts the element in the group.   | |
| bool | InversionIsFast () const | 
| Determine if inversion is fast.   | |
| const Point & | Add (const Point &P, const Point &Q) const | 
| Adds elements in the group.   | |
| const Point & | Double (const Point &P) const | 
| Doubles an element in the group.   | |
| 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 | 
| Verifies points on elliptic curve.   | |
| unsigned int | EncodedPointSize (bool compressed=false) const | 
| Determines encoded point size.   | |
| bool | DecodePoint (Point &P, BufferedTransformation &bt, size_t len) const | 
| Decodes an elliptic curve point.   | |
| bool | DecodePoint (Point &P, const byte *encodedPoint, size_t len) const | 
| Decodes an elliptic curve point.   | |
| void | EncodePoint (byte *encodedPoint, const Point &P, bool compressed) const | 
| Encodes an elliptic curve point.   | |
| void | EncodePoint (BufferedTransformation &bt, const Point &P, bool compressed) const | 
| Encodes an elliptic curve point.   | |
| Point | BERDecodePoint (BufferedTransformation &bt) const | 
| BER Decodes an elliptic curve point.   | |
| void | DEREncodePoint (BufferedTransformation &bt, const Point &P, bool compressed) const | 
| DER Encodes an elliptic curve point.   | |
| Integer | FieldSize () const | 
| const Field & | GetField () const | 
| const FieldElement & | GetA () const | 
| const FieldElement & | GetB () const | 
| bool | operator== (const EC2N &rhs) const | 
  Public Member Functions inherited from AbstractGroup< EC2NPoint > | |
| virtual const Element & | Subtract (const Element &a, const Element &b) const | 
| Subtracts elements in the group.   | |
| virtual Element & | Accumulate (Element &a, const Element &b) const | 
| TODO.   | |
| virtual Element & | Reduce (Element &a, const Element &b) const | 
| Reduces an element in the congruence class.   | |
| virtual Element | ScalarMultiply (const Element &a, const Integer &e) const | 
| Performs a scalar multiplication.   | |
| virtual Element | CascadeScalarMultiply (const Element &x, const Integer &e1, const Element &y, const Integer &e2) const | 
| TODO.   | |
| virtual void | SimultaneousMultiply (Element *results, const Element &base, const Integer *exponents, unsigned int exponentsCount) const | 
| Multiplies a base to multiple exponents in a group.   | |
| typedef GF2NP EC2N::Field | 
| typedef EC2NPoint EC2N::Point | 
      
  | 
  inline | 
| EC2N::EC2N | ( | BufferedTransformation & | bt | ) | 
Construct an EC2N from BER encoded parameters.
| bt | BufferedTransformation derived object | 
This constructor will decode and extract the fields fieldID and curve of the sequence ECParameters
| void EC2N::DEREncode | ( | BufferedTransformation & | bt | ) | const | 
Encode the fields fieldID and curve of the sequence ECParameters.
| bt | BufferedTransformation derived object | 
Compare two elements for equality.
| a | first element | 
| b | second element | 
Equal() tests the elements for equality using a==b 
Implements AbstractGroup< EC2NPoint >.
      
  | 
  virtual | 
Inverts the element in the group.
| a | first element | 
Implements AbstractGroup< EC2NPoint >.
      
  | 
  inlinevirtual | 
Determine if inversion is fast.
Reimplemented from AbstractGroup< EC2NPoint >.
Adds elements in the group.
| a | first element | 
| b | second element | 
a and b Implements AbstractGroup< EC2NPoint >.
Doubles an element in the group.
| a | the element | 
Reimplemented from AbstractGroup< EC2NPoint >.
      
  | 
  virtual | 
Verifies points on elliptic curve.
| P | point to verify | 
Implements EncodedPoint< EC2NPoint >.
      
  | 
  inlinevirtual | 
Determines encoded point size.
| compressed | flag indicating if the point is compressed | 
Implements EncodedPoint< EC2NPoint >.
      
  | 
  virtual | 
Decodes an elliptic curve point.
| P | point which is decoded | 
| bt | source BufferedTransformation | 
| len | number of bytes to read from the BufferedTransformation | 
Implements EncodedPoint< EC2NPoint >.
Decodes an elliptic curve point.
| P | point which is decoded | 
| encodedPoint | byte array with the encoded point | 
| len | the size of the array | 
Implements EncodedPoint< EC2NPoint >.
Encodes an elliptic curve point.
| P | point which is decoded | 
| encodedPoint | byte array for the encoded point | 
| compressed | flag indicating if the point is compressed | 
encodedPoint must be at least EncodedPointSize() in length 
Implements EncodedPoint< EC2NPoint >.
      
  | 
  virtual | 
Encodes an elliptic curve point.
| bt | target BufferedTransformation | 
| P | point which is encoded | 
| compressed | flag indicating if the point is compressed | 
Implements EncodedPoint< EC2NPoint >.
      
  | 
  virtual | 
BER Decodes an elliptic curve point.
| bt | source BufferedTransformation | 
Implements EncodedPoint< EC2NPoint >.
      
  | 
  virtual | 
DER Encodes an elliptic curve point.
| bt | target BufferedTransformation | 
| P | point which is encoded | 
| compressed | flag indicating if the point is compressed | 
Implements EncodedPoint< EC2NPoint >.