mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-23 01:49:41 +00:00
Fix semicolons yet again (GH #889)
So it looks like sed added a '\r' between the closing paren and the semi. Grepping for '^;' failed because the '\r' was considered part of the previous line, so it showed no hits. I finally had to write a C program to properly identify and fix those damn stray semicolons.
This commit is contained in:
parent
6f36f0db06
commit
9013cb60fb
@ -14,7 +14,7 @@ NAMESPACE_BEGIN(CryptoPP)
|
||||
class Adler32 : public HashTransformation
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 4)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 4);
|
||||
Adler32() {Reset();}
|
||||
void Update(const byte *input, size_t length);
|
||||
void TruncatedFinal(byte *hash, size_t size);
|
||||
|
2
aes.h
2
aes.h
@ -20,7 +20,7 @@ NAMESPACE_BEGIN(CryptoPP)
|
||||
/// \sa <a href="http://www.cryptolounge.org/wiki/AES">AES</a> winner, announced on 10/2/2000
|
||||
/// \since Rijndael since Crypto++ 3.1, Intel AES-NI since Crypto++ 5.6.1, ARMv8 AES since Crypto++ 6.0,
|
||||
/// Power8 AES since Crypto++ 6.0
|
||||
DOCUMENTED_TYPEDEF(Rijndael, AES)
;
|
||||
DOCUMENTED_TYPEDEF(Rijndael, AES);
|
||||
|
||||
typedef RijndaelEncryption AESEncryption;
|
||||
typedef RijndaelDecryption AESDecryption;
|
||||
|
4
arc4.h
4
arc4.h
@ -49,7 +49,7 @@ protected:
|
||||
/// \brief Alleged RC4
|
||||
/// \sa <a href="http://www.cryptopp.com/wiki/RC4">Alleged RC4</a>
|
||||
/// \since Crypto++ 3.1
|
||||
DOCUMENTED_TYPEDEF(SymmetricCipherFinal<ARC4_Base>, ARC4)
;
|
||||
DOCUMENTED_TYPEDEF(SymmetricCipherFinal<ARC4_Base>, ARC4);
|
||||
|
||||
/// \brief MARC4 base class
|
||||
/// \details Implementations and overrides in \p Base apply to both \p ENCRYPTION and \p DECRYPTION directions
|
||||
@ -70,7 +70,7 @@ protected:
|
||||
/// \brief Modified Alleged RC4
|
||||
/// \sa <a href="http://www.cryptopp.com/wiki/RC4">Alleged RC4</a>
|
||||
/// \since Crypto++ 3.1
|
||||
DOCUMENTED_TYPEDEF(SymmetricCipherFinal<MARC4_Base>, MARC4)
;
|
||||
DOCUMENTED_TYPEDEF(SymmetricCipherFinal<MARC4_Base>, MARC4);
|
||||
|
||||
}
|
||||
#if CRYPTOPP_ENABLE_NAMESPACE_WEAK >= 1
|
||||
|
72
blake2.h
72
blake2.h
@ -27,14 +27,14 @@ NAMESPACE_BEGIN(CryptoPP)
|
||||
struct BLAKE2s_Info : public VariableKeyLength<32,0,32,1,SimpleKeyingInterface::NOT_RESYNCHRONIZABLE>
|
||||
{
|
||||
typedef VariableKeyLength<32,0,32,1,SimpleKeyingInterface::NOT_RESYNCHRONIZABLE> KeyBase;
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH = KeyBase::MIN_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH = KeyBase::MAX_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = KeyBase::DEFAULT_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH = KeyBase::MIN_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH = KeyBase::MAX_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = KeyBase::DEFAULT_KEYLENGTH);
|
||||
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = 64)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 32)
;
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = 8)
;
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = 8)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = 64);
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 32);
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = 8);
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = 8);
|
||||
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "BLAKE2s";}
|
||||
};
|
||||
@ -44,14 +44,14 @@ struct BLAKE2s_Info : public VariableKeyLength<32,0,32,1,SimpleKeyingInterface::
|
||||
struct BLAKE2b_Info : public VariableKeyLength<64,0,64,1,SimpleKeyingInterface::NOT_RESYNCHRONIZABLE>
|
||||
{
|
||||
typedef VariableKeyLength<64,0,64,1,SimpleKeyingInterface::NOT_RESYNCHRONIZABLE> KeyBase;
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH = KeyBase::MIN_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH = KeyBase::MAX_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = KeyBase::DEFAULT_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH = KeyBase::MIN_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH = KeyBase::MAX_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = KeyBase::DEFAULT_KEYLENGTH);
|
||||
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = 128)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 64)
;
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = 16)
;
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = 16)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = 128);
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 64);
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = 16);
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = 16);
|
||||
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "BLAKE2b";}
|
||||
};
|
||||
@ -59,9 +59,9 @@ struct BLAKE2b_Info : public VariableKeyLength<64,0,64,1,SimpleKeyingInterface::
|
||||
/// \brief BLAKE2s parameter block
|
||||
struct CRYPTOPP_NO_VTABLE BLAKE2s_ParameterBlock
|
||||
{
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2s_Info::SALTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2s_Info::DIGESTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2s_Info::PERSONALIZATIONSIZE)
;
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2s_Info::SALTSIZE);
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2s_Info::DIGESTSIZE);
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2s_Info::PERSONALIZATIONSIZE);
|
||||
|
||||
BLAKE2s_ParameterBlock()
|
||||
{
|
||||
@ -110,9 +110,9 @@ struct CRYPTOPP_NO_VTABLE BLAKE2s_ParameterBlock
|
||||
/// \brief BLAKE2b parameter block
|
||||
struct CRYPTOPP_NO_VTABLE BLAKE2b_ParameterBlock
|
||||
{
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2b_Info::SALTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2b_Info::DIGESTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2b_Info::PERSONALIZATIONSIZE)
;
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2b_Info::SALTSIZE);
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2b_Info::DIGESTSIZE);
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2b_Info::PERSONALIZATIONSIZE);
|
||||
|
||||
BLAKE2b_ParameterBlock()
|
||||
{
|
||||
@ -185,7 +185,7 @@ struct CRYPTOPP_NO_VTABLE BLAKE2s_State
|
||||
}
|
||||
|
||||
// SSE4, Power7 and NEON depend upon t[] and f[] being side-by-side
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2s_Info::BLOCKSIZE)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2s_Info::BLOCKSIZE);
|
||||
FixedSizeAlignedSecBlock<word32, 8+2+2, true> m_hft;
|
||||
FixedSizeAlignedSecBlock<byte, BLOCKSIZE, true> m_buf;
|
||||
size_t m_len;
|
||||
@ -218,7 +218,7 @@ struct CRYPTOPP_NO_VTABLE BLAKE2b_State
|
||||
}
|
||||
|
||||
// SSE4, Power8 and NEON depend upon t[] and f[] being side-by-side
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2b_Info::BLOCKSIZE)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2b_Info::BLOCKSIZE);
|
||||
FixedSizeAlignedSecBlock<word64, 8+2+2, true> m_hft;
|
||||
FixedSizeAlignedSecBlock<byte, BLOCKSIZE, true> m_buf;
|
||||
size_t m_len;
|
||||
@ -237,14 +237,14 @@ struct CRYPTOPP_NO_VTABLE BLAKE2b_State
|
||||
class BLAKE2s : public SimpleKeyingInterfaceImpl<MessageAuthenticationCode, BLAKE2s_Info>
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = BLAKE2s_Info::DEFAULT_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH = BLAKE2s_Info::MIN_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH = BLAKE2s_Info::MAX_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = BLAKE2s_Info::DEFAULT_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH = BLAKE2s_Info::MIN_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH = BLAKE2s_Info::MAX_KEYLENGTH);
|
||||
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2s_Info::DIGESTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2s_Info::BLOCKSIZE)
;
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2s_Info::SALTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2s_Info::PERSONALIZATIONSIZE)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2s_Info::DIGESTSIZE);
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2s_Info::BLOCKSIZE);
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2s_Info::SALTSIZE);
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2s_Info::PERSONALIZATIONSIZE);
|
||||
|
||||
typedef BLAKE2s_State State;
|
||||
typedef BLAKE2s_ParameterBlock ParameterBlock;
|
||||
@ -344,14 +344,14 @@ private:
|
||||
class BLAKE2b : public SimpleKeyingInterfaceImpl<MessageAuthenticationCode, BLAKE2b_Info>
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = BLAKE2b_Info::DEFAULT_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH = BLAKE2b_Info::MIN_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH = BLAKE2b_Info::MAX_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH = BLAKE2b_Info::DEFAULT_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH = BLAKE2b_Info::MIN_KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH = BLAKE2b_Info::MAX_KEYLENGTH);
|
||||
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2b_Info::DIGESTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2b_Info::BLOCKSIZE)
;
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2b_Info::SALTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2b_Info::PERSONALIZATIONSIZE)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = BLAKE2b_Info::DIGESTSIZE);
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = BLAKE2b_Info::BLOCKSIZE);
|
||||
CRYPTOPP_CONSTANT(SALTSIZE = BLAKE2b_Info::SALTSIZE);
|
||||
CRYPTOPP_CONSTANT(PERSONALIZATIONSIZE = BLAKE2b_Info::PERSONALIZATIONSIZE);
|
||||
|
||||
typedef BLAKE2b_State State;
|
||||
typedef BLAKE2b_ParameterBlock ParameterBlock;
|
||||
|
20
cham.cpp
20
cham.cpp
@ -45,11 +45,11 @@ using CryptoPP::rotrConstant;
|
||||
template <unsigned int RR, unsigned int KW, class T>
|
||||
inline void CHAM_EncRound(T x[4], const T k[KW], unsigned int i)
|
||||
{
|
||||
CRYPTOPP_CONSTANT(IDX0 = (RR+0) % 4)
;
|
||||
CRYPTOPP_CONSTANT(IDX1 = (RR+1) % 4)
;
|
||||
CRYPTOPP_CONSTANT(IDX3 = (RR+3+1) % 4)
;
|
||||
CRYPTOPP_CONSTANT(R1 = (RR % 2 == 0) ? 1 : 8)
;
|
||||
CRYPTOPP_CONSTANT(R2 = (RR % 2 == 0) ? 8 : 1)
;
|
||||
CRYPTOPP_CONSTANT(IDX0 = (RR+0) % 4);
|
||||
CRYPTOPP_CONSTANT(IDX1 = (RR+1) % 4);
|
||||
CRYPTOPP_CONSTANT(IDX3 = (RR+3+1) % 4);
|
||||
CRYPTOPP_CONSTANT(R1 = (RR % 2 == 0) ? 1 : 8);
|
||||
CRYPTOPP_CONSTANT(R2 = (RR % 2 == 0) ? 8 : 1);
|
||||
|
||||
// Follows conventions in the ref impl
|
||||
const T kk = k[i % KW];
|
||||
@ -79,11 +79,11 @@ inline void CHAM_EncRound(T x[4], const T k[KW], unsigned int i)
|
||||
template <unsigned int RR, unsigned int KW, class T>
|
||||
inline void CHAM_DecRound(T x[4], const T k[KW], unsigned int i)
|
||||
{
|
||||
CRYPTOPP_CONSTANT(IDX0 = (RR+0) % 4)
;
|
||||
CRYPTOPP_CONSTANT(IDX1 = (RR+1) % 4)
;
|
||||
CRYPTOPP_CONSTANT(IDX3 = (RR+3+1) % 4)
;
|
||||
CRYPTOPP_CONSTANT(R1 = (RR % 2 == 0) ? 8 : 1)
;
|
||||
CRYPTOPP_CONSTANT(R2 = (RR % 2 == 0) ? 1 : 8)
;
|
||||
CRYPTOPP_CONSTANT(IDX0 = (RR+0) % 4);
|
||||
CRYPTOPP_CONSTANT(IDX1 = (RR+1) % 4);
|
||||
CRYPTOPP_CONSTANT(IDX3 = (RR+3+1) % 4);
|
||||
CRYPTOPP_CONSTANT(R1 = (RR % 2 == 0) ? 8 : 1);
|
||||
CRYPTOPP_CONSTANT(R2 = (RR % 2 == 0) ? 1 : 8);
|
||||
|
||||
// Follows conventions in the ref impl
|
||||
const T kk = k[i % KW];
|
||||
|
34
cpu.cpp
34
cpu.cpp
@ -328,8 +328,8 @@ void DetectX86Features()
|
||||
|
||||
// AVX is similar to SSE, but check both bits 27 (SSE) and 28 (AVX).
|
||||
// https://software.intel.com/en-us/blogs/2011/04/14/is-avx-enabled
|
||||
CRYPTOPP_CONSTANT(YMM_FLAG = (3 << 1))
;
|
||||
CRYPTOPP_CONSTANT(AVX_FLAG = (3 << 27))
;
|
||||
CRYPTOPP_CONSTANT(YMM_FLAG = (3 << 1));
|
||||
CRYPTOPP_CONSTANT(AVX_FLAG = (3 << 27));
|
||||
if ((cpuid1[2] & AVX_FLAG) == AVX_FLAG)
|
||||
{
|
||||
|
||||
@ -389,11 +389,11 @@ void DetectX86Features()
|
||||
|
||||
if (IsIntel(cpuid0))
|
||||
{
|
||||
CRYPTOPP_CONSTANT(RDRAND_FLAG = (1 << 30))
;
|
||||
CRYPTOPP_CONSTANT(RDSEED_FLAG = (1 << 18))
;
|
||||
CRYPTOPP_CONSTANT( ADX_FLAG = (1 << 19))
;
|
||||
CRYPTOPP_CONSTANT( SHA_FLAG = (1 << 29))
;
|
||||
CRYPTOPP_CONSTANT( AVX2_FLAG = (1 << 5))
;
|
||||
CRYPTOPP_CONSTANT(RDRAND_FLAG = (1 << 30));
|
||||
CRYPTOPP_CONSTANT(RDSEED_FLAG = (1 << 18));
|
||||
CRYPTOPP_CONSTANT( ADX_FLAG = (1 << 19));
|
||||
CRYPTOPP_CONSTANT( SHA_FLAG = (1 << 29));
|
||||
CRYPTOPP_CONSTANT( AVX2_FLAG = (1 << 5));
|
||||
|
||||
g_isP4 = ((cpuid1[0] >> 8) & 0xf) == 0xf;
|
||||
g_cacheLineSize = 8 * GETBYTE(cpuid1[1], 1);
|
||||
@ -412,11 +412,11 @@ void DetectX86Features()
|
||||
}
|
||||
else if (IsAMD(cpuid0) || IsHygon(cpuid0))
|
||||
{
|
||||
CRYPTOPP_CONSTANT(RDRAND_FLAG = (1 << 30))
;
|
||||
CRYPTOPP_CONSTANT(RDSEED_FLAG = (1 << 18))
;
|
||||
CRYPTOPP_CONSTANT( ADX_FLAG = (1 << 19))
;
|
||||
CRYPTOPP_CONSTANT( SHA_FLAG = (1 << 29))
;
|
||||
CRYPTOPP_CONSTANT( AVX2_FLAG = (1 << 5))
;
|
||||
CRYPTOPP_CONSTANT(RDRAND_FLAG = (1 << 30));
|
||||
CRYPTOPP_CONSTANT(RDSEED_FLAG = (1 << 18));
|
||||
CRYPTOPP_CONSTANT( ADX_FLAG = (1 << 19));
|
||||
CRYPTOPP_CONSTANT( SHA_FLAG = (1 << 29));
|
||||
CRYPTOPP_CONSTANT( AVX2_FLAG = (1 << 5));
|
||||
|
||||
CpuId(0x80000005, 0, cpuid2);
|
||||
g_cacheLineSize = GETBYTE(cpuid2[2], 0);
|
||||
@ -436,11 +436,11 @@ void DetectX86Features()
|
||||
else if (IsVIA(cpuid0))
|
||||
{
|
||||
// Two bits: available and enabled
|
||||
CRYPTOPP_CONSTANT( RNG_FLAGS = (0x3 << 2))
;
|
||||
CRYPTOPP_CONSTANT( ACE_FLAGS = (0x3 << 6))
;
|
||||
CRYPTOPP_CONSTANT(ACE2_FLAGS = (0x3 << 8))
;
|
||||
CRYPTOPP_CONSTANT( PHE_FLAGS = (0x3 << 10))
;
|
||||
CRYPTOPP_CONSTANT( PMM_FLAGS = (0x3 << 12))
;
|
||||
CRYPTOPP_CONSTANT( RNG_FLAGS = (0x3 << 2));
|
||||
CRYPTOPP_CONSTANT( ACE_FLAGS = (0x3 << 6));
|
||||
CRYPTOPP_CONSTANT(ACE2_FLAGS = (0x3 << 8));
|
||||
CRYPTOPP_CONSTANT( PHE_FLAGS = (0x3 << 10));
|
||||
CRYPTOPP_CONSTANT( PMM_FLAGS = (0x3 << 12));
|
||||
|
||||
CpuId(0xC0000000, 0, cpuid2);
|
||||
word32 extendedFeatures = cpuid2[0];
|
||||
|
4
crc.h
4
crc.h
@ -25,7 +25,7 @@ const word32 CRC32_NEGL = 0xffffffffL;
|
||||
class CRC32 : public HashTransformation
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 4)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 4);
|
||||
CRC32();
|
||||
void Update(const byte *input, size_t length);
|
||||
void TruncatedFinal(byte *hash, size_t size);
|
||||
@ -52,7 +52,7 @@ private:
|
||||
class CRC32C : public HashTransformation
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 4)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 4);
|
||||
CRC32C();
|
||||
void Update(const byte *input, size_t length);
|
||||
void TruncatedFinal(byte *hash, size_t size);
|
||||
|
50
default.h
50
default.h
@ -56,11 +56,11 @@ class MACBadErr : public DataDecryptorErr
|
||||
template <unsigned int BlockSize, unsigned int KeyLength, unsigned int DigestSize, unsigned int SaltSize, unsigned int Iterations>
|
||||
struct DataParametersInfo
|
||||
{
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = BlockSize)
;
|
||||
CRYPTOPP_CONSTANT(KEYLENGTH = KeyLength)
;
|
||||
CRYPTOPP_CONSTANT(SALTLENGTH = SaltSize)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = DigestSize)
;
|
||||
CRYPTOPP_CONSTANT(ITERATIONS = Iterations)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = BlockSize);
|
||||
CRYPTOPP_CONSTANT(KEYLENGTH = KeyLength);
|
||||
CRYPTOPP_CONSTANT(SALTLENGTH = SaltSize);
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = DigestSize);
|
||||
CRYPTOPP_CONSTANT(ITERATIONS = Iterations);
|
||||
};
|
||||
|
||||
typedef DataParametersInfo<LegacyBlockCipher::BLOCKSIZE, LegacyBlockCipher::DEFAULT_KEYLENGTH, LegacyHashModule::DIGESTSIZE, 8, 200> LegacyParametersInfo;
|
||||
@ -78,11 +78,11 @@ template <class BC, class H, class Info>
|
||||
class DataEncryptor : public ProxyFilter, public Info
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE)
;
|
||||
CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE);
|
||||
CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH);
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE);
|
||||
CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS);
|
||||
|
||||
/// \brief Construct a DataEncryptor
|
||||
/// \param passphrase a C-String password
|
||||
@ -116,11 +116,11 @@ template <class BC, class H, class Info>
|
||||
class DataDecryptor : public ProxyFilter, public Info
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE)
;
|
||||
CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE);
|
||||
CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH);
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE);
|
||||
CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS);
|
||||
|
||||
/// \brief Constructs a DataDecryptor
|
||||
/// \param passphrase a C-String password
|
||||
@ -173,11 +173,11 @@ template <class BC, class H, class MAC, class Info>
|
||||
class DataEncryptorWithMAC : public ProxyFilter
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE)
;
|
||||
CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE);
|
||||
CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH);
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE);
|
||||
CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS);
|
||||
|
||||
/// \brief Constructs a DataEncryptorWithMAC
|
||||
/// \param passphrase a C-String password
|
||||
@ -218,11 +218,11 @@ template <class BC, class H, class MAC, class Info>
|
||||
class DataDecryptorWithMAC : public ProxyFilter
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE)
;
|
||||
CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = Info::BLOCKSIZE);
|
||||
CRYPTOPP_CONSTANT(KEYLENGTH = Info::KEYLENGTH);
|
||||
CRYPTOPP_CONSTANT(SALTLENGTH = Info::SALTLENGTH);
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = Info::DIGESTSIZE);
|
||||
CRYPTOPP_CONSTANT(ITERATIONS = Info::ITERATIONS);
|
||||
|
||||
/// \brief Constructs a DataDecryptor
|
||||
/// \param passphrase a C-String password
|
||||
|
2
dmac.h
2
dmac.h
@ -17,7 +17,7 @@ template <class T>
|
||||
class CRYPTOPP_NO_VTABLE DMAC_Base : public SameKeyLengthAs<T>, public MessageAuthenticationCode
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE=T::BLOCKSIZE)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE=T::BLOCKSIZE);
|
||||
static std::string StaticAlgorithmName() {return std::string("DMAC(") + T::StaticAlgorithmName() + ")";}
|
||||
|
||||
virtual~DMAC_Base() {}
|
||||
|
48
drbg.h
48
drbg.h
@ -163,18 +163,18 @@ template <typename HASH=SHA256, unsigned int STRENGTH=128/8, unsigned int SEEDLE
|
||||
class Hash_DRBG : public NIST_DRBG, public NotCopyable
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(SECURITY_STRENGTH=STRENGTH)
;
|
||||
CRYPTOPP_CONSTANT(SEED_LENGTH=SEEDLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(MINIMUM_ENTROPY=STRENGTH)
;
|
||||
CRYPTOPP_CONSTANT(MINIMUM_NONCE=0)
;
|
||||
CRYPTOPP_CONSTANT(MINIMUM_ADDITIONAL=0)
;
|
||||
CRYPTOPP_CONSTANT(MINIMUM_PERSONALIZATION=0)
;
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_ENTROPY=INT_MAX)
;
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_NONCE=INT_MAX)
;
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_ADDITIONAL=INT_MAX)
;
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_PERSONALIZATION=INT_MAX)
;
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_BYTES_PER_REQUEST=65536)
;
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_REQUESTS_BEFORE_RESEED=INT_MAX)
;
|
||||
CRYPTOPP_CONSTANT(SECURITY_STRENGTH=STRENGTH);
|
||||
CRYPTOPP_CONSTANT(SEED_LENGTH=SEEDLENGTH);
|
||||
CRYPTOPP_CONSTANT(MINIMUM_ENTROPY=STRENGTH);
|
||||
CRYPTOPP_CONSTANT(MINIMUM_NONCE=0);
|
||||
CRYPTOPP_CONSTANT(MINIMUM_ADDITIONAL=0);
|
||||
CRYPTOPP_CONSTANT(MINIMUM_PERSONALIZATION=0);
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_ENTROPY=INT_MAX);
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_NONCE=INT_MAX);
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_ADDITIONAL=INT_MAX);
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_PERSONALIZATION=INT_MAX);
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_BYTES_PER_REQUEST=65536);
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_REQUESTS_BEFORE_RESEED=INT_MAX);
|
||||
|
||||
static std::string StaticAlgorithmName() { return std::string("Hash_DRBG(") + HASH::StaticAlgorithmName() + std::string(")"); }
|
||||
|
||||
@ -283,18 +283,18 @@ template <typename HASH=SHA256, unsigned int STRENGTH=128/8, unsigned int SEEDLE
|
||||
class HMAC_DRBG : public NIST_DRBG, public NotCopyable
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(SECURITY_STRENGTH=STRENGTH)
;
|
||||
CRYPTOPP_CONSTANT(SEED_LENGTH=SEEDLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(MINIMUM_ENTROPY=STRENGTH)
;
|
||||
CRYPTOPP_CONSTANT(MINIMUM_NONCE=0)
;
|
||||
CRYPTOPP_CONSTANT(MINIMUM_ADDITIONAL=0)
;
|
||||
CRYPTOPP_CONSTANT(MINIMUM_PERSONALIZATION=0)
;
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_ENTROPY=INT_MAX)
;
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_NONCE=INT_MAX)
;
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_ADDITIONAL=INT_MAX)
;
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_PERSONALIZATION=INT_MAX)
;
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_BYTES_PER_REQUEST=65536)
;
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_REQUESTS_BEFORE_RESEED=INT_MAX)
;
|
||||
CRYPTOPP_CONSTANT(SECURITY_STRENGTH=STRENGTH);
|
||||
CRYPTOPP_CONSTANT(SEED_LENGTH=SEEDLENGTH);
|
||||
CRYPTOPP_CONSTANT(MINIMUM_ENTROPY=STRENGTH);
|
||||
CRYPTOPP_CONSTANT(MINIMUM_NONCE=0);
|
||||
CRYPTOPP_CONSTANT(MINIMUM_ADDITIONAL=0);
|
||||
CRYPTOPP_CONSTANT(MINIMUM_PERSONALIZATION=0);
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_ENTROPY=INT_MAX);
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_NONCE=INT_MAX);
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_ADDITIONAL=INT_MAX);
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_PERSONALIZATION=INT_MAX);
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_BYTES_PER_REQUEST=65536);
|
||||
CRYPTOPP_CONSTANT(MAXIMUM_REQUESTS_BEFORE_RESEED=INT_MAX);
|
||||
|
||||
static std::string StaticAlgorithmName() { return std::string("HMAC_DRBG(") + HASH::StaticAlgorithmName() + std::string(")"); }
|
||||
|
||||
|
1
dsa.h
1
dsa.h
@ -46,4 +46,3 @@ size_t DSAConvertSignatureFormat(byte *buffer, size_t bufferSize, DSASignatureFo
|
||||
NAMESPACE_END
|
||||
|
||||
#endif // CRYPTOPP_DSA_H
|
||||
|
||||
|
@ -1095,13 +1095,13 @@ private:
|
||||
/// \details StringSink is a typedef for StringSinkTemplate<std::string>.
|
||||
/// \sa ArraySink, ArrayXorSink
|
||||
/// \since Crypto++ 4.0
|
||||
DOCUMENTED_TYPEDEF(StringSinkTemplate<std::string>, StringSink)
;
|
||||
DOCUMENTED_TYPEDEF(StringSinkTemplate<std::string>, StringSink);
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS StringSinkTemplate<std::string>;
|
||||
|
||||
/// \brief Append input to a std::vector<byte> object
|
||||
/// \details VectorSink is a typedef for StringSinkTemplate<std::vector<byte> >.
|
||||
/// \since Crypto++ 8.0
|
||||
DOCUMENTED_TYPEDEF(StringSinkTemplate<std::vector<byte> >, VectorSink)
;
|
||||
DOCUMENTED_TYPEDEF(StringSinkTemplate<std::vector<byte> >, VectorSink);
|
||||
CRYPTOPP_DLL_TEMPLATE_CLASS StringSinkTemplate<std::vector<byte> >;
|
||||
|
||||
/// \brief Incorporates input into RNG as additional entropy
|
||||
@ -1425,7 +1425,7 @@ public:
|
||||
/// \details ArraySource is a typedef for StringSource. Use the third constructor for an array source.
|
||||
/// The third constructor takes a pointer and length.
|
||||
/// \since Crypto++ 5.6.0
|
||||
DOCUMENTED_TYPEDEF(StringSource, ArraySource)
;
|
||||
DOCUMENTED_TYPEDEF(StringSource, ArraySource);
|
||||
|
||||
/// \brief std::vector-based implementation of the Source interface
|
||||
/// \since Crypto++ 8.0
|
||||
|
@ -608,4 +608,4 @@ GF2NT_233_Square_Reduce_POWER8(const word* pA, word* pC)
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
#endif // CRYPTOPP_IMPORTS
|
||||
#endif // CRYPTOPP_IMPORTS
|
||||
|
4
hmac.h
4
hmac.h
@ -52,8 +52,8 @@ template <class T>
|
||||
class HMAC : public MessageAuthenticationCodeImpl<HMAC_Base, HMAC<T> >
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE=T::DIGESTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE=T::BLOCKSIZE)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE=T::DIGESTSIZE);
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE=T::BLOCKSIZE);
|
||||
|
||||
virtual ~HMAC() {}
|
||||
|
||||
|
@ -126,7 +126,7 @@ public:
|
||||
typedef T_Endianness ByteOrderClass;
|
||||
typedef T_HashWordType HashWordType;
|
||||
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = T_BlockSize)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = T_BlockSize);
|
||||
// BCB2006 workaround: can't use BLOCKSIZE here
|
||||
CRYPTOPP_COMPILE_ASSERT((T_BlockSize & (T_BlockSize - 1)) == 0); // blockSize is a power of 2
|
||||
|
||||
@ -178,7 +178,7 @@ class CRYPTOPP_NO_VTABLE IteratedHashWithStaticTransform
|
||||
: public ClonableImpl<T_Transform, AlgorithmImpl<IteratedHash<T_HashWordType, T_Endianness, T_BlockSize>, T_Transform> >
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize ? T_DigestSize : T_StateSize)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize ? T_DigestSize : T_StateSize);
|
||||
|
||||
virtual ~IteratedHashWithStaticTransform() {}
|
||||
|
||||
|
14
keccak.h
14
keccak.h
@ -30,7 +30,7 @@ NAMESPACE_BEGIN(CryptoPP)
|
||||
/// <pre> Keccack_192 : public Keccack
|
||||
/// {
|
||||
/// public:
|
||||
/// CRYPTOPP_CONSTANT(DIGESTSIZE = 24)
;
|
||||
/// CRYPTOPP_CONSTANT(DIGESTSIZE = 24);
|
||||
/// Keccack_192() : Keccack(DIGESTSIZE) {}
|
||||
/// };
|
||||
/// </pre>
|
||||
@ -72,8 +72,8 @@ template<unsigned int T_DigestSize>
|
||||
class Keccak_Final : public Keccak
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = 200 - 2 * DIGESTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize);
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = 200 - 2 * DIGESTSIZE);
|
||||
static std::string StaticAlgorithmName()
|
||||
{ return "Keccak-" + IntToString(DIGESTSIZE * 8); }
|
||||
|
||||
@ -99,19 +99,19 @@ private:
|
||||
|
||||
/// \brief Keccak-224 message digest
|
||||
/// \since Crypto++ 5.6.4
|
||||
DOCUMENTED_TYPEDEF(Keccak_Final<28>, Keccak_224);
;
|
||||
DOCUMENTED_TYPEDEF(Keccak_Final<28>, Keccak_224);;
|
||||
|
||||
/// \brief Keccak-256 message digest
|
||||
/// \since Crypto++ 5.6.4
|
||||
DOCUMENTED_TYPEDEF(Keccak_Final<32>, Keccak_256);
;
|
||||
DOCUMENTED_TYPEDEF(Keccak_Final<32>, Keccak_256);;
|
||||
|
||||
/// \brief Keccak-384 message digest
|
||||
/// \since Crypto++ 5.6.4
|
||||
DOCUMENTED_TYPEDEF(Keccak_Final<48>, Keccak_384);
;
|
||||
DOCUMENTED_TYPEDEF(Keccak_Final<48>, Keccak_384);;
|
||||
|
||||
/// \brief Keccak-512 message digest
|
||||
/// \since Crypto++ 5.6.4
|
||||
DOCUMENTED_TYPEDEF(Keccak_Final<64>, Keccak_512);
;
|
||||
DOCUMENTED_TYPEDEF(Keccak_Final<64>, Keccak_512);;
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
|
@ -37,7 +37,7 @@ class LR : public LR_Info<T>, public BlockCipherDocumentation
|
||||
}
|
||||
|
||||
protected:
|
||||
CRYPTOPP_CONSTANT(S=T::DIGESTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(S=T::DIGESTSIZE);
|
||||
unsigned int L; // key length / 2
|
||||
SecByteBlock key;
|
||||
|
||||
|
4
md2.h
4
md2.h
@ -27,8 +27,8 @@ public:
|
||||
unsigned int BlockSize() const {return BLOCKSIZE;}
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "MD2";}
|
||||
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 16)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = 16)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 16);
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = 16);
|
||||
|
||||
private:
|
||||
void Transform();
|
||||
|
@ -225,4 +225,3 @@ typedef MersenneTwister<0x9908B0DF /*2567483615*/, 397, 624, 0x6C078965 /*181243
|
||||
NAMESPACE_END
|
||||
|
||||
#endif // CRYPTOPP_MERSENNE_TWISTER_H
|
||||
|
||||
|
48
naclite.h
48
naclite.h
@ -64,85 +64,85 @@ NAMESPACE_BEGIN(NaCl)
|
||||
|
||||
/// \brief Hash size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/hash.html">NaCl crypto_hash documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_hash_BYTES = 64)
;
|
||||
CRYPTOPP_CONSTANT(crypto_hash_BYTES = 64);
|
||||
|
||||
/// \brief Key size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/stream.html">NaCl crypto_stream documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_stream_KEYBYTES = 32)
;
|
||||
CRYPTOPP_CONSTANT(crypto_stream_KEYBYTES = 32);
|
||||
/// \brief Nonce size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/stream.html">NaCl crypto_stream documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_stream_NONCEBYTES = 24)
;
|
||||
CRYPTOPP_CONSTANT(crypto_stream_NONCEBYTES = 24);
|
||||
|
||||
/// \brief Key size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/auth.html">NaCl crypto_auth documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_auth_KEYBYTES = 32)
;
|
||||
CRYPTOPP_CONSTANT(crypto_auth_KEYBYTES = 32);
|
||||
/// \brief Tag size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/auth.html">NaCl crypto_auth documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_auth_BYTES = 16)
;
|
||||
CRYPTOPP_CONSTANT(crypto_auth_BYTES = 16);
|
||||
|
||||
/// \brief Key size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/onetimeauth.html">NaCl crypto_onetimeauth documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_onetimeauth_KEYBYTES = 32)
;
|
||||
CRYPTOPP_CONSTANT(crypto_onetimeauth_KEYBYTES = 32);
|
||||
/// \brief Tag size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/onetimeauth.html">NaCl crypto_onetimeauth documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_onetimeauth_BYTES = 16)
;
|
||||
CRYPTOPP_CONSTANT(crypto_onetimeauth_BYTES = 16);
|
||||
|
||||
/// \brief Key size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/secretbox.html">NaCl crypto_secretbox documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_secretbox_KEYBYTES = 32)
;
|
||||
CRYPTOPP_CONSTANT(crypto_secretbox_KEYBYTES = 32);
|
||||
/// \brief Nonce size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/secretbox.html">NaCl crypto_secretbox documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_secretbox_NONCEBYTES = 24)
;
|
||||
CRYPTOPP_CONSTANT(crypto_secretbox_NONCEBYTES = 24);
|
||||
/// \brief Zero-padded message prefix in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/secretbox.html">NaCl crypto_secretbox documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_secretbox_ZEROBYTES = 32)
;
|
||||
CRYPTOPP_CONSTANT(crypto_secretbox_ZEROBYTES = 32);
|
||||
/// \brief Zero-padded message prefix in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/secretbox.html">NaCl crypto_secretbox documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_secretbox_BOXZEROBYTES = 16)
;
|
||||
CRYPTOPP_CONSTANT(crypto_secretbox_BOXZEROBYTES = 16);
|
||||
|
||||
/// \brief Private key size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/box.html">NaCl crypto_box documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_box_SECRETKEYBYTES = 32)
;
|
||||
CRYPTOPP_CONSTANT(crypto_box_SECRETKEYBYTES = 32);
|
||||
/// \brief Public key size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/box.html">NaCl crypto_box documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_box_PUBLICKEYBYTES = 32)
;
|
||||
CRYPTOPP_CONSTANT(crypto_box_PUBLICKEYBYTES = 32);
|
||||
/// \brief Nonce size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/box.html">NaCl crypto_box documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_box_NONCEBYTES = 24)
;
|
||||
CRYPTOPP_CONSTANT(crypto_box_NONCEBYTES = 24);
|
||||
/// \brief Message 0-byte prefix in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/box.html">NaCl crypto_box documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_box_ZEROBYTES = 32)
;
|
||||
CRYPTOPP_CONSTANT(crypto_box_ZEROBYTES = 32);
|
||||
/// \brief Open box 0-byte prefix in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/box.html">NaCl crypto_box documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_box_BOXZEROBYTES = 16)
;
|
||||
CRYPTOPP_CONSTANT(crypto_box_BOXZEROBYTES = 16);
|
||||
/// \brief Precomputation 0-byte prefix in bytes in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/box.html">NaCl crypto_box documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_box_BEFORENMBYTES = 32)
;
|
||||
CRYPTOPP_CONSTANT(crypto_box_BEFORENMBYTES = 32);
|
||||
/// \brief MAC size in bytes
|
||||
/// \details crypto_box_MACBYTES was missing from tweetnacl.h. Its is defined as
|
||||
/// crypto_box_curve25519xsalsa20poly1305_MACBYTES, which is defined as 16U.
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/hash.html">NaCl crypto_box documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_box_MACBYTES = 16)
;
|
||||
CRYPTOPP_CONSTANT(crypto_box_MACBYTES = 16);
|
||||
|
||||
/// \brief Private key size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/sign.html">NaCl crypto_sign documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_sign_SECRETKEYBYTES = 64)
;
|
||||
CRYPTOPP_CONSTANT(crypto_sign_SECRETKEYBYTES = 64);
|
||||
/// \brief Public key size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/sign.html">NaCl crypto_sign documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_sign_PUBLICKEYBYTES = 32)
;
|
||||
CRYPTOPP_CONSTANT(crypto_sign_PUBLICKEYBYTES = 32);
|
||||
/// \brief Seed size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/sign.html">NaCl crypto_sign documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_sign_SEEDBYTES = 32)
;
|
||||
CRYPTOPP_CONSTANT(crypto_sign_SEEDBYTES = 32);
|
||||
/// \brief Signature size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/sign.html">NaCl crypto_sign documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_sign_BYTES = 64)
;
|
||||
CRYPTOPP_CONSTANT(crypto_sign_BYTES = 64);
|
||||
|
||||
/// \brief Group element size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/scalarmult.html">NaCl crypto_scalarmult documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_scalarmult_BYTES = 32)
;
|
||||
CRYPTOPP_CONSTANT(crypto_scalarmult_BYTES = 32);
|
||||
/// \brief Integer size in bytes
|
||||
/// \sa <A HREF="https://nacl.cr.yp.to/scalarmult.html">NaCl crypto_scalarmult documentation</A>
|
||||
CRYPTOPP_CONSTANT(crypto_scalarmult_SCALARBYTES = 32)
;
|
||||
CRYPTOPP_CONSTANT(crypto_scalarmult_SCALARBYTES = 32);
|
||||
|
||||
/// \brief Encrypt and authenticate a message
|
||||
/// \param c output byte buffer
|
||||
|
4
panama.h
4
panama.h
@ -32,7 +32,7 @@ public:
|
||||
|
||||
protected:
|
||||
typedef word32 Stage[8];
|
||||
CRYPTOPP_CONSTANT(STAGES = 32)
;
|
||||
CRYPTOPP_CONSTANT(STAGES = 32);
|
||||
|
||||
FixedSizeAlignedSecBlock<word32, 20 + 8*32> m_state;
|
||||
};
|
||||
@ -44,7 +44,7 @@ template <class B = LittleEndian>
|
||||
class PanamaHash : protected Panama<B>, public AlgorithmImpl<IteratedHash<word32, NativeByteOrder, 32>, PanamaHash<B> >
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 32)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = 32);
|
||||
virtual ~PanamaHash() {}
|
||||
PanamaHash() {Panama<B>::Reset();}
|
||||
unsigned int DigestSize() const {return DIGESTSIZE;}
|
||||
|
12
poly1305.h
12
poly1305.h
@ -48,8 +48,8 @@ class CRYPTOPP_NO_VTABLE Poly1305_Base : public FixedKeyLength<32, SimpleKeyingI
|
||||
public:
|
||||
static std::string StaticAlgorithmName() {return std::string("Poly1305(") + T::StaticAlgorithmName() + ")";}
|
||||
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE=T::BLOCKSIZE)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE=T::BLOCKSIZE)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE=T::BLOCKSIZE);
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE=T::BLOCKSIZE);
|
||||
|
||||
virtual ~Poly1305_Base() {}
|
||||
Poly1305_Base() : m_idx(0), m_used(true) {}
|
||||
@ -136,7 +136,7 @@ template <class T>
|
||||
class Poly1305 : public MessageAuthenticationCodeFinal<Poly1305_Base<T> >
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=Poly1305_Base<T>::DEFAULT_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=Poly1305_Base<T>::DEFAULT_KEYLENGTH);
|
||||
|
||||
/// \brief Construct a Poly1305
|
||||
Poly1305() {}
|
||||
@ -165,8 +165,8 @@ class Poly1305TLS_Base : public FixedKeyLength<32>, public MessageAuthentication
|
||||
{
|
||||
public:
|
||||
static std::string StaticAlgorithmName() {return std::string("Poly1305TLS");}
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE=16)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE=16)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE=16);
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE=16);
|
||||
|
||||
virtual ~Poly1305TLS_Base() {}
|
||||
Poly1305TLS_Base() {}
|
||||
@ -234,7 +234,7 @@ protected:
|
||||
/// \since Crypto++ 8.1
|
||||
/// \sa MessageAuthenticationCode(), <a href="http://tools.ietf.org/html/rfc8439">RFC
|
||||
/// 8439, ChaCha20 and Poly1305 for IETF Protocols</a>
|
||||
DOCUMENTED_TYPEDEF(MessageAuthenticationCodeFinal<Poly1305TLS_Base>, Poly1305TLS)
;
|
||||
DOCUMENTED_TYPEDEF(MessageAuthenticationCodeFinal<Poly1305TLS_Base>, Poly1305TLS);
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
|
5
rc2.h
5
rc2.h
@ -17,8 +17,8 @@ NAMESPACE_BEGIN(CryptoPP)
|
||||
/// \since Crypto++ 3.0
|
||||
struct RC2_Info : public FixedBlockSize<8>, public VariableKeyLength<16, 1, 128>
|
||||
{
|
||||
CRYPTOPP_CONSTANT(DEFAULT_EFFECTIVE_KEYLENGTH = 1024)
;
|
||||
CRYPTOPP_CONSTANT(MAX_EFFECTIVE_KEYLENGTH = 1024)
;
|
||||
CRYPTOPP_CONSTANT(DEFAULT_EFFECTIVE_KEYLENGTH = 1024);
|
||||
CRYPTOPP_CONSTANT(MAX_EFFECTIVE_KEYLENGTH = 1024);
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "RC2";}
|
||||
};
|
||||
|
||||
@ -88,4 +88,3 @@ typedef RC2::Decryption RC2Decryption;
|
||||
NAMESPACE_END
|
||||
|
||||
#endif
|
||||
|
||||
|
8
rsa.h
8
rsa.h
@ -203,17 +203,17 @@ struct RSASS_ISO : public TF_SS<RSA_ISO, P1363_EMSA2, H>
|
||||
|
||||
/// \brief \ref RSAES<STANDARD> "RSAES<PKCS1v15>::Decryptor" typedef
|
||||
/// \details RSA encryption scheme defined in PKCS #1 v2.0
|
||||
DOCUMENTED_TYPEDEF(RSAES<PKCS1v15>::Decryptor, RSAES_PKCS1v15_Decryptor)
;
|
||||
DOCUMENTED_TYPEDEF(RSAES<PKCS1v15>::Decryptor, RSAES_PKCS1v15_Decryptor);
|
||||
/// \brief \ref RSAES<STANDARD> "RSAES<PKCS1v15>::Encryptor" typedef
|
||||
/// \details RSA encryption scheme defined in PKCS #1 v2.0
|
||||
DOCUMENTED_TYPEDEF(RSAES<PKCS1v15>::Encryptor, RSAES_PKCS1v15_Encryptor)
;
|
||||
DOCUMENTED_TYPEDEF(RSAES<PKCS1v15>::Encryptor, RSAES_PKCS1v15_Encryptor);
|
||||
|
||||
/// \brief \ref RSAES<STANDARD> "RSAES<OAEP<SHA1>>::Decryptor" typedef
|
||||
/// \details RSA encryption scheme defined in PKCS #1 v2.0
|
||||
DOCUMENTED_TYPEDEF(RSAES<OAEP<SHA1> >::Decryptor, RSAES_OAEP_SHA_Decryptor)
;
|
||||
DOCUMENTED_TYPEDEF(RSAES<OAEP<SHA1> >::Decryptor, RSAES_OAEP_SHA_Decryptor);
|
||||
/// \brief \ref RSAES<STANDARD> "RSAES<OAEP<SHA1>>::Encryptor" typedef
|
||||
/// \details RSA encryption scheme defined in PKCS #1 v2.0
|
||||
DOCUMENTED_TYPEDEF(RSAES<OAEP<SHA1> >::Encryptor, RSAES_OAEP_SHA_Encryptor)
;
|
||||
DOCUMENTED_TYPEDEF(RSAES<OAEP<SHA1> >::Encryptor, RSAES_OAEP_SHA_Encryptor);
|
||||
|
||||
#ifdef CRYPTOPP_DOXYGEN_PROCESSING
|
||||
/// \brief \ref RSASS<STANDARD,HASH> "RSASS<PKCS1v15,SHA1>::Signer" typedef
|
||||
|
44
seckey.h
44
seckey.h
@ -41,7 +41,7 @@ class FixedBlockSize
|
||||
{
|
||||
public:
|
||||
/// \brief The block size of the algorithm provided as a constant.
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = N)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = N);
|
||||
};
|
||||
|
||||
// ************** rounds ***************
|
||||
@ -53,7 +53,7 @@ class FixedRounds
|
||||
{
|
||||
public:
|
||||
/// \brief The number of rounds for the algorithm provided as a constant.
|
||||
CRYPTOPP_CONSTANT(ROUNDS = R)
;
|
||||
CRYPTOPP_CONSTANT(ROUNDS = R);
|
||||
};
|
||||
|
||||
/// \brief Inherited by algorithms with variable number of rounds
|
||||
@ -65,11 +65,11 @@ class VariableRounds
|
||||
{
|
||||
public:
|
||||
/// \brief The default number of rounds for the algorithm provided as a constant.
|
||||
CRYPTOPP_CONSTANT(DEFAULT_ROUNDS = D)
;
|
||||
CRYPTOPP_CONSTANT(DEFAULT_ROUNDS = D);
|
||||
/// \brief The minimum number of rounds for the algorithm provided as a constant.
|
||||
CRYPTOPP_CONSTANT(MIN_ROUNDS = N)
;
|
||||
CRYPTOPP_CONSTANT(MIN_ROUNDS = N);
|
||||
/// \brief The maximum number of rounds for the algorithm provided as a constant.
|
||||
CRYPTOPP_CONSTANT(MAX_ROUNDS = M)
;
|
||||
CRYPTOPP_CONSTANT(MAX_ROUNDS = M);
|
||||
/// \brief The default number of rounds for the algorithm based on key length
|
||||
/// provided by a static function.
|
||||
/// \param keylength the size of the key, in bytes
|
||||
@ -126,23 +126,23 @@ class FixedKeyLength
|
||||
public:
|
||||
/// \brief The default key length used by the algorithm provided as a constant
|
||||
/// \details KEYLENGTH is provided in bytes, not bits
|
||||
CRYPTOPP_CONSTANT(KEYLENGTH=N)
;
|
||||
CRYPTOPP_CONSTANT(KEYLENGTH=N);
|
||||
/// \brief The minimum key length used by the algorithm provided as a constant
|
||||
/// \details MIN_KEYLENGTH is provided in bytes, not bits
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH=N)
;
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH=N);
|
||||
/// \brief The maximum key length used by the algorithm provided as a constant
|
||||
/// \details MAX_KEYLENGTH is provided in bytes, not bits
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH=N)
;
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH=N);
|
||||
/// \brief The default key length used by the algorithm provided as a constant
|
||||
/// \details DEFAULT_KEYLENGTH is provided in bytes, not bits
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=N)
;
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=N);
|
||||
/// \brief The default IV requirements for the algorithm provided as a constant
|
||||
/// \details The default value is NOT_RESYNCHRONIZABLE. See IV_Requirement
|
||||
/// in cryptlib.h for allowed values.
|
||||
CRYPTOPP_CONSTANT(IV_REQUIREMENT = IV_REQ)
;
|
||||
CRYPTOPP_CONSTANT(IV_REQUIREMENT = IV_REQ);
|
||||
/// \brief The default IV length used by the algorithm provided as a constant
|
||||
/// \details IV_LENGTH is provided in bytes, not bits. The default implementation uses 0.
|
||||
CRYPTOPP_CONSTANT(IV_LENGTH = IV_L)
;
|
||||
CRYPTOPP_CONSTANT(IV_LENGTH = IV_L);
|
||||
/// \brief The default key length for the algorithm provided by a static function.
|
||||
/// \param keylength the size of the key, in bytes
|
||||
/// \details The default implementation returns KEYLENGTH. keylength is unused
|
||||
@ -175,23 +175,23 @@ class VariableKeyLength
|
||||
public:
|
||||
/// \brief The minimum key length used by the algorithm provided as a constant
|
||||
/// \details MIN_KEYLENGTH is provided in bytes, not bits
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH=N)
;
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH=N);
|
||||
/// \brief The maximum key length used by the algorithm provided as a constant
|
||||
/// \details MAX_KEYLENGTH is provided in bytes, not bits
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH=M)
;
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH=M);
|
||||
/// \brief The default key length used by the algorithm provided as a constant
|
||||
/// \details DEFAULT_KEYLENGTH is provided in bytes, not bits
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=D)
;
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=D);
|
||||
/// \brief The key length multiple used by the algorithm provided as a constant
|
||||
/// \details MAX_KEYLENGTH is provided in bytes, not bits
|
||||
CRYPTOPP_CONSTANT(KEYLENGTH_MULTIPLE=Q)
;
|
||||
CRYPTOPP_CONSTANT(KEYLENGTH_MULTIPLE=Q);
|
||||
/// \brief The default IV requirements for the algorithm provided as a constant
|
||||
/// \details The default value is NOT_RESYNCHRONIZABLE. See IV_Requirement
|
||||
/// in cryptlib.h for allowed values.
|
||||
CRYPTOPP_CONSTANT(IV_REQUIREMENT=IV_REQ)
;
|
||||
CRYPTOPP_CONSTANT(IV_REQUIREMENT=IV_REQ);
|
||||
/// \brief The default initialization vector length for the algorithm provided as a constant
|
||||
/// \details IV_LENGTH is provided in bytes, not bits. The default implementation uses 0.
|
||||
CRYPTOPP_CONSTANT(IV_LENGTH=IV_L)
;
|
||||
CRYPTOPP_CONSTANT(IV_LENGTH=IV_L);
|
||||
/// \brief Provides a valid key length for the algorithm provided by a static function.
|
||||
/// \param keylength the size of the key, in bytes
|
||||
/// \details If keylength is less than MIN_KEYLENGTH, then the function returns
|
||||
@ -219,20 +219,20 @@ class SameKeyLengthAs
|
||||
public:
|
||||
/// \brief The minimum key length used by the algorithm provided as a constant
|
||||
/// \details MIN_KEYLENGTH is provided in bytes, not bits
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH=T::MIN_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(MIN_KEYLENGTH=T::MIN_KEYLENGTH);
|
||||
/// \brief The maximum key length used by the algorithm provided as a constant
|
||||
/// \details MIN_KEYLENGTH is provided in bytes, not bits
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH=T::MAX_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(MAX_KEYLENGTH=T::MAX_KEYLENGTH);
|
||||
/// \brief The default key length used by the algorithm provided as a constant
|
||||
/// \details MIN_KEYLENGTH is provided in bytes, not bits
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=T::DEFAULT_KEYLENGTH)
;
|
||||
CRYPTOPP_CONSTANT(DEFAULT_KEYLENGTH=T::DEFAULT_KEYLENGTH);
|
||||
/// \brief The default IV requirements for the algorithm provided as a constant
|
||||
/// \details The default value is NOT_RESYNCHRONIZABLE. See IV_Requirement
|
||||
/// in cryptlib.h for allowed values.
|
||||
CRYPTOPP_CONSTANT(IV_REQUIREMENT=IV_REQ)
;
|
||||
CRYPTOPP_CONSTANT(IV_REQUIREMENT=IV_REQ);
|
||||
/// \brief The default initialization vector length for the algorithm provided as a constant
|
||||
/// \details IV_LENGTH is provided in bytes, not bits. The default implementation uses 0.
|
||||
CRYPTOPP_CONSTANT(IV_LENGTH=IV_L)
;
|
||||
CRYPTOPP_CONSTANT(IV_LENGTH=IV_L);
|
||||
/// \brief Provides a valid key length for the algorithm provided by a static function.
|
||||
/// \param keylength the size of the key, in bytes
|
||||
/// \details If keylength is less than MIN_KEYLENGTH, then the function returns
|
||||
|
4
sha3.h
4
sha3.h
@ -60,8 +60,8 @@ template<unsigned int T_DigestSize>
|
||||
class SHA3_Final : public SHA3
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize)
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = 200 - 2 * DIGESTSIZE)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = T_DigestSize);
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = 200 - 2 * DIGESTSIZE);
|
||||
static std::string StaticAlgorithmName()
|
||||
{ return "SHA3-" + IntToString(DIGESTSIZE * 8); }
|
||||
|
||||
|
4
shake.h
4
shake.h
@ -66,8 +66,8 @@ template<unsigned int T_Strength>
|
||||
class SHAKE_Final : public SHAKE
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = (T_Strength == 128 ? 32 : 64))
;
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = (T_Strength == 128 ? 1344/8 : 1088/8))
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = (T_Strength == 128 ? 32 : 64));
|
||||
CRYPTOPP_CONSTANT(BLOCKSIZE = (T_Strength == 128 ? 1344/8 : 1088/8));
|
||||
static std::string StaticAlgorithmName()
|
||||
{ return "SHAKE-" + IntToString(T_Strength); }
|
||||
|
||||
|
@ -39,7 +39,7 @@ class SipHash_Info : public FixedKeyLength<16>
|
||||
{
|
||||
public:
|
||||
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() {return "SipHash";}
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = (T_128bit ? 16 : 8))
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE = (T_128bit ? 16 : 8));
|
||||
};
|
||||
|
||||
/// \brief SipHash message authentication code base class
|
||||
|
@ -208,7 +208,7 @@ struct CRYPTOPP_NO_VTABLE AdditiveCipherConcretePolicy : public BASE
|
||||
/// For example, ChaCha uses 16 each <tt>word32</tt>, and the value of
|
||||
/// BYTES_PER_ITERATION is 64. Each invocation of the ChaCha block function
|
||||
/// produces 64 bytes of keystream.
|
||||
CRYPTOPP_CONSTANT(BYTES_PER_ITERATION = sizeof(WordType) * W)
;
|
||||
CRYPTOPP_CONSTANT(BYTES_PER_ITERATION = sizeof(WordType) * W);
|
||||
|
||||
virtual ~AdditiveCipherConcretePolicy() {}
|
||||
|
||||
|
4
ttmac.h
4
ttmac.h
@ -17,7 +17,7 @@ class CRYPTOPP_NO_VTABLE TTMAC_Base : public FixedKeyLength<20>, public Iterated
|
||||
{
|
||||
public:
|
||||
static std::string StaticAlgorithmName() {return std::string("Two-Track-MAC");}
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE=20)
;
|
||||
CRYPTOPP_CONSTANT(DIGESTSIZE=20);
|
||||
|
||||
unsigned int DigestSize() const {return DIGESTSIZE;};
|
||||
void UncheckedSetKey(const byte *userKey, unsigned int keylength, const NameValuePairs ¶ms);
|
||||
@ -37,7 +37,7 @@ protected:
|
||||
/// \tparam T HashTransformation class
|
||||
/// \details 160-bit MAC with 160-bit key
|
||||
/// \sa MessageAuthenticationCode(), <a href="http://www.weidai.com/scan-mirror/mac.html#TTMAC">Two-Track-MAC</a>
|
||||
DOCUMENTED_TYPEDEF(MessageAuthenticationCodeFinal<TTMAC_Base>, TTMAC)
;
|
||||
DOCUMENTED_TYPEDEF(MessageAuthenticationCodeFinal<TTMAC_Base>, TTMAC);
|
||||
|
||||
NAMESPACE_END
|
||||
|
||||
|
28
xed25519.h
28
xed25519.h
@ -56,13 +56,13 @@ class x25519 : public SimpleKeyAgreementDomain, public CryptoParameters, public
|
||||
public:
|
||||
/// \brief Size of the private key
|
||||
/// \details SECRET_KEYLENGTH is the size of the private key, in bytes.
|
||||
CRYPTOPP_CONSTANT(SECRET_KEYLENGTH = 32)
;
|
||||
CRYPTOPP_CONSTANT(SECRET_KEYLENGTH = 32);
|
||||
/// \brief Size of the public key
|
||||
/// \details PUBLIC_KEYLENGTH is the size of the public key, in bytes.
|
||||
CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32)
;
|
||||
CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32);
|
||||
/// \brief Size of the shared key
|
||||
/// \details SHARED_KEYLENGTH is the size of the shared key, in bytes.
|
||||
CRYPTOPP_CONSTANT(SHARED_KEYLENGTH = 32)
;
|
||||
CRYPTOPP_CONSTANT(SHARED_KEYLENGTH = 32);
|
||||
|
||||
virtual ~x25519() {}
|
||||
|
||||
@ -277,8 +277,8 @@ protected:
|
||||
/// message digest supplied by an attacker.
|
||||
struct ed25519_MessageAccumulator : public PK_MessageAccumulator
|
||||
{
|
||||
CRYPTOPP_CONSTANT(RESERVE_SIZE=2048+64)
;
|
||||
CRYPTOPP_CONSTANT(SIGNATURE_LENGTH=64)
;
|
||||
CRYPTOPP_CONSTANT(RESERVE_SIZE=2048+64);
|
||||
CRYPTOPP_CONSTANT(SIGNATURE_LENGTH=64);
|
||||
|
||||
/// \brief Create a message accumulator
|
||||
ed25519_MessageAccumulator() {
|
||||
@ -356,15 +356,15 @@ struct ed25519PrivateKey : public PKCS8PrivateKey
|
||||
{
|
||||
/// \brief Size of the private key
|
||||
/// \details SECRET_KEYLENGTH is the size of the private key, in bytes.
|
||||
CRYPTOPP_CONSTANT(SECRET_KEYLENGTH = 32)
;
|
||||
CRYPTOPP_CONSTANT(SECRET_KEYLENGTH = 32);
|
||||
/// \brief Size of the public key
|
||||
/// \details PUBLIC_KEYLENGTH is the size of the public key, in bytes.
|
||||
CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32)
;
|
||||
CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32);
|
||||
/// \brief Size of the siganture
|
||||
/// \details SIGNATURE_LENGTH is the size of the signature, in bytes.
|
||||
/// ed25519 is a DL-based signature scheme. The signature is the
|
||||
/// concatenation of <tt>r || s</tt>.
|
||||
CRYPTOPP_CONSTANT(SIGNATURE_LENGTH = 64)
;
|
||||
CRYPTOPP_CONSTANT(SIGNATURE_LENGTH = 64);
|
||||
|
||||
// CryptoMaterial
|
||||
bool Validate(RandomNumberGenerator &rng, unsigned int level) const;
|
||||
@ -497,15 +497,15 @@ struct ed25519Signer : public PK_Signer
|
||||
{
|
||||
/// \brief Size of the private key
|
||||
/// \details SECRET_KEYLENGTH is the size of the private key, in bytes.
|
||||
CRYPTOPP_CONSTANT(SECRET_KEYLENGTH = 32)
;
|
||||
CRYPTOPP_CONSTANT(SECRET_KEYLENGTH = 32);
|
||||
/// \brief Size of the public key
|
||||
/// \details PUBLIC_KEYLENGTH is the size of the public key, in bytes.
|
||||
CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32)
;
|
||||
CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32);
|
||||
/// \brief Size of the siganture
|
||||
/// \details SIGNATURE_LENGTH is the size of the signature, in bytes.
|
||||
/// ed25519 is a DL-based signature scheme. The signature is the
|
||||
/// concatenation of <tt>r || s</tt>.
|
||||
CRYPTOPP_CONSTANT(SIGNATURE_LENGTH = 64)
;
|
||||
CRYPTOPP_CONSTANT(SIGNATURE_LENGTH = 64);
|
||||
typedef Integer Element;
|
||||
|
||||
virtual ~ed25519Signer() {}
|
||||
@ -626,7 +626,7 @@ struct ed25519PublicKey : public X509PublicKey
|
||||
{
|
||||
/// \brief Size of the public key
|
||||
/// \details PUBLIC_KEYLENGTH is the size of the public key, in bytes.
|
||||
CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32)
;
|
||||
CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32);
|
||||
typedef Integer Element;
|
||||
|
||||
OID GetAlgorithmID() const {
|
||||
@ -700,8 +700,8 @@ protected:
|
||||
/// \since Crypto++ 8.0
|
||||
struct ed25519Verifier : public PK_Verifier
|
||||
{
|
||||
CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32)
;
|
||||
CRYPTOPP_CONSTANT(SIGNATURE_LENGTH = 64)
;
|
||||
CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32);
|
||||
CRYPTOPP_CONSTANT(SIGNATURE_LENGTH = 64);
|
||||
typedef Integer Element;
|
||||
|
||||
virtual ~ed25519Verifier() {}
|
||||
|
Loading…
Reference in New Issue
Block a user