~ubuntu-branches/ubuntu/intrepid/libcrypto++/intrepid

« back to all changes in this revision

Viewing changes to ec2n.h

  • Committer: Bazaar Package Importer
  • Author(s): Pierre Machard
  • Date: 2004-08-27 12:35:05 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040827123505-7evgxiu7k8memiyk
Tags: 5.2.1a-1
* Urgency set to high because lastest upload was unclean
* Rename libcrypto++-5.2.1.orig.tar.gz in  libcrypto++-5.2.1a.orig.tar.gz

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
NAMESPACE_BEGIN(CryptoPP)
10
10
 
11
11
//! Elliptic Curve Point
12
 
struct EC2NPoint
 
12
struct CRYPTOPP_DLL EC2NPoint
13
13
{
14
14
        EC2NPoint() : identity(true) {}
15
15
        EC2NPoint(const PolynomialMod2 &x, const PolynomialMod2 &y)
24
24
        PolynomialMod2 x, y;
25
25
};
26
26
 
 
27
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractGroup<EC2NPoint>;
 
28
 
27
29
//! Elliptic Curve over GF(2^n)
28
 
class EC2N : public AbstractGroup<EC2NPoint>
 
30
class CRYPTOPP_DLL EC2N : public AbstractGroup<EC2NPoint>
29
31
{
30
32
public:
31
33
        typedef GF2NP Field;
73
75
        const FieldElement & GetA() const {return m_a;}
74
76
        const FieldElement & GetB() const {return m_b;}
75
77
 
 
78
        bool operator==(const EC2N &rhs) const
 
79
                {return GetField() == rhs.GetField() && m_a == rhs.m_a && m_b == rhs.m_b;}
 
80
 
76
81
private:
77
82
        clonable_ptr<Field> m_field;
78
83
        FieldElement m_a, m_b;
79
84
        mutable Point m_R;
80
85
};
81
86
 
 
87
CRYPTOPP_DLL_TEMPLATE_CLASS DL_FixedBasePrecomputationImpl<EC2N::Point>;
 
88
CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupPrecomputation<EC2N::Point>;
 
89
 
82
90
template <class T> class EcPrecomputation;
83
91
 
84
 
//! .
 
92
//! EC2N precomputation
85
93
template<> class EcPrecomputation<EC2N> : public DL_GroupPrecomputation<EC2N::Point>
86
94
{
87
95
public: