Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
noloader committed Jan 23, 2018
1 parent 27cbfe0 commit e3d79bf
Show file tree
Hide file tree
Showing 8 changed files with 54 additions and 3 deletions.
2 changes: 2 additions & 0 deletions gost.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
NAMESPACE_BEGIN(CryptoPP)

/// \brief GOST block cipher information
/// \since Crypto++ 2.1
struct GOST_Info : public FixedBlockSize<8>, public FixedKeyLength<32>
{
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "GOST";}
};

/// \brief GOST block cipher
/// \sa <a href="http://www.cryptopp.com/wiki/GOST">GOST</a>
/// \since Crypto++ 2.1
class GOST : public GOST_Info, public BlockCipherDocumentation
{
/// \brief GOST block cipher default operation
Expand Down
2 changes: 2 additions & 0 deletions hmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ NAMESPACE_BEGIN(CryptoPP)

/// \brief HMAC information
/// \details HMAC_Base derives from VariableKeyLength and MessageAuthenticationCode
/// \since Crypto++ 2.1
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE HMAC_Base : public VariableKeyLength<16, 0, INT_MAX>, public MessageAuthenticationCode
{
public:
Expand Down Expand Up @@ -44,6 +45,7 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE HMAC_Base : public VariableKeyLength<16, 0
/// \details HMAC derives from MessageAuthenticationCodeImpl. It calculates the HMAC using
/// <tt>HMAC(K, text) = H(K XOR opad, H(K XOR ipad, text))</tt>.
/// \sa <a href="http://www.weidai.com/scan-mirror/mac.html#HMAC">HMAC</a>
/// \since Crypto++ 2.1
template <class T>
class HMAC : public MessageAuthenticationCodeImpl<HMAC_Base, HMAC<T> >
{
Expand Down
16 changes: 14 additions & 2 deletions luc.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/// \details This class is here for historical and pedagogical interest. It has no practical advantages over other
/// trapdoor functions and probably shouldn't be used in production software. The discrete log based LUC schemes
/// defined later in this .h file may be of more practical interest.
/// \since Crypto++ 2.1

#ifndef CRYPTOPP_LUC_H
#define CRYPTOPP_LUC_H
Expand Down Expand Up @@ -33,6 +34,7 @@ NAMESPACE_BEGIN(CryptoPP)
/// \details This class is here for historical and pedagogical interest. It has no practical advantages over other
/// trapdoor functions and probably shouldn't be used in production software. The discrete log based LUC schemes
/// defined later in this .h file may be of more practical interest.
/// \since Crypto++ 2.1
class LUCFunction : public TrapdoorFunction, public PublicKey
{
typedef LUCFunction ThisClass;
Expand Down Expand Up @@ -72,6 +74,7 @@ class LUCFunction : public TrapdoorFunction, public PublicKey
/// \details This class is here for historical and pedagogical interest. It has no practical advantages over other
/// trapdoor functions and probably shouldn't be used in production software. The discrete log based LUC schemes
/// defined later in this .h file may be of more practical interest.
/// \since Crypto++ 2.1
class InvertibleLUCFunction : public LUCFunction, public TrapdoorFunctionInverse, public PrivateKey
{
typedef InvertibleLUCFunction ThisClass;
Expand Down Expand Up @@ -124,6 +127,7 @@ class InvertibleLUCFunction : public LUCFunction, public TrapdoorFunctionInverse
};

/// \brief LUC cryptosystem
/// \since Crypto++ 2.1
struct LUC
{
static std::string StaticAlgorithmName() {return "LUC";}
Expand All @@ -136,6 +140,7 @@ struct LUC
/// \details This class is here for historical and pedagogical interest. It has no practical advantages over other
/// trapdoor functions and probably shouldn't be used in production software. The discrete log based LUC schemes
/// defined later in this .h file may be of more practical interest.
/// \since Crypto++ 2.1
template <class STANDARD>
struct LUCES : public TF_ES<LUC, STANDARD>
{
Expand All @@ -147,6 +152,7 @@ struct LUCES : public TF_ES<LUC, STANDARD>
/// \details This class is here for historical and pedagogical interest. It has no practical advantages over other
/// trapdoor functions and probably shouldn't be used in production software. The discrete log based LUC schemes
/// defined later in this .h file may be of more practical interest.
/// \since Crypto++ 2.1
template <class STANDARD, class H>
struct LUCSS : public TF_SS<LUC, STANDARD, H>
{
Expand Down Expand Up @@ -179,7 +185,8 @@ class DL_GroupPrecomputation_LUC : public DL_GroupPrecomputation<Integer>
Integer m_p;
};

/// _
/// \brief LUC Precomputation
/// \since Crypto++ 2.1
class DL_BasePrecomputation_LUC : public DL_FixedBasePrecomputation<Integer>
{
public:
Expand Down Expand Up @@ -210,6 +217,7 @@ class DL_BasePrecomputation_LUC : public DL_FixedBasePrecomputation<Integer>
};

/// \brief LUC GroupParameters specialization
/// \since Crypto++ 2.1
class DL_GroupParameters_LUC : public DL_GroupParameters_IntegerBasedImpl<DL_GroupPrecomputation_LUC, DL_BasePrecomputation_LUC>
{
public:
Expand Down Expand Up @@ -240,6 +248,7 @@ class DL_GroupParameters_LUC : public DL_GroupParameters_IntegerBasedImpl<DL_Gro
};

/// \brief GF(p) group parameters that default to safe primes
/// \since Crypto++ 2.1
class DL_GroupParameters_LUC_DefaultSafePrime : public DL_GroupParameters_LUC
{
public:
Expand All @@ -250,6 +259,7 @@ class DL_GroupParameters_LUC_DefaultSafePrime : public DL_GroupParameters_LUC
};

/// \brief LUC HMP signature algorithm
/// \since Crypto++ 2.1
class DL_Algorithm_LUC_HMP : public DL_ElgamalLikeSignatureAlgorithm<Integer>
{
public:
Expand All @@ -265,6 +275,7 @@ class DL_Algorithm_LUC_HMP : public DL_ElgamalLikeSignatureAlgorithm<Integer>
};

/// \brief LUC signature keys
/// \since Crypto++ 2.1
struct DL_SignatureKeys_LUC
{
typedef DL_GroupParameters_LUC GroupParameters;
Expand All @@ -277,6 +288,7 @@ struct DL_SignatureKeys_LUC
/// \details This class is here for historical and pedagogical interest. It has no practical advantages over other
/// trapdoor functions and probably shouldn't be used in production software. The discrete log based LUC schemes
/// defined later in this .h file may be of more practical interest.
/// \since Crypto++ 2.1
template <class H>
struct LUC_HMP : public DL_SS<DL_SignatureKeys_LUC, DL_Algorithm_LUC_HMP, DL_SignatureMessageEncodingMethod_DSA, H>
{
Expand All @@ -296,7 +308,7 @@ struct DL_CryptoKeys_LUC
/// \tparam DHAES_MODE flag indicating if the MAC includes additional context parameters such as <em>u·V</em>, <em>v·U</em> and label
/// \tparam LABEL_OCTETS flag indicating if the label size is specified in octets or bits
/// \sa CofactorMultiplicationOption
/// \since Crypto++ 4.0, Crypto++ 5.7 for Bouncy Castle and Botan compatibility
/// \since Crypto++ 2.1, Crypto++ 5.7 for Bouncy Castle and Botan compatibility
template <class HASH = SHA1, class COFACTOR_OPTION = NoCofactorMultiplication, bool DHAES_MODE = true, bool LABEL_OCTETS = false>
struct LUC_IES
: public DL_ES<
Expand Down
10 changes: 10 additions & 0 deletions oaep.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// oaep.h - originally written and placed in the public domain by Wei Dai

/// \file oaep.h
/// \brief Classes for optimal asymmetric encryption padding
/// \since Crypto++ 2.1

#ifndef CRYPTOPP_OAEP_H
#define CRYPTOPP_OAEP_H

Expand All @@ -8,6 +14,7 @@
NAMESPACE_BEGIN(CryptoPP)

/// \brief OAEP padding base class
/// \since Crypto++ 2.1
class CRYPTOPP_DLL OAEP_Base : public PK_EncryptionMessageEncodingMethod
{
public:
Expand All @@ -23,7 +30,10 @@ class CRYPTOPP_DLL OAEP_Base : public PK_EncryptionMessageEncodingMethod
};

/// \brief OAEP padding
/// \tparam H HashTransformation derived class
/// \tparam MGF MaskGeneratingFunction derived class
/// \sa <a href="http://www.weidai.com/scan-mirror/ca.html#cem_OAEP-MGF1">EME-OAEP</a>, for use with classes derived from TF_ES
/// \since Crypto++ 2.1
template <class H, class MGF=P1363_MGF1>
class OAEP : public OAEP_Base, public EncryptionStandard
{
Expand Down
7 changes: 7 additions & 0 deletions pssr.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/// \file pssr.h
/// \brief Classes for probablistic signature schemes
/// \since Crypto++ 2.1

#ifndef CRYPTOPP_PSSR_H
#define CRYPTOPP_PSSR_H
Expand All @@ -17,6 +18,7 @@
NAMESPACE_BEGIN(CryptoPP)

/// \brief PSSR Message Encoding Method interface
/// \since Crypto++ 2.1
class CRYPTOPP_DLL PSSR_MEM_Base : public PK_RecoverableSignatureMessageEncodingMethod
{
public:
Expand Down Expand Up @@ -46,6 +48,7 @@ class CRYPTOPP_DLL PSSR_MEM_Base : public PK_RecoverableSignatureMessageEncoding

/// \brief PSSR Message Encoding Method with Hash Identifier
/// \tparam USE_HASH_ID flag indicating whether the HashId is used
/// \since Crypto++ 2.1
template <bool USE_HASH_ID> class PSSR_MEM_BaseWithHashId;

/// \brief PSSR Message Encoding Method with Hash Identifier
Expand All @@ -54,6 +57,7 @@ template<> class PSSR_MEM_BaseWithHashId<true> : public EMSA2HashIdLookup<PSSR_M

/// \brief PSSR Message Encoding Method without Hash Identifier
/// \details If USE_HASH_ID is false, then PSSR_MEM_Base is used for the base class
/// \since Crypto++ 2.1
template<> class PSSR_MEM_BaseWithHashId<false> : public PSSR_MEM_Base {};

/// \brief PSSR Message Encoding Method
Expand All @@ -65,6 +69,7 @@ template<> class PSSR_MEM_BaseWithHashId<false> : public PSSR_MEM_Base {};
/// \details If ALLOW_RECOVERY is true, the the signature scheme provides message recovery. If
/// ALLOW_RECOVERY is false, the the signature scheme is appendix, and the message must be
/// provided during verification.
/// \since Crypto++ 2.1
template <bool ALLOW_RECOVERY, class MGF=P1363_MGF1, int SALT_LEN=-1, int MIN_PAD_LEN=0, bool USE_HASH_ID=false>
class PSSR_MEM : public PSSR_MEM_BaseWithHashId<USE_HASH_ID>
{
Expand All @@ -80,6 +85,7 @@ class PSSR_MEM : public PSSR_MEM_BaseWithHashId<USE_HASH_ID>
/// \brief Probabilistic Signature Scheme with Recovery
/// \details Signature Schemes with Recovery encode the message with the signature.
/// \sa <a href="http://www.weidai.com/scan-mirror/sig.html#sem_PSSR-MGF1">PSSR-MGF1</a>
/// \since Crypto++ 2.1
struct PSSR : public SignatureStandard
{
typedef PSSR_MEM<true> SignatureMessageEncodingMethod;
Expand All @@ -88,6 +94,7 @@ struct PSSR : public SignatureStandard
/// \brief Probabilistic Signature Scheme with Appendix
/// \details Signature Schemes with Appendix require the message to be provided during verification.
/// \sa <a href="http://www.weidai.com/scan-mirror/sig.html#sem_PSS-MGF1">PSS-MGF1</a>
/// \since Crypto++ 2.1
struct PSS : public SignatureStandard
{
typedef PSSR_MEM<false> SignatureMessageEncodingMethod;
Expand Down
4 changes: 4 additions & 0 deletions ripemd.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ NAMESPACE_BEGIN(CryptoPP)
/// \brief RIPEMD-160 message digest
/// \details Digest size is 160-bits.
/// \sa <a href="http://www.weidai.com/scan-mirror/md.html#RIPEMD-160">RIPEMD-160</a>
/// \since Crypto++ 2.1
class RIPEMD160 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 20, RIPEMD160>
{
public:
Expand All @@ -24,6 +25,7 @@ class RIPEMD160 : public IteratedHashWithStaticTransform<word32, LittleEndian, 6
/// \brief RIPEMD-320 message digest
/// \details Digest size is 320-bits.
/// \sa <a href="http://www.weidai.com/scan-mirror/md.html#RIPEMD-320">RIPEMD-320</a>
/// \since Crypto++ 2.1
class RIPEMD320 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 40, RIPEMD320>
{
public:
Expand All @@ -36,6 +38,7 @@ class RIPEMD320 : public IteratedHashWithStaticTransform<word32, LittleEndian, 6
/// \details Digest size is 128-bits.
/// \warning RIPEMD-128 is considered insecure, and should not be used unless you absolutely need it for compatibility.
/// \sa <a href="http://www.weidai.com/scan-mirror/md.html#RIPEMD-128">RIPEMD-128</a>
/// \since Crypto++ 2.1
class RIPEMD128 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 16, RIPEMD128>
{
public:
Expand All @@ -48,6 +51,7 @@ class RIPEMD128 : public IteratedHashWithStaticTransform<word32, LittleEndian, 6
/// \details Digest size is 256-bits.
/// \warning RIPEMD-256 is considered insecure, and should not be used unless you absolutely need it for compatibility.
/// \sa <a href="http://www.weidai.com/scan-mirror/md.html#RIPEMD-256">RIPEMD-256</a>
/// \since Crypto++ 2.1
class RIPEMD256 : public IteratedHashWithStaticTransform<word32, LittleEndian, 64, 32, RIPEMD256>
{
public:
Expand Down
6 changes: 6 additions & 0 deletions shark.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

/// \file shark.h
/// \brief Classes for the SHARK block cipher
/// \since Crypto++ 2.1

#ifndef CRYPTOPP_SHARK_H
#define CRYPTOPP_SHARK_H
Expand All @@ -13,16 +14,19 @@
NAMESPACE_BEGIN(CryptoPP)

/// \brief SHARK block cipher information
/// \since Crypto++ 2.1
struct SHARK_Info : public FixedBlockSize<8>, public FixedKeyLength<16>, public VariableRounds<6, 2>
{
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "SHARK-E";}
};

/// \brief SHARK block cipher
/// <a href="http://www.cryptopp.com/wiki/SHARK-E">SHARK-E</a>
/// \since Crypto++ 2.1
class SHARK : public SHARK_Info, public BlockCipherDocumentation
{
/// \brief SHARK block cipher default operation
/// \since Crypto++ 2.1
class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<SHARK_Info>
{
public:
Expand All @@ -34,6 +38,7 @@ class SHARK : public SHARK_Info, public BlockCipherDocumentation
};

/// \brief SHARK block cipher encryption operation
/// \since Crypto++ 2.1
class CRYPTOPP_NO_VTABLE Enc : public Base
{
public:
Expand All @@ -48,6 +53,7 @@ class SHARK : public SHARK_Info, public BlockCipherDocumentation
};

/// \brief SHARK block cipher decryption operation
/// \since Crypto++ 2.1
class CRYPTOPP_NO_VTABLE Dec : public Base
{
public:
Expand Down
10 changes: 9 additions & 1 deletion tiger.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// tiger.h - originally written and placed in the public domain by Wei Dai

/// \file tiger.h
/// \brief Classes for the Tiger message digest
/// \since Crypto++ 2.1

#ifndef CRYPTOPP_TIGER_H
#define CRYPTOPP_TIGER_H

Expand All @@ -12,7 +18,9 @@

NAMESPACE_BEGIN(CryptoPP)

/// <a href="http://www.cryptolounge.org/wiki/Tiger">Tiger</a>
/// \brief Tiger message digest
/// \sa <a href="http://www.cryptolounge.org/wiki/Tiger">Tiger</a>
/// \since Crypto++ 2.1
class Tiger : public IteratedHashWithStaticTransform<word64, LittleEndian, 64, 24, Tiger>
{
public:
Expand Down

0 comments on commit e3d79bf

Please sign in to comment.