From a2828f6ae67c3d7294118a8144b1b2ec431237c4 Mon Sep 17 00:00:00 2001 From: weidai Date: Thu, 22 Jul 2004 00:51:57 +0000 Subject: fix documentation, fix PanamaMAC, fix algorithm names git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@186 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- pubkey.h | 124 ++++++++++++++++++++++++++++++++------------------------------- 1 file changed, 63 insertions(+), 61 deletions(-) (limited to 'pubkey.h') diff --git a/pubkey.h b/pubkey.h index cf3b0e1..9bd31d3 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 > { @@ -1212,7 +1214,7 @@ public: } }; -//! . +//! _ template class CRYPTOPP_NO_VTABLE DL_EncryptorBase : public DL_CryptoSystemBase > { @@ -1242,7 +1244,7 @@ public: } }; -//! . +//! _ template struct DL_SchemeOptionsBase { @@ -1251,7 +1253,7 @@ struct DL_SchemeOptionsBase typedef typename GroupParameters::Element Element; }; -//! . +//! _ template struct DL_KeyedSchemeOptions : public DL_SchemeOptionsBase { @@ -1260,7 +1262,7 @@ struct DL_KeyedSchemeOptions : public DL_SchemeOptionsBase struct DL_SignatureSchemeOptions : public DL_KeyedSchemeOptions { @@ -1269,7 +1271,7 @@ struct DL_SignatureSchemeOptions : public DL_KeyedSchemeOptions typedef T5 HashFunction; }; -//! . +//! _ template struct DL_CryptoSchemeOptions : public DL_KeyedSchemeOptions { @@ -1278,7 +1280,7 @@ struct DL_CryptoSchemeOptions : public DL_KeyedSchemeOptions typedef T5 SymmetricEncryptionAlgorithm; }; -//! . +//! _ template class CRYPTOPP_NO_VTABLE DL_ObjectImplBase : public AlgorithmImpl { @@ -1313,7 +1315,7 @@ private: KEY m_key; }; -//! . +//! _ template class CRYPTOPP_NO_VTABLE DL_ObjectImpl : public DL_ObjectImplBase { @@ -1335,7 +1337,7 @@ protected: {return Singleton().Ref();} }; -//! . +//! _ template class CRYPTOPP_NO_VTABLE DL_PublicObjectImpl : public DL_ObjectImpl, public PublicKeyCopier { @@ -1344,7 +1346,7 @@ public: {key = this->GetKey();} }; -//! . +//! _ template class CRYPTOPP_NO_VTABLE DL_PrivateObjectImpl : public DL_ObjectImpl, public PrivateKeyCopier { @@ -1355,7 +1357,7 @@ public: {key = this->GetKey();} }; -//! . +//! _ template class DL_SignerImpl : public DL_PrivateObjectImpl, SCHEME_OPTIONS> { @@ -1368,7 +1370,7 @@ public: } }; -//! . +//! _ template class DL_VerifierImpl : public DL_PublicObjectImpl, SCHEME_OPTIONS> { @@ -1379,13 +1381,13 @@ public: } }; -//! . +//! _ template class DL_EncryptorImpl : public DL_PublicObjectImpl, SCHEME_OPTIONS> { }; -//! . +//! _ template class DL_DecryptorImpl : public DL_PrivateObjectImpl, SCHEME_OPTIONS> { @@ -1393,7 +1395,7 @@ class DL_DecryptorImpl : public DL_PrivateObjectImpl class CRYPTOPP_NO_VTABLE DL_SimpleKeyAgreementDomainBase : public SimpleKeyAgreementDomain { @@ -1459,7 +1461,7 @@ public: typedef ELEMENT Element; static const char *StaticAlgorithmName() - {return COFACTOR_OPTION::ToEnum() == NO_COFACTOR_MULTIPLICTION ? "DH" : "DHC";} + {return COFACTOR_OPTION::ToEnum() == INCOMPATIBLE_COFACTOR_MULTIPLICTION ? "DHC" : "DH";} Element AgreeWithEphemeralPrivateKey(const DL_GroupParameters ¶ms, const DL_FixedBasePrecomputation &publicPrecomputation, const Integer &privateExponent) const { -- cgit v1.2.1