diff options
author | weidai <weidai11@users.noreply.github.com> | 2003-07-04 00:17:37 +0000 |
---|---|---|
committer | weidai <weidai11@users.noreply.github.com> | 2003-07-04 00:17:37 +0000 |
commit | f278895908e663a6a5a2c1f63e5523c5004f5d20 (patch) | |
tree | 0536d87e504a82920156c239bc5ae6aa43e70ebc /ec2n.h | |
parent | e43f74604744291d3a99b8bfe81d94af4ba6abbd (diff) | |
download | cryptopp-git-f278895908e663a6a5a2c1f63e5523c5004f5d20.tar.gz |
create DLL version, fix GetNextIV() bug in CTR and OFB modes
Diffstat (limited to 'ec2n.h')
-rw-r--r-- | ec2n.h | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -9,7 +9,7 @@ NAMESPACE_BEGIN(CryptoPP) //! Elliptic Curve Point -struct EC2NPoint +struct CRYPTOPP_DLL EC2NPoint { EC2NPoint() : identity(true) {} EC2NPoint(const PolynomialMod2 &x, const PolynomialMod2 &y) @@ -24,8 +24,10 @@ struct EC2NPoint PolynomialMod2 x, y; }; +CRYPTOPP_DLL_TEMPLATE_CLASS AbstractGroup<EC2NPoint>; + //! Elliptic Curve over GF(2^n) -class EC2N : public AbstractGroup<EC2NPoint> +class CRYPTOPP_DLL EC2N : public AbstractGroup<EC2NPoint> { public: typedef GF2NP Field; @@ -73,12 +75,18 @@ public: const FieldElement & GetA() const {return m_a;} const FieldElement & GetB() const {return m_b;} + bool operator==(const EC2N &rhs) const + {return GetField() == rhs.GetField() && m_a == rhs.m_a && m_b == rhs.m_b;} + private: clonable_ptr<Field> m_field; FieldElement m_a, m_b; mutable Point m_R; }; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_FixedBasePrecomputationImpl<EC2N::Point>; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupPrecomputation<EC2N::Point>; + template <class T> class EcPrecomputation; //! . |