\>
This reference manual is a work in progress. Some classes are still lacking detailed descriptions.
@@ -311,14 +313,14 @@ DOCUMENTED_NAMESPACE_BEGIN(Name)
// more names defined in argnames.h
DOCUMENTED_NAMESPACE_END
-//! .
+//! empty set of name-value pairs
class CRYPTOPP_DLL NullNameValuePairs : public NameValuePairs
{
public:
bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const {return false;}
};
-//! .
+//! _
extern CRYPTOPP_DLL const NullNameValuePairs g_nullNameValuePairs;
// ********************************************************
@@ -578,7 +580,8 @@ protected:
void ThrowIfInvalidTruncatedSize(unsigned int size) const;
};
-//! .
+typedef HashTransformation HashFunction;
+
template
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE SimpleKeyedTransformation : public T, public SimpleKeyingInterface
{
@@ -587,12 +590,11 @@ public:
{SimpleKeyingInterface::ThrowIfInvalidKeyLength(*this, length);}
};
-//! .
-typedef HashTransformation HashFunction;
#ifdef CRYPTOPP_DOXYGEN_PROCESSING
-//! These objects usually should not be used directly. See BlockTransformation for more details.
+//! interface for one direction (encryption or decryption) of a block cipher
+/*! \note These objects usually should not be used directly. See BlockTransformation for more details. */
class BlockCipher : public BlockTransformation, public SimpleKeyingInterface {};
-//! interface for stream ciphers
+//! interface for one direction (encryption or decryption) of a stream cipher or cipher mode
class SymmetricCipher : public StreamTransformation, public SimpleKeyingInterface {};
//! interface for message authentication codes
class MessageAuthenticationCode : public HashTransformation, public SimpleKeyingInterface {};
@@ -600,11 +602,11 @@ class MessageAuthenticationCode : public HashTransformation, public SimpleKeying
typedef SimpleKeyedTransformation BlockCipher;
typedef SimpleKeyedTransformation SymmetricCipher;
typedef SimpleKeyedTransformation MessageAuthenticationCode;
+#endif
CRYPTOPP_DLL_TEMPLATE_CLASS SimpleKeyedTransformation;
CRYPTOPP_DLL_TEMPLATE_CLASS SimpleKeyedTransformation;
CRYPTOPP_DLL_TEMPLATE_CLASS SimpleKeyedTransformation;
-#endif
#ifdef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY
typedef SymmetricCipher StreamCipher;
@@ -882,7 +884,6 @@ public:
//! \name NON-BLOCKING TRANSFER OF OUTPUT
//@{
- //! .
virtual unsigned int TransferTo2(BufferedTransformation &target, unsigned long &byteCount, const std::string &channel=NULL_CHANNEL, bool blocking=true) =0;
virtual unsigned int CopyRangeTo2(BufferedTransformation &target, unsigned long &begin, unsigned long end=ULONG_MAX, const std::string &channel=NULL_CHANNEL, bool blocking=true) const =0;
unsigned int TransferMessagesTo2(BufferedTransformation &target, unsigned int &messageCount, const std::string &channel=NULL_CHANNEL, bool blocking=true);
@@ -1140,7 +1141,7 @@ public:
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE PK_Encryptor : virtual public PK_CryptoSystem, public PublicKeyAlgorithm
{
public:
- //! .
+ //! exception thrown when trying to encrypt plaintext of invalid length
class CRYPTOPP_DLL InvalidPlaintextLength : public Exception
{
public:
diff --git a/des.h b/des.h
index e39b1619..9c218af9 100644
--- a/des.h
+++ b/des.h
@@ -21,6 +21,7 @@ protected:
FixedSizeSecBlock k;
};
+//! _
struct DES_Info : public FixedBlockSize<8>, public FixedKeyLength<8>
{
// disable DES in DLL version by not exporting this function
@@ -50,6 +51,7 @@ public:
typedef BlockCipherFinal Decryption;
};
+//! _
struct DES_EDE2_Info : public FixedBlockSize<8>, public FixedKeyLength<16>
{
CRYPTOPP_DLL static const char * StaticAlgorithmName() {return "DES-EDE2";}
@@ -73,6 +75,7 @@ public:
typedef BlockCipherFinal Decryption;
};
+//! _
struct DES_EDE3_Info : public FixedBlockSize<8>, public FixedKeyLength<24>
{
CRYPTOPP_DLL static const char * StaticAlgorithmName() {return "DES-EDE3";}
@@ -96,6 +99,7 @@ public:
typedef BlockCipherFinal Decryption;
};
+//! _
struct DES_XEX3_Info : public FixedBlockSize<8>, public FixedKeyLength<24>
{
static const char *StaticAlgorithmName() {return "DES-XEX3";}
diff --git a/dh.h b/dh.h
index 86bf6076..fd95a4ad 100644
--- a/dh.h
+++ b/dh.h
@@ -17,7 +17,7 @@ class DH_Domain : public DL_SimpleKeyAgreementDomainBase KeyAgreementAlgorithm;
+ typedef DL_KeyAgreementAlgorithm_DH DH_Algorithm;
typedef DH_Domain Domain;
DH_Domain() {}
@@ -76,9 +76,13 @@ public:
}
}
+ static std::string StaticAlgorithmName()
+ {return GroupParameters::StaticAlgorithmNamePrefix() + DH_Algorithm::StaticAlgorithmName();}
+ std::string AlgorithmName() const {return StaticAlgorithmName();}
+
private:
const DL_KeyAgreementAlgorithm & GetKeyAgreementAlgorithm() const
- {return Singleton().Ref();}
+ {return Singleton().Ref();}
DL_GroupParameters & AccessAbstractGroupParameters()
{return m_groupParameters;}
diff --git a/dmac.h b/dmac.h
index f10d34fd..ad30fb11 100644
--- a/dmac.h
+++ b/dmac.h
@@ -5,6 +5,7 @@
NAMESPACE_BEGIN(CryptoPP)
+//! _
template
class CRYPTOPP_NO_VTABLE DMAC_Base : public SameKeyLengthAs, public MessageAuthenticationCode
{
@@ -32,7 +33,7 @@ private:
//! DMAC
/*! Based on "CBC MAC for Real-Time Data Sources" by Erez Petrank
- and Charles Rackoff. T should be BlockTransformation class.
+ and Charles Rackoff. T should be a class derived from BlockCipherDocumentation.
*/
template
class DMAC : public MessageAuthenticationCodeFinal >
diff --git a/ec2n.h b/ec2n.h
index 3cb42460..1c3863a4 100644
--- a/ec2n.h
+++ b/ec2n.h
@@ -89,7 +89,7 @@ CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupPrecomputation;
template class EcPrecomputation;
-//! .
+//! EC2N precomputation
template<> class EcPrecomputation : public DL_GroupPrecomputation
{
public:
diff --git a/eccrypto.h b/eccrypto.h
index 3005fafa..b20fa3cd 100644
--- a/eccrypto.h
+++ b/eccrypto.h
@@ -93,6 +93,7 @@ public:
Integer GetMaxExponent() const {return GetSubgroupOrder()-1;}
bool IsIdentity(const Element &element) const {return element.identity;}
void SimultaneousExponentiate(Element *results, const Element &base, const Integer *exponents, unsigned int exponentsCount) const;
+ static std::string StaticAlgorithmNamePrefix() {return "EC";}
// ASN1Key
OID GetAlgorithmID() const;
@@ -141,7 +142,7 @@ CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupParameters_EC;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKeyImpl >;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKeyImpl >;
-//! .
+//! EC public key
template
class DL_PublicKey_EC : public DL_PublicKeyImpl >
{
@@ -163,7 +164,7 @@ CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKey_EC;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKeyImpl >;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKeyImpl >;
-//! .
+//! EC private key
template
class DL_PrivateKey_EC : public DL_PrivateKeyImpl >
{
@@ -201,7 +202,7 @@ struct ECMQV
typedef MQV_Domain, COFACTOR_OPTION> Domain;
};
-//! .
+//! EC keys
template
struct DL_Keys_EC
{
@@ -212,7 +213,7 @@ struct DL_Keys_EC
template
struct ECDSA;
-//! .
+//! ECDSA keys
template
struct DL_Keys_ECDSA
{
@@ -223,7 +224,7 @@ struct DL_Keys_ECDSA
CRYPTOPP_DLL_TEMPLATE_CLASS DL_Algorithm_GDSA;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_Algorithm_GDSA;
-//! .
+//! ECDSA algorithm
template
class DL_Algorithm_ECDSA : public DL_Algorithm_GDSA
{
@@ -231,7 +232,7 @@ public:
static const char * StaticAlgorithmName() {return "ECDSA";}
};
-//! .
+//! ECNR algorithm
template
class DL_Algorithm_ECNR : public DL_Algorithm_NR
{
diff --git a/ecp.h b/ecp.h
index bc7303d1..8ac98e06 100644
--- a/ecp.h
+++ b/ecp.h
@@ -93,7 +93,7 @@ CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupPrecomputation;
template class EcPrecomputation;
-//! .
+//! ECP precomputation
template<> class EcPrecomputation : public DL_GroupPrecomputation
{
public:
diff --git a/esign.h b/esign.h
index e930e88c..dd44e0c5 100644
--- a/esign.h
+++ b/esign.h
@@ -11,7 +11,7 @@
NAMESPACE_BEGIN(CryptoPP)
-//! .
+//! _
class ESIGNFunction : public TrapdoorFunction, public PublicKey, public ASN1CryptoMaterial
{
typedef ESIGNFunction ThisClass;
@@ -47,7 +47,7 @@ protected:
Integer m_n, m_e;
};
-//! .
+//! _
class InvertibleESIGNFunction : public ESIGNFunction, public RandomizedTrapdoorFunctionInverse, public PrivateKey
{
typedef InvertibleESIGNFunction ThisClass;
@@ -81,7 +81,7 @@ protected:
Integer m_p, m_q;
};
-//! .
+//! _
template
class EMSA5Pad : public PK_DeterministicSignatureMessageEncodingMethod
{
diff --git a/factory.h b/factory.h
index b9c96e6a..67c97688 100644
--- a/factory.h
+++ b/factory.h
@@ -6,6 +6,7 @@
NAMESPACE_BEGIN(CryptoPP)
+//! _
template
class ObjectFactory
{
@@ -13,6 +14,7 @@ public:
virtual AbstractClass * CreateObject() const =0;
};
+//! _
template
class DefaultObjectFactory : public ObjectFactory
{
@@ -24,10 +26,17 @@ public:
};
+//! _
template
class ObjectFactoryRegistry
{
public:
+ class FactoryNotFound : public Exception
+ {
+ public:
+ FactoryNotFound(const char *name) : Exception(OTHER_ERROR, std::string("ObjectFactoryRegistry: could not find factory for algorithm ") + name) {}
+ };
+
~ObjectFactoryRegistry()
{
for (CPP_TYPENAME Map::iterator i = m_map.begin(); i != m_map.end(); ++i)
@@ -37,7 +46,7 @@ public:
}
}
- void RegisterFactory(const char *name, ObjectFactory *factory)
+ void RegisterFactory(const std::string &name, ObjectFactory *factory)
{
m_map[name] = factory;
}
@@ -51,7 +60,9 @@ public:
AbstractClass *CreateObject(const char *name) const
{
const ObjectFactory *factory = GetFactory(name);
- return factory ? factory->CreateObject() : NULL;
+ if (!factory)
+ throw FactoryNotFound(name);
+ return factory->CreateObject();
}
// VC60 workaround: use "..." to prevent this function from being inlined
@@ -72,27 +83,28 @@ ObjectFactoryRegistry & ObjectFactoryRegistry
struct RegisterDefaultFactoryFor {
-RegisterDefaultFactoryFor(const char *name)
+RegisterDefaultFactoryFor(const char *name=NULL)
{
- ObjectFactoryRegistry::Registry().RegisterFactory(name, new DefaultObjectFactory);
+ ObjectFactoryRegistry::Registry().
+ RegisterFactory(name ? name : ConcreteClass::StaticAlgorithmName(), new DefaultObjectFactory);
}};
template
-void RegisterAsymmetricCipherDefaultFactories(const char *name, SchemeClass *dummy=NULL)
+void RegisterAsymmetricCipherDefaultFactories(const char *name=NULL, SchemeClass *dummy=NULL)
{
RegisterDefaultFactoryFor((const char *)name);
RegisterDefaultFactoryFor((const char *)name);
}
template
-void RegisterSignatureSchemeDefaultFactories(const char *name, SchemeClass *dummy=NULL)
+void RegisterSignatureSchemeDefaultFactories(const char *name=NULL, SchemeClass *dummy=NULL)
{
RegisterDefaultFactoryFor((const char *)name);
RegisterDefaultFactoryFor((const char *)name);
}
template
-void RegisterSymmetricCipherDefaultFactories(const char *name, SchemeClass *dummy=NULL)
+void RegisterSymmetricCipherDefaultFactories(const char *name=NULL, SchemeClass *dummy=NULL)
{
RegisterDefaultFactoryFor((const char *)name);
RegisterDefaultFactoryFor((const char *)name);
diff --git a/files.h b/files.h
index e54d8902..baa57a3e 100644
--- a/files.h
+++ b/files.h
@@ -10,7 +10,7 @@
NAMESPACE_BEGIN(CryptoPP)
-//! .
+//! file-based implementation of Store interface
class CRYPTOPP_DLL FileStore : public Store, private FilterPutSpaceHelper, public NotCopyable
{
public:
@@ -45,7 +45,7 @@ private:
bool m_waiting;
};
-//! .
+//! file-based implementation of Source interface
class CRYPTOPP_DLL FileSource : public SourceTemplate
{
public:
@@ -63,7 +63,7 @@ public:
std::istream* GetStream() {return m_store.GetStream();}
};
-//! .
+//! file-based implementation of Sink interface
class CRYPTOPP_DLL FileSink : public Sink, public NotCopyable
{
public:
diff --git a/filters.h b/filters.h
index 8b26d669..1827c90a 100644
--- a/filters.h
+++ b/filters.h
@@ -109,14 +109,14 @@ private:
unsigned int m_currentSeriesMessages, m_totalMessages, m_totalMessageSeries;
};
-//! .
+//! _
class CRYPTOPP_DLL TransparentFilter : public MeterFilter
{
public:
TransparentFilter(BufferedTransformation *attachment=NULL) : MeterFilter(attachment, true) {}
};
-//! .
+//! _
class CRYPTOPP_DLL OpaqueFilter : public MeterFilter
{
public:
@@ -210,7 +210,7 @@ private:
BlockQueue m_queue;
};
-//! .
+//! _
class CRYPTOPP_DLL FilterWithInputQueue : public Filter
{
public:
@@ -571,7 +571,7 @@ public:
byte * CreatePutSpace(unsigned int &size) {return BufferedTransformation::CreatePutSpace(size);}
};
-//! .
+//! string-based implementation of Store interface
class StringStore : public Store
{
public:
@@ -592,7 +592,7 @@ private:
unsigned int m_length, m_count;
};
-//! .
+//! RNG-based implementation of Source interface
class CRYPTOPP_DLL RandomNumberStore : public Store
{
public:
@@ -619,7 +619,7 @@ private:
unsigned long m_count;
};
-//! .
+//! empty store
class CRYPTOPP_DLL NullStore : public Store
{
public:
@@ -638,7 +638,7 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Source : public InputRejecting
{
public:
Source(BufferedTransformation *attachment = NULL)
- {Detach(attachment);}
+ {Source::Detach(attachment);}
unsigned long Pump(unsigned long pumpMax=ULONG_MAX)
{Pump2(pumpMax); return pumpMax;}
@@ -686,7 +686,7 @@ protected:
T m_store;
};
-//! .
+//! string-based implementation of Source interface
class CRYPTOPP_DLL StringSource : public SourceTemplate
{
public:
@@ -700,7 +700,7 @@ public:
: SourceTemplate(attachment) {SourceInitialize(pumpAll, MakeParameters("InputBuffer", ConstByteArrayParameter(string)));}
};
-//! .
+//! RNG-based implementation of Source interface
class CRYPTOPP_DLL RandomNumberSource : public SourceTemplate
{
public:
diff --git a/gfpcrypt.h b/gfpcrypt.h
index 206c0bf6..056e2fab 100644
--- a/gfpcrypt.h
+++ b/gfpcrypt.h
@@ -19,7 +19,7 @@ NAMESPACE_BEGIN(CryptoPP)
CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupParameters;
-//! .
+//! _
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE DL_GroupParameters_IntegerBased : public DL_GroupParameters, public ASN1CryptoMaterial
{
typedef DL_GroupParameters_IntegerBased ThisClass;
@@ -57,6 +57,7 @@ public:
Integer ConvertElementToInteger(const Element &element) const
{return element;}
Integer GetMaxExponent() const;
+ static std::string StaticAlgorithmNamePrefix() {return "";}
OID GetAlgorithmID() const;
@@ -78,7 +79,7 @@ private:
Integer m_q;
};
-//! .
+//! _
template >
class CRYPTOPP_NO_VTABLE DL_GroupParameters_IntegerBasedImpl : public DL_GroupParametersImpl
{
@@ -114,7 +115,7 @@ public:
CRYPTOPP_DLL_TEMPLATE_CLASS DL_GroupParameters_IntegerBasedImpl;
-//! .
+//! GF(p) group parameters
class CRYPTOPP_DLL DL_GroupParameters_GFP : public DL_GroupParameters_IntegerBasedImpl
{
public:
@@ -136,7 +137,7 @@ protected:
int GetFieldType() const {return 1;}
};
-//! .
+//! GF(p) group parameters that default to same primes
class CRYPTOPP_DLL DL_GroupParameters_GFP_DefaultSafePrime : public DL_GroupParameters_GFP
{
public:
@@ -146,7 +147,7 @@ protected:
unsigned int GetDefaultSubgroupOrderSize(unsigned int modulusSize) const {return modulusSize-1;}
};
-//! .
+//! GDSA algorithm
template
class DL_Algorithm_GDSA : public DL_ElgamalLikeSignatureAlgorithm
{
@@ -178,7 +179,7 @@ public:
CRYPTOPP_DLL_TEMPLATE_CLASS DL_Algorithm_GDSA;
-//! .
+//! NR algorithm
template
class DL_Algorithm_NR : public DL_ElgamalLikeSignatureAlgorithm
{
@@ -224,7 +225,7 @@ public:
{this->GetPublicElement().DEREncode(bt);}
};
-//! .
+//! DL private key (in GF(p) groups)
template
class DL_PrivateKey_GFP : public DL_PrivateKeyImpl
{
@@ -243,7 +244,7 @@ public:
{this->AccessGroupParameters().Initialize(p, q, g); this->SetPrivateExponent(x);}
};
-//! .
+//! DL signing/verification keys (in GF(p) groups)
struct DL_SignatureKeys_GFP
{
typedef DL_GroupParameters_GFP GroupParameters;
@@ -251,7 +252,7 @@ struct DL_SignatureKeys_GFP
typedef DL_PrivateKey_GFP PrivateKey;
};
-//! .
+//! DL encryption/decryption keys (in GF(p) groups)
struct DL_CryptoKeys_GFP
{
typedef DL_GroupParameters_GFP_DefaultSafePrime GroupParameters;
@@ -359,20 +360,20 @@ struct NR : public DL_SS<
{
};
-//! .
+//! DSA group parameters, these are GF(p) group parameters that are allowed by the DSA standard
class CRYPTOPP_DLL DL_GroupParameters_DSA : public DL_GroupParameters_GFP
{
public:
/*! also checks that the lengths of p and q are allowed by the DSA standard */
bool ValidateGroup(RandomNumberGenerator &rng, unsigned int level) const;
/*! parameters: (ModulusSize), or (Modulus, SubgroupOrder, SubgroupGenerator) */
- /*! ModulusSize must be between 512 and 1024, and divisible by 64 */
+ /*! ModulusSize must be between DSA::MIN_PRIME_LENGTH and DSA::MAX_PRIME_LENGTH, and divisible by DSA::PRIME_LENGTH_MULTIPLE */
void GenerateRandom(RandomNumberGenerator &rng, const NameValuePairs &alg);
};
struct DSA;
-//! .
+//! DSA keys
struct DL_Keys_DSA
{
typedef DL_PublicKey_GFP PublicKey;
@@ -400,6 +401,7 @@ struct CRYPTOPP_DLL DSA : public DL_SS<
static bool IsValidPrimeLength(unsigned int pbits)
{return pbits >= MIN_PRIME_LENGTH && pbits <= MAX_PRIME_LENGTH && pbits % PRIME_LENGTH_MULTIPLE == 0;}
+ //! FIPS 186-2 Change Notice 1 changed the minimum modulus length to 1024
enum {
#if (DSA_1024_BIT_MODULUS_ONLY)
MIN_PRIME_LENGTH = 1024,
@@ -413,7 +415,7 @@ CRYPTOPP_DLL_TEMPLATE_CLASS DL_PublicKey_GFP;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_GFP;
CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_WithSignaturePairwiseConsistencyTest, DSA>;
-//! .
+//! the XOR encryption method, for use with DL-based cryptosystems
template
class DL_EncryptionAlgorithm_Xor : public DL_SymmetricEncryptionAlgorithm
{
@@ -489,7 +491,7 @@ public:
}
};
-//! .
+//! _
template
class DL_KeyDerivationAlgorithm_P1363 : public DL_KeyDerivationAlgorithm
{
diff --git a/gost.h b/gost.h
index 2bfe4c00..8b513d37 100644
--- a/gost.h
+++ b/gost.h
@@ -9,6 +9,7 @@
NAMESPACE_BEGIN(CryptoPP)
+//! _
struct GOST_Info : public FixedBlockSize<8>, public FixedKeyLength<32>
{
static const char *StaticAlgorithmName() {return "GOST";}
diff --git a/hmac.h b/hmac.h
index e121e676..64670bac 100644
--- a/hmac.h
+++ b/hmac.h
@@ -8,6 +8,7 @@
NAMESPACE_BEGIN(CryptoPP)
+//! _
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE HMAC_Base : public VariableKeyLength<16, 0, UINT_MAX>, public MessageAuthenticationCode
{
public:
diff --git a/hrtimer.h b/hrtimer.h
index 4c7402c4..659b7344 100644
--- a/hrtimer.h
+++ b/hrtimer.h
@@ -5,6 +5,7 @@
NAMESPACE_BEGIN(CryptoPP)
+//! _
class TimerBase
{
public:
diff --git a/idea.h b/idea.h
index b33be628..4baa3144 100644
--- a/idea.h
+++ b/idea.h
@@ -9,6 +9,7 @@
NAMESPACE_BEGIN(CryptoPP)
+//! _
struct IDEA_Info : public FixedBlockSize<8>, public FixedKeyLength<16>, public FixedRounds<8>
{
static const char *StaticAlgorithmName() {return "IDEA";}
diff --git a/iterhash.h b/iterhash.h
index b4e2682a..7e825912 100644
--- a/iterhash.h
+++ b/iterhash.h
@@ -8,6 +8,7 @@
NAMESPACE_BEGIN(CryptoPP)
+//! _
template
class CRYPTOPP_NO_VTABLE IteratedHashBase : public BASE
{
@@ -15,8 +16,6 @@ public:
typedef T HashWordType;
IteratedHashBase() : m_countHi(0), m_countLo(0) {}
- void SetBlockSize(unsigned int blockSize) {m_data.resize(blockSize / sizeof(HashWordType));}
- void SetStateSize(unsigned int stateSize) {m_digest.resize(stateSize / sizeof(HashWordType));}
unsigned int BlockSize() const {return m_data.size() * sizeof(T);}
unsigned int OptimalBlockSize() const {return BlockSize();}
unsigned int OptimalDataAlignment() const {return sizeof(T);}
@@ -25,6 +24,9 @@ public:
void Restart();
protected:
+ void SetBlockSize(unsigned int blockSize) {m_data.resize(blockSize / sizeof(HashWordType));}
+ void SetStateSize(unsigned int stateSize) {m_digest.resize(stateSize / sizeof(HashWordType));}
+
T GetBitCountHi() const {return (m_countLo >> (8*sizeof(T)-3)) + (m_countHi << 3);}
T GetBitCountLo() const {return m_countLo << 3;}
@@ -48,7 +50,7 @@ CRYPTOPP_STATIC_TEMPLATE_CLASS IteratedHashBase;
CRYPTOPP_STATIC_TEMPLATE_CLASS IteratedHashBase;
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE IteratedHashBase2 : public IteratedHashBase
{
@@ -68,7 +70,7 @@ protected:
virtual void HashEndianCorrectedBlock(const HashWordType *data) =0;
};
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE IteratedHash : public IteratedHashBase2
{
@@ -80,6 +82,7 @@ protected:
IteratedHash() {this->SetBlockSize(T_BlockSize);}
};
+//! _
template
class CRYPTOPP_NO_VTABLE IteratedHashWithStaticTransform
: public ClonableImpl, T_Transform> >
diff --git a/lubyrack.h b/lubyrack.h
index 36b47c9e..c04fd914 100644
--- a/lubyrack.h
+++ b/lubyrack.h
@@ -12,7 +12,7 @@ NAMESPACE_BEGIN(CryptoPP)
template struct DigestSizeDoubleWorkaround {enum {RESULT = 2*T::DIGESTSIZE};}; // VC60 workaround
-//! .
+//! algorithm info
template
struct LR_Info : public VariableKeyLength<16, 0, 2*(UINT_MAX/2), 2>, public FixedBlockSize::RESULT>
{
diff --git a/luc.h b/luc.h
index e88d0251..93ab51df 100644
--- a/luc.h
+++ b/luc.h
@@ -49,7 +49,7 @@ protected:
Integer m_n, m_e;
};
-//! .
+//! _
class InvertibleLUCFunction : public LUCFunction, public TrapdoorFunctionInverse, public PrivateKey
{
typedef InvertibleLUCFunction ThisClass;
@@ -127,7 +127,7 @@ private:
Integer m_p;
};
-//! .
+//! _
class DL_BasePrecomputation_LUC : public DL_FixedBasePrecomputation
{
public:
@@ -146,7 +146,7 @@ private:
Integer m_g;
};
-//! .
+//! _
class DL_GroupParameters_LUC : public DL_GroupParameters_IntegerBasedImpl
{
public:
@@ -168,7 +168,7 @@ private:
int GetFieldType() const {return 2;}
};
-//! .
+//! _
class DL_GroupParameters_LUC_DefaultSafePrime : public DL_GroupParameters_LUC
{
public:
@@ -178,7 +178,7 @@ protected:
unsigned int GetDefaultSubgroupOrderSize(unsigned int modulusSize) const {return modulusSize-1;}
};
-//! .
+//! _
class DL_Algorithm_LUC_HMP : public DL_ElgamalLikeSignatureAlgorithm
{
public:
@@ -191,7 +191,7 @@ public:
{return params.GetGroupOrder().ByteCount();}
};
-//! .
+//! _
struct DL_SignatureKeys_LUC
{
typedef DL_GroupParameters_LUC GroupParameters;
@@ -205,7 +205,7 @@ struct LUC_HMP : public DL_SS, public VariableKeyLength<16, 16, 56, 4>
{
static const char *StaticAlgorithmName() {return "MARS";}
diff --git a/md5mac.h b/md5mac.h
index 92750066..de4d3fc7 100644
--- a/md5mac.h
+++ b/md5mac.h
@@ -9,7 +9,6 @@
NAMESPACE_BEGIN(CryptoPP)
-//! .
class CRYPTOPP_NO_VTABLE MD5MAC_Base : public FixedKeyLength<16>, public IteratedHash
{
public:
@@ -32,7 +31,7 @@ protected:
};
//! MD5-MAC
-typedef MessageAuthenticationCodeFinal MD5MAC;
+DOCUMENTED_TYPEDEF(MessageAuthenticationCodeFinal, MD5MAC)
NAMESPACE_END
diff --git a/mdc.h b/mdc.h
index ce12ca5b..a9bb430c 100644
--- a/mdc.h
+++ b/mdc.h
@@ -11,6 +11,7 @@
NAMESPACE_BEGIN(CryptoPP)
+//! _
template
struct MDC_Info : public FixedBlockSize, public FixedKeyLength
{
diff --git a/misc.h b/misc.h
index a3ba0b75..fc020fdb 100644
--- a/misc.h
+++ b/misc.h
@@ -33,11 +33,13 @@ class CRYPTOPP_DLL Empty
{
};
+//! _
template
class CRYPTOPP_NO_VTABLE TwoBases : public BASE1, public BASE2
{
};
+//! _
template
class CRYPTOPP_NO_VTABLE ThreeBases : public BASE1, public BASE2, public BASE3
{
@@ -65,9 +67,10 @@ struct NewObject
T* operator()() const {return new T;}
};
-// This function safely initializes a static object in a multithreaded environment without using locks.
-// It may leak memory when two threads try to initialize the static object at the same time
-// but this should be acceptable since each static object is only initialized once per session.
+/*! This function safely initializes a static object in a multithreaded environment without using locks.
+ It may leak memory when two threads try to initialize the static object at the same time
+ but this should be acceptable since each static object is only initialized once per session.
+*/
template , int instance=0>
class Singleton
{
diff --git a/modarith.h b/modarith.h
index 365f4c5e..f7cb6be7 100644
--- a/modarith.h
+++ b/modarith.h
@@ -14,7 +14,8 @@ CRYPTOPP_DLL_TEMPLATE_CLASS AbstractGroup;
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractRing;
CRYPTOPP_DLL_TEMPLATE_CLASS AbstractEuclideanDomain;
-//! .
+//! ring of congruence classes modulo n
+/*! \note this implementation represents each congruence class as the smallest non-negative integer in that class */
class CRYPTOPP_DLL ModularArithmetic : public AbstractRing
{
public:
@@ -117,6 +118,7 @@ protected:
// const ModularArithmetic::RandomizationParameter ModularArithmetic::DefaultRandomizationParameter = 0 ;
//! do modular arithmetics in Montgomery representation for increased speed
+/*! \note the Montgomery representation represents each congruence class [a] as a*r%n, where r is a convenient power of 2 */
class CRYPTOPP_DLL MontgomeryRepresentation : public ModularArithmetic
{
public:
diff --git a/modes.h b/modes.h
index a657eb02..4fe17724 100644
--- a/modes.h
+++ b/modes.h
@@ -82,6 +82,7 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CFB_ModePolicy : public ModePolicyCommonTe
{
public:
IV_Requirement IVRequirement() const {return RANDOM_IV;}
+ static const char *StaticAlgorithmName() {return "CFB";}
protected:
unsigned int GetBytesPerIteration() const {return m_feedbackSize;}
@@ -126,6 +127,7 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE OFB_ModePolicy : public ModePolicyCommonTe
public:
bool IsRandomAccess() const {return false;}
IV_Requirement IVRequirement() const {return STRUCTURED_IV;}
+ static const char *StaticAlgorithmName() {return "OFB";}
private:
unsigned int GetBytesPerIteration() const {return BlockSize();}
@@ -148,6 +150,7 @@ public:
bool IsRandomAccess() const {return true;}
IV_Requirement IVRequirement() const {return STRUCTURED_IV;}
void GetNextIV(byte *IV);
+ static const char *StaticAlgorithmName() {return "Counter-BE";}
private:
unsigned int GetBytesPerIteration() const {return BlockSize();}
@@ -194,6 +197,7 @@ public:
unsigned int OptimalBlockSize() const {return BlockSize() * m_cipher->OptimalNumberOfParallelBlocks();}
void ProcessBlocks(byte *outString, const byte *inString, unsigned int numberOfBlocks)
{m_cipher->ProcessAndXorMultipleBlocks(inString, NULL, outString, numberOfBlocks);}
+ static const char *StaticAlgorithmName() {return "ECB";}
};
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CBC_ModeBase : public BlockOrientedCipherModeBase
@@ -202,6 +206,7 @@ public:
IV_Requirement IVRequirement() const {return UNPREDICTABLE_RANDOM_IV;}
bool RequireAlignedInput() const {return false;}
unsigned int MinLastBlockSize() const {return 0;}
+ static const char *StaticAlgorithmName() {return "CBC";}
};
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CBC_Encryption : public CBC_ModeBase
@@ -216,6 +221,7 @@ public:
void SetStolenIV(byte *iv) {m_stolenIV = iv;}
unsigned int MinLastBlockSize() const {return BlockSize()+1;}
void ProcessLastBlock(byte *outString, const byte *inString, unsigned int length);
+ static const char *StaticAlgorithmName() {return "CBC/CTS";}
protected:
void UncheckedSetKey(const NameValuePairs ¶ms, const byte *key, unsigned int length, const byte *iv)
@@ -248,9 +254,9 @@ public:
void ProcessLastBlock(byte *outString, const byte *inString, unsigned int length);
};
-//! .
+//! _
template
-class CipherModeFinalTemplate_CipherHolder : public ObjectHolder, public BASE
+class CipherModeFinalTemplate_CipherHolder : protected ObjectHolder, public AlgorithmImpl >
{
public:
CipherModeFinalTemplate_CipherHolder()
@@ -273,9 +279,12 @@ public:
this->m_cipher = &this->m_object;
this->SetKey(key, length, MakeParameters(Name::IV(), iv)(Name::FeedbackSize(), feedbackSize));
}
+
+ static std::string StaticAlgorithmName()
+ {return CIPHER::StaticAlgorithmName() + "/" + BASE::StaticAlgorithmName();}
};
-//! .
+//! _
template
class CipherModeFinalTemplate_ExternalCipher : public BASE
{
diff --git a/mqv.h b/mqv.h
index 3e258863..2683817b 100644
--- a/mqv.h
+++ b/mqv.h
@@ -8,7 +8,7 @@
NAMESPACE_BEGIN(CryptoPP)
-//! .
+//! _
template
class MQV_Domain : public AuthenticatedKeyAgreementDomain
{
diff --git a/oaep.h b/oaep.h
index cda1a9e2..6b3ef676 100644
--- a/oaep.h
+++ b/oaep.h
@@ -6,7 +6,7 @@
NAMESPACE_BEGIN(CryptoPP)
-//! EME-OAEP, for use with RSAES
+//! _
class CRYPTOPP_DLL OAEP_Base : public PK_EncryptionMessageEncodingMethod
{
public:
@@ -21,6 +21,7 @@ protected:
virtual MaskGeneratingFunction * NewMGF() const =0;
};
+//! EME-OAEP, for use with classes derived from TF_ES
template
class OAEP : public OAEP_Base, public EncryptionStandard
{
diff --git a/panama.h b/panama.h
index 6bbe9b17..25b64191 100644
--- a/panama.h
+++ b/panama.h
@@ -33,7 +33,7 @@ public:
PanamaHash() {Panama::Reset();}
unsigned int DigestSize() const {return DIGESTSIZE;}
void TruncatedFinal(byte *hash, unsigned int size);
- static const char * StaticAlgorithmName() {return "Panama";}
+ static const char * StaticAlgorithmName() {return B::ToEnum() == BIG_ENDIAN_ORDER ? "Panama-BE" : "Panama-LE";}
protected:
void Init() {Panama::Reset();}
@@ -41,47 +41,77 @@ protected:
unsigned int HashMultipleBlocks(const word32 *input, unsigned int length);
};
-//! .
-template
-class CRYPTOPP_NO_VTABLE PanamaMAC_Base : public PanamaHash, public VariableKeyLength<32, 0, UINT_MAX>, public MessageAuthenticationCode
+//! MAC construction using a hermetic hash function
+template
+class HermeticHashFunctionMAC : public AlgorithmImpl > >, T_Info>
{
public:
- void UncheckedSetKey(const byte *userKey, unsigned int keylength)
+ void SetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms = g_nullNameValuePairs)
{
- m_key.Assign(userKey, keylength);
+ m_key.Assign(key, length);
Restart();
}
- static const char * StaticAlgorithmName() {return B::ToEnum() == BIG_ENDIAN_ORDER ? "Panama-BE" : "Panama-LE";}
-
-protected:
- void Init()
+ void Restart()
{
- PanamaHash::Init();
- Update(m_key, m_key.size());
+ m_hash.Restart();
+ m_keyed = false;
}
+ void Update(const byte *input, unsigned int length)
+ {
+ if (!m_keyed)
+ KeyHash();
+ m_hash.Update(input, length);
+ }
+
+ void TruncatedFinal(byte *digest, unsigned int digestSize)
+ {
+ if (!m_keyed)
+ KeyHash();
+ m_hash.TruncatedFinal(digest, digestSize);
+ m_keyed = false;
+ }
+
+ unsigned int DigestSize() const
+ {return m_hash.DigestSize();}
+ unsigned int BlockSize() const
+ {return m_hash.BlockSize();}
+ unsigned int OptimalBlockSize() const
+ {return m_hash.OptimalBlockSize();}
+ unsigned int OptimalDataAlignment() const
+ {return m_hash.OptimalDataAlignment();}
+
+protected:
+ void KeyHash()
+ {
+ m_hash.Update(m_key, m_key.size());
+ m_keyed = true;
+ }
+
+ T_Hash m_hash;
+ bool m_keyed;
SecByteBlock m_key;
};
/// Panama MAC
template
-class PanamaMAC : public MessageAuthenticationCodeImpl >
+class PanamaMAC : public HermeticHashFunctionMAC >
{
public:
PanamaMAC() {}
- PanamaMAC(const byte *key, unsigned int length=PanamaMAC_Base::DEFAULT_KEYLENGTH)
+ PanamaMAC(const byte *key, unsigned int length)
{this->SetKey(key, length);}
};
-//! .
+//! algorithm info
template
struct PanamaCipherInfo : public VariableKeyLength<32, 32, 64, 32, SimpleKeyingInterface::NOT_RESYNCHRONIZABLE>
{
static const char * StaticAlgorithmName() {return B::ToEnum() == BIG_ENDIAN_ORDER ? "Panama-BE" : "Panama-LE";}
};
-//! .
+//! _
template
class PanamaCipherPolicy : public AdditiveCipherConcretePolicy,
public PanamaCipherInfo,
diff --git a/pkcspad.h b/pkcspad.h
index ed93a934..93bc3f17 100644
--- a/pkcspad.h
+++ b/pkcspad.h
@@ -28,6 +28,18 @@ public:
static const unsigned int length;
};
+// PKCS_DigestDecoration can be instantiated with the following
+// classes as specified in PKCS#1 v2.0 and P1363a
+class SHA;
+class MD2;
+class MD5;
+class RIPEMD160;
+class Tiger;
+class SHA256;
+class SHA384;
+class SHA512;
+// end of list
+
//! EMSA-PKCS1-v1_5
class CRYPTOPP_DLL PKCS1v15_SignatureMessageEncodingMethod : public PK_DeterministicSignatureMessageEncodingMethod
{
@@ -51,8 +63,12 @@ public:
};
};
-//! PKCS #1 version 1.5, for use with RSAES and RSASSA
-/*! The following hash functions are supported for signature: SHA, MD2, MD5, RIPEMD160, SHA256, SHA384, SHA512. */
+//! PKCS #1 version 1.5, for use with RSAES and RSASS
+/*! Only the following hash functions are supported by this signature standard:
+ \dontinclude pkcspad.h
+ \skip can be instantiated
+ \until end of list
+*/
struct PKCS1v15 : public SignatureStandard, public EncryptionStandard
{
typedef PKCS_EncryptionPaddingScheme EncryptionMessageEncodingMethod;
@@ -63,17 +79,6 @@ struct PKCS1v15 : public SignatureStandard, public EncryptionStandard
CRYPTOPP_DLL_TEMPLATE_CLASS PKCS_DigestDecoration;
#endif
-// PKCS_DecoratedHashModule can be instantiated with the following
-// classes as specified in PKCS#1 v2.0 and P1363a
-class SHA;
-class MD2;
-class MD5;
-class RIPEMD160;
-class Tiger;
-class SHA256;
-class SHA384;
-class SHA512;
-
NAMESPACE_END
#endif
diff --git a/pssr.h b/pssr.h
index 0bdf3156..9e12e90d 100644
--- a/pssr.h
+++ b/pssr.h
@@ -33,7 +33,7 @@ template struct EMSA2HashId
static const byte id;
};
-// EMSA2HashId can be instantiated with the following two classes.
+// EMSA2HashId can be instantiated with the following classes.
class SHA;
class RIPEMD160;
class RIPEMD128;
@@ -41,6 +41,7 @@ class SHA256;
class SHA384;
class SHA512;
class Whirlpool;
+// end of list
template
class EMSA2HashIdLookup : public BASE
diff --git a/pubkey.h b/pubkey.h
index cf3b0e18..9bd31d3d 100644
--- a/pubkey.h
+++ b/pubkey.h
@@ -44,7 +44,7 @@
NAMESPACE_BEGIN(CryptoPP)
-//! .
+//! _
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE TrapdoorFunctionBounds
{
public:
@@ -56,7 +56,7 @@ public:
virtual Integer MaxImage() const {return --ImageBound();}
};
-//! .
+//! _
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE RandomizedTrapdoorFunction : public TrapdoorFunctionBounds
{
public:
@@ -64,7 +64,7 @@ public:
virtual bool IsRandomized() const {return true;}
};
-//! .
+//! _
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE TrapdoorFunction : public RandomizedTrapdoorFunction
{
public:
@@ -75,7 +75,7 @@ public:
virtual Integer ApplyFunction(const Integer &x) const =0;
};
-//! .
+//! _
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE RandomizedTrapdoorFunctionInverse
{
public:
@@ -85,7 +85,7 @@ public:
virtual bool IsRandomized() const {return true;}
};
-//! .
+//! _
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE TrapdoorFunctionInverse : public RandomizedTrapdoorFunctionInverse
{
public:
@@ -118,7 +118,7 @@ public:
// ********************************************************
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE TF_Base
{
@@ -134,6 +134,7 @@ protected:
// ********************************************************
+//! _
template
class CRYPTOPP_NO_VTABLE PK_FixedLengthCryptoSystemImpl : public BASE
{
@@ -147,7 +148,7 @@ public:
virtual unsigned int FixedCiphertextLength() const =0;
};
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE TF_CryptoSystemBase : public PK_FixedLengthCryptoSystemImpl, protected BASE
{
@@ -161,14 +162,14 @@ protected:
unsigned int PaddedBlockBitLength() const {return this->GetTrapdoorFunctionBounds().PreimageBound().BitCount()-1;}
};
-//! .
+//! _
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE TF_DecryptorBase : public TF_CryptoSystemBase >
{
public:
DecodingResult Decrypt(RandomNumberGenerator &rng, const byte *ciphertext, unsigned int ciphertextLength, byte *plaintext, const NameValuePairs ¶meters = g_nullNameValuePairs) const;
};
-//! .
+//! _
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE TF_EncryptorBase : public TF_CryptoSystemBase >
{
public:
@@ -179,7 +180,7 @@ public:
typedef std::pair HashIdentifier;
-//! .
+//! interface for message encoding method for public key signature schemes
class CRYPTOPP_NO_VTABLE PK_SignatureMessageEncodingMethod
{
public:
@@ -302,7 +303,7 @@ public:
HashTransformation & AccessHash() {return this->m_object;}
};
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE TF_SignatureSchemeBase : public INTERFACE, protected BASE
{
@@ -328,7 +329,7 @@ protected:
virtual unsigned int GetDigestSize() const =0;
};
-//! .
+//! _
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE TF_SignerBase : public TF_SignatureSchemeBase >
{
public:
@@ -336,7 +337,7 @@ public:
unsigned int SignAndRestart(RandomNumberGenerator &rng, PK_MessageAccumulator &messageAccumulator, byte *signature, bool restart=true) const;
};
-//! .
+//! _
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE TF_VerifierBase : public TF_SignatureSchemeBase >
{
public:
@@ -347,7 +348,7 @@ public:
// ********************************************************
-//! .
+//! _
template
struct TF_CryptoSchemeOptions
{
@@ -358,14 +359,14 @@ struct TF_CryptoSchemeOptions
typedef T3 MessageEncodingMethod;
};
-//! .
+//! _
template
struct TF_SignatureSchemeOptions : public TF_CryptoSchemeOptions
{
typedef T4 HashFunction;
};
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE PublicKeyCopier
{
@@ -374,7 +375,7 @@ public:
virtual void CopyKeyInto(typename KEYS::PublicKey &key) const =0;
};
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE PrivateKeyCopier
{
@@ -384,7 +385,7 @@ public:
virtual void CopyKeyInto(typename KEYS::PrivateKey &key) const =0;
};
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE TF_ObjectImplBase : public AlgorithmImpl
{
@@ -433,7 +434,7 @@ protected:
}
};
-//! .
+//! _
template
class TF_ObjectImplExtRef : public TF_ObjectImplBase
{
@@ -448,7 +449,7 @@ private:
const KEY * m_pKey;
};
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE TF_ObjectImpl : public TF_ObjectImplBase, SCHEME_OPTIONS, typename KEY_COPIER::KeyClass>
{
@@ -465,25 +466,25 @@ private:
KeyClass m_trapdoorFunction;
};
-//! .
+//! _
template
class TF_DecryptorImpl : public TF_ObjectImpl >
{
};
-//! .
+//! _
template
class TF_EncryptorImpl : public TF_ObjectImpl >
{
};
-//! .
+//! _
template
class TF_SignerImpl : public TF_ObjectImpl >
{
};
-//! .
+//! _
template
class TF_VerifierImpl : public TF_ObjectImpl >
{
@@ -491,6 +492,7 @@ class TF_VerifierImpl : public TF_ObjectImpl
class P1363_KDF2
{
@@ -527,14 +529,14 @@ public:
// ********************************************************
-// to be thrown by DecodeElement and AgreeWithStaticPrivateKey
+//! to be thrown by DecodeElement and AgreeWithStaticPrivateKey
class DL_BadElement : public InvalidDataFormat
{
public:
DL_BadElement() : InvalidDataFormat("CryptoPP: invalid group element") {}
};
-//! .
+//! interface for DL group parameters
template
class CRYPTOPP_NO_VTABLE DL_GroupParameters : public CryptoParameters
{
@@ -626,7 +628,7 @@ private:
mutable unsigned int m_validationLevel;
};
-//! .
+//! _
template , class BASE = DL_GroupParameters >
class DL_GroupParametersImpl : public BASE
{
@@ -644,7 +646,7 @@ protected:
BASE_PRECOMP m_gpc;
};
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE DL_Key
{
@@ -653,7 +655,7 @@ public:
virtual DL_GroupParameters & AccessAbstractGroupParameters() =0;
};
-//! .
+//! interface for DL public keys
template
class CRYPTOPP_NO_VTABLE DL_PublicKey : public DL_Key
{
@@ -688,7 +690,7 @@ public:
virtual DL_FixedBasePrecomputation & AccessPublicPrecomputation() =0;
};
-//! .
+//! interface for DL private keys
template
class CRYPTOPP_NO_VTABLE DL_PrivateKey : public DL_Key
{
@@ -736,7 +738,7 @@ void DL_PublicKey::AssignFrom(const NameValuePairs &source)
class OID;
-//! .
+//! _
template
class DL_KeyImpl : public PK
{
@@ -763,7 +765,7 @@ private:
class X509PublicKey;
class PKCS8PrivateKey;
-//! .
+//! _
template
class DL_PrivateKeyImpl : public DL_PrivateKey, public DL_KeyImpl
{
@@ -834,7 +836,7 @@ private:
Integer m_x;
};
-//! .
+//! _
template
class DL_PrivateKey_WithSignaturePairwiseConsistencyTest : public BASE
{
@@ -852,7 +854,7 @@ public:
}
};
-//! .
+//! _
template
class DL_PublicKeyImpl : public DL_PublicKey, public DL_KeyImpl
{
@@ -913,7 +915,7 @@ private:
typename GP::BasePrecomputation m_ypc;
};
-//! .
+//! interface for Elgamal-like signature algorithms
template
class CRYPTOPP_NO_VTABLE DL_ElgamalLikeSignatureAlgorithm
{
@@ -928,7 +930,7 @@ public:
{return params.GetSubgroupOrder().ByteCount();}
};
-//! .
+//! interface for DL key agreement algorithms
template
class CRYPTOPP_NO_VTABLE DL_KeyAgreementAlgorithm
{
@@ -939,7 +941,7 @@ public:
virtual Element AgreeWithStaticPrivateKey(const DL_GroupParameters ¶ms, const Element &publicElement, bool validateOtherPublicKey, const Integer &privateExponent) const =0;
};
-//! .
+//! interface for key derivation algorithms used in DL cryptosystems
template
class CRYPTOPP_NO_VTABLE DL_KeyDerivationAlgorithm
{
@@ -948,7 +950,7 @@ public:
virtual void Derive(const DL_GroupParameters &groupParams, byte *derivedKey, unsigned int derivedLength, const T &agreedElement, const T &ephemeralPublicKey, const NameValuePairs &derivationParams) const =0;
};
-//! .
+//! interface for symmetric encryption algorithms used in DL cryptosystems
class CRYPTOPP_NO_VTABLE DL_SymmetricEncryptionAlgorithm
{
public:
@@ -960,7 +962,7 @@ public:
virtual DecodingResult SymmetricDecrypt(const byte *key, const byte *ciphertext, unsigned int ciphertextLength, byte *plaintext, const NameValuePairs ¶meters) const =0;
};
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE DL_Base
{
@@ -975,7 +977,7 @@ protected:
virtual const KeyInterface & GetKeyInterface() const =0;
};
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE DL_SignatureSchemeBase : public INTERFACE, public DL_Base
{
@@ -1007,7 +1009,7 @@ protected:
virtual unsigned int GetDigestSize() const =0;
};
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE DL_SignerBase : public DL_SignatureSchemeBase >
{
@@ -1080,7 +1082,7 @@ protected:
}
};
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE DL_VerifierBase : public DL_SignatureSchemeBase >
{
@@ -1148,7 +1150,7 @@ public:
}
};
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE DL_CryptoSystemBase : public PK, public DL_Base
{
@@ -1176,7 +1178,7 @@ protected:
virtual const DL_SymmetricEncryptionAlgorithm & GetSymmetricEncryptionAlgorithm() const =0;
};
-//! .
+//! _
template
class CRYPTOPP_NO_VTABLE DL_DecryptorBase : public DL_CryptoSystemBase