#ifndef FIELDELEMENTGF2K_H#define FIELDELEMENTGF2K_H// Abstract base class defining the interface for a field element, plus// associated operations required for implementing elliptic curve arithmetic// operations.template<class FieldElementGF2kNB>class FieldElementGF2k{ public: // Virtual destructor ~FieldElementGF2k() { } // Add the current field element to another field element. For the // benefit of chained expressions, the method must return *this. virtual FieldElementGF2k& add(const FieldElement& arg) = 0; // Multiply the current field element by another field element. For // the benefit of chained expressions, the method must return *this. virtual FieldElementGF2k& multiply(const FieldElement& arg) = 0; // Square the current field element. For the benefit of chained // expressions, the method must return *this. virtual FieldElementGF2k& square() = 0; // Invert the current field element. For the benefit of chained // expressions, the method must return *this. virtual FieldElementGF2k& invert(const FieldElement& arg) = 0; // Outputs a normal basis representation of the current point. If // the class doesn't implement normal basis arithmetic, then this // function convert from its internal representation (typically a // polynomial basis) to normal basis. virtual FieldElementGF2kNB& normalBasisRepresentation() = 0;};#endif // FIELDELEMENTGF2K_H