diff options
Diffstat (limited to 'eccrypto.h')
-rw-r--r-- | eccrypto.h | 28 |
1 files changed, 25 insertions, 3 deletions
@@ -1,5 +1,5 @@ #ifndef CRYPTOPP_ECCRYPTO_H -#define CRYPTOPP_ECCRTPTO_H +#define CRYPTOPP_ECCRYPTO_H /*! \file */ @@ -12,11 +12,11 @@ #include "gfpcrypt.h" #include "dh.h" #include "mqv.h" +#include "ecp.h" +#include "ec2n.h" NAMESPACE_BEGIN(CryptoPP) -template <class T> class EcPrecomputation; - //! Elliptic Curve Parameters /*! This class corresponds to the ASN.1 sequence of the same name in ANSI X9.62 (also SEC 1). @@ -117,6 +117,9 @@ public: const EllipticCurve& GetCurve() const {return m_groupPrecomputation.GetCurve();} + bool operator==(const ThisClass &rhs) const + {return DL_GroupParametersImpl<EcPrecomputation<EC> >::operator==(rhs);} + #ifdef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY const Point& GetBasePoint() const {return GetSubgroupGenerator();} const Integer& GetBasePointOrder() const {return GetSubgroupOrder();} @@ -133,6 +136,11 @@ protected: mutable Integer m_k; // cofactor }; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupParameters_EC<ECP>; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupParameters_EC<EC2N>; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKeyImpl<DL_GroupParameters_EC<ECP> >; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKeyImpl<DL_GroupParameters_EC<EC2N> >; + //! . template <class EC> class DL_PublicKey_EC : public DL_PublicKeyImpl<DL_GroupParameters_EC<EC> > @@ -150,6 +158,11 @@ public: void DEREncodeKey(BufferedTransformation &bt) const; }; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKey_EC<ECP>; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKey_EC<EC2N>; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKeyImpl<DL_GroupParameters_EC<ECP> >; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKeyImpl<DL_GroupParameters_EC<EC2N> >; + //! . template <class EC> class DL_PrivateKey_EC : public DL_PrivateKeyImpl<DL_GroupParameters_EC<EC> > @@ -171,6 +184,9 @@ public: void DEREncodeKey(BufferedTransformation &bt) const; }; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_EC<ECP>; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_EC<EC2N>; + //! Elliptic Curve Diffie-Hellman, AKA <a href="http://www.weidai.com/scan-mirror/ka.html#ECDH">ECDH</a> template <class EC, class COFACTOR_OPTION = CPP_TYPENAME DL_GroupParameters_EC<EC>::DefaultCofactorOption> struct ECDH @@ -196,6 +212,9 @@ struct DL_Keys_EC template <class EC, class H = SHA> struct ECDSA; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_WithSignaturePairwiseConsistencyTest<DL_PrivateKey_EC<ECP>, ECDSA<ECP> >; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_WithSignaturePairwiseConsistencyTest<DL_PrivateKey_EC<EC2N>, ECDSA<EC2N> >; + //! . template <class EC> struct DL_Keys_ECDSA @@ -204,6 +223,9 @@ struct DL_Keys_ECDSA typedef DL_PrivateKey_WithSignaturePairwiseConsistencyTest<DL_PrivateKey_EC<EC>, ECDSA<EC> > PrivateKey; }; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_Algorithm_GDSA<ECP::Point>; +CRYPTOPP_DLL_TEMPLATE_CLASS DL_Algorithm_GDSA<EC2N::Point>; + //! . template <class EC> class DL_Algorithm_ECDSA : public DL_Algorithm_GDSA<typename EC::Point> |