From 572fe07633123ce38abf28c6426356e37aef3a99 Mon Sep 17 00:00:00 2001 From: weidai Date: Fri, 4 Jul 2003 00:17:37 +0000 Subject: create DLL version, fix GetNextIV() bug in CTR and OFB modes git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@87 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- ec2n.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'ec2n.h') diff --git a/ec2n.h b/ec2n.h index c2177e7..3cb4246 100644 --- a/ec2n.h +++ b/ec2n.h @@ -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; + //! Elliptic Curve over GF(2^n) -class EC2N : public AbstractGroup +class CRYPTOPP_DLL EC2N : public AbstractGroup { 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 m_field; FieldElement m_a, m_b; mutable Point m_R; }; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_FixedBasePrecomputationImpl; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupPrecomputation; + template class EcPrecomputation; //! . -- cgit v1.2.1