diff --git a/Doxyfile b/Doxyfile
index 2da79690..b77de55d 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -41,7 +41,7 @@ PROJECT_NAME = Crypto++
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 5.7.0
+PROJECT_NUMBER = 6.0.0
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
diff --git a/config.h b/config.h
index 63ba8670..f468262e 100644
--- a/config.h
+++ b/config.h
@@ -66,7 +66,7 @@
// the version of the library the headers came from. It is not
// necessarily the version of the library built as a shared object if
// versions are inadvertently mixed and matched.
-#define CRYPTOPP_VERSION 570
+#define CRYPTOPP_VERSION 600
// Define this if you want to set a prefix for TestData/ and TestVectors/
// Be mindful of the trailing slash since its simple concatenation.
diff --git a/cryptlib.h b/cryptlib.h
index 87698bb4..5f7ec752 100644
--- a/cryptlib.h
+++ b/cryptlib.h
@@ -3,7 +3,7 @@
//! \file cryptlib.h
//! \brief Abstract base classes that provide a uniform interface to this library.
-/*! \mainpage Crypto++ Library 5.7 API Reference
+/*! \mainpage Crypto++ Library 6.0 API Reference
- Abstract Base Classes
-
cryptlib.h
@@ -2944,7 +2944,7 @@ public:
//! }
//!
//! \sa HeaderVersion(), GitHub Issue 371.
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
extern "C" {
int LibraryVersion();
} // C linkage
@@ -2976,7 +2976,7 @@ extern "C" {
//! }
//!
//! \sa LibraryVersion(), GitHub Issue 371.
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
extern "C" {
inline int HeaderVersion()
{
diff --git a/drbg.h b/drbg.h
index f7767818..1a2c5184 100644
--- a/drbg.h
+++ b/drbg.h
@@ -4,7 +4,7 @@
//! \brief Classes for NIST DRBGs from SP 800-90A
//! \sa Recommendation
//! for Random Number Generation Using Deterministic Random Bit Generators, Rev 1 (June 2015)
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
#ifndef CRYPTOPP_NIST_DRBG_H
#define CRYPTOPP_NIST_DRBG_H
@@ -19,7 +19,7 @@ NAMESPACE_BEGIN(CryptoPP)
//! \details NIST_DRBG is the base class interface for NIST DRBGs from SP 800-90A Rev 1 (June 2015)
//! \sa Recommendation
//! for Random Number Generation Using Deterministic Random Bit Generators, Rev 1 (June 2015)
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
class NIST_DRBG : public RandomNumberGenerator
{
public:
@@ -152,7 +152,7 @@ protected:
//! before a reseed. However, Hash_DRBG limits it to INT_MAX due to the limited data range of an int.
//! \sa Recommendation
//! for Random Number Generation Using Deterministic Random Bit Generators, Rev 1 (June 2015)
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
template
class Hash_DRBG : public NIST_DRBG, public NotCopyable
{
@@ -263,7 +263,7 @@ private:
//! before a reseed. However, HMAC_DRBG limits it to INT_MAX due to the limited data range of an int.
//! \sa Recommendation
//! for Random Number Generation Using Deterministic Random Bit Generators, Rev 1 (June 2015)
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
template
class HMAC_DRBG : public NIST_DRBG, public NotCopyable
{
diff --git a/eccrypto.h b/eccrypto.h
index 6a5c7620..faa5509c 100644
--- a/eccrypto.h
+++ b/eccrypto.h
@@ -349,7 +349,7 @@ public:
//! \tparam EC elliptic curve field
//! \sa RFC 6979, Deterministic Usage of the
//! Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA)
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
template
class DL_Algorithm_ECDSA_RFC6979 : public DL_Algorithm_DSA_RFC6979
{
@@ -414,7 +414,7 @@ class DL_PrivateKey_ECGDSA_ISO15946;
//! \brief Elliptic Curve German DSA key for ISO/IEC 15946
//! \tparam EC elliptic curve field
//! \sa ECGDSA_ISO15946
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
template
class DL_PrivateKey_ECGDSA_ISO15946 : public DL_PrivateKeyImpl >
{
@@ -497,7 +497,7 @@ public:
//! \brief Elliptic Curve German DSA key for ISO/IEC 15946
//! \tparam EC elliptic curve field
//! \sa ECGDSA_ISO15946
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
template
class DL_PublicKey_ECGDSA_ISO15946 : public DL_PublicKeyImpl >
{
@@ -550,7 +550,7 @@ public:
//! \brief Elliptic Curve German DSA keys for ISO/IEC 15946
//! \tparam EC elliptic curve field
//! \sa ECGDSA_ISO15946
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
template
struct DL_Keys_ECGDSA_ISO15946
{
@@ -562,7 +562,7 @@ struct DL_Keys_ECGDSA_ISO15946
//! \brief Elliptic Curve German DSA signature algorithm
//! \tparam EC elliptic curve field
//! \sa ECGDSA_ISO15946
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
template
class DL_Algorithm_ECGDSA_ISO15946 : public DL_Algorithm_GDSA_ISO15946
{
@@ -576,7 +576,7 @@ public:
//! \tparam H HashTransformation derived class
//! \sa Erwin Hess, Marcus Schafheutle, and Pascale Serf The
//! Digital Signature Scheme ECGDSA (October 24, 2006)
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
template
struct ECGDSA : public DL_SS<
DL_Keys_ECGDSA_ISO15946,
diff --git a/ecpoint.h b/ecpoint.h
index 63d1195e..57f9f55a 100644
--- a/ecpoint.h
+++ b/ecpoint.h
@@ -3,7 +3,7 @@
//! \file ecpoint.h
//! \brief Classes for Elliptic Curve points
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
#ifndef CRYPTOPP_ECPOINT_H
#define CRYPTOPP_ECPOINT_H
@@ -88,7 +88,7 @@ CRYPTOPP_DLL_TEMPLATE_CLASS AbstractGroup;
//! \tparam Point ellicptic curve point
//! \details EncodedPoint is an interface for encoding and decoding elliptic curve points.
//! The template parameter Point should be a class like ECP or EC2N.
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
template
class EncodedPoint
{
diff --git a/filters.h b/filters.h
index acb2b594..05d03004 100644
--- a/filters.h
+++ b/filters.h
@@ -489,7 +489,7 @@ struct BlockPaddingSchemeDef
//! \brief W3C padding added to a block
//! \sa XML
//! Encryption Syntax and Processing
- //! \since Crypto++ 5.7
+ //! \since Crypto++ 6.0
W3C_PADDING,
//! \brief Default padding scheme
//! \since Crypto++ 5.0
diff --git a/gfpcrypt.h b/gfpcrypt.h
index f4acbb83..7d25490e 100644
--- a/gfpcrypt.h
+++ b/gfpcrypt.h
@@ -232,7 +232,7 @@ public:
//! \tparam H HashTransformation derived class
//! \sa RFC 6979, Deterministic Usage of the
//! Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA)
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
template
class DL_Algorithm_DSA_RFC6979 : public DL_Algorithm_GDSA, public DeterministicSignatureAlgorithm
{
diff --git a/integer.h b/integer.h
index f6bf0621..ae110150 100644
--- a/integer.h
+++ b/integer.h
@@ -383,7 +383,7 @@ public:
//! does not attempt to interpret bits, and the result is always POSITIVE. If needed,
//! the integer should be converted to a 2's compliment representation before performing
//! the operation.
- //! \since Crypto++ 5.7
+ //! \since Crypto++ 6.0
Integer& operator&=(const Integer& t);
//! \brief Bitwise OR Assignment
//! \param t the second Integer
@@ -395,7 +395,7 @@ public:
//! does not attempt to interpret bits, and the result is always POSITIVE. If needed,
//! the integer should be converted to a 2's compliment representation before performing
//! the operation.
- //! \since Crypto++ 5.7
+ //! \since Crypto++ 6.0
Integer& operator|=(const Integer& t);
//! \brief Bitwise XOR Assignment
//! \param t the other Integer
@@ -407,7 +407,7 @@ public:
//! does not attempt to interpret bits, and the result is always POSITIVE. If needed,
//! the integer should be converted to a 2's compliment representation before performing
//! the operation.
- //! \since Crypto++ 5.7
+ //! \since Crypto++ 6.0
Integer& operator^=(const Integer& t);
//! \brief Set this Integer to random integer
@@ -524,7 +524,7 @@ public:
//! does not attempt to interpret bits, and the result is always POSITIVE. If needed,
//! the integer should be converted to a 2's compliment representation before performing
//! the operation.
- //! \since Crypto++ 5.7
+ //! \since Crypto++ 6.0
Integer And(const Integer&) const;
//! \brief Bitwise OR
@@ -537,7 +537,7 @@ public:
//! does not attempt to interpret bits, and the result is always POSITIVE. If needed,
//! the integer should be converted to a 2's compliment representation before performing
//! the operation.
- //! \since Crypto++ 5.7
+ //! \since Crypto++ 6.0
Integer Or(const Integer&) const;
//! \brief Bitwise XOR
@@ -550,7 +550,7 @@ public:
//! does not attempt to interpret bits, and the result is always POSITIVE. If needed,
//! the integer should be converted to a 2's compliment representation before performing
//! the operation.
- //! \since Crypto++ 5.7
+ //! \since Crypto++ 6.0
Integer Xor(const Integer&) const;
//! \brief Right-shift
@@ -685,7 +685,7 @@ inline CryptoPP::word operator%(const CryptoPP::Integer &a, CryptoPP::word b)
//! does not attempt to interpret bits, and the result is always POSITIVE. If needed,
//! the integer should be converted to a 2's compliment representation before performing
//! the operation.
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
inline CryptoPP::Integer operator&(const CryptoPP::Integer &a, const CryptoPP::Integer &b) {return a.And(b);}
//! \brief Bitwise OR
@@ -699,7 +699,7 @@ inline CryptoPP::Integer operator&(const CryptoPP::Integer &a, const CryptoPP::I
//! does not attempt to interpret bits, and the result is always POSITIVE. If needed,
//! the integer should be converted to a 2's compliment representation before performing
//! the operation.
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
inline CryptoPP::Integer operator|(const CryptoPP::Integer &a, const CryptoPP::Integer &b) {return a.Or(b);}
//! \brief Bitwise XOR
@@ -713,7 +713,7 @@ inline CryptoPP::Integer operator|(const CryptoPP::Integer &a, const CryptoPP::I
//! does not attempt to interpret bits, and the result is always POSITIVE. If needed,
//! the integer should be converted to a 2's compliment representation before performing
//! the operation.
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
inline CryptoPP::Integer operator^(const CryptoPP::Integer &a, const CryptoPP::Integer &b) {return a.Xor(b);}
NAMESPACE_END
diff --git a/keccak.h b/keccak.h
index ba94eaca..649e1e55 100644
--- a/keccak.h
+++ b/keccak.h
@@ -69,7 +69,7 @@ protected:
//! \class Keccak_224
//! \tparam DigestSize controls the digest size as a template parameter instead of a per-class constant
//! \brief Keccak-X message digest, template for more fine-grained typedefs
-//! \since Crypto++ 5.7.0
+//! \since Crypto++ 6.0.0
template
class Keccak_Final : public Keccak
{
diff --git a/poly1305.h b/poly1305.h
index 7e5d9f6b..773bd27d 100644
--- a/poly1305.h
+++ b/poly1305.h
@@ -39,7 +39,7 @@
//! \sa Daniel J. Bernstein The Poly1305-AES
//! Message-Authentication Code (20050329) and Andy Polyakov Poly1305 Revised
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
#ifndef CRYPTOPP_POLY1305_H
#define CRYPTOPP_POLY1305_H
@@ -55,7 +55,7 @@ NAMESPACE_BEGIN(CryptoPP)
//! \class Poly1305_Base
//! \brief Poly1305 message authentication code base class
//! \tparam T class derived from BlockCipherDocumentation with 16-byte key and 16-byte blocksize
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
template
class CRYPTOPP_NO_VTABLE Poly1305_Base : public FixedKeyLength<32, SimpleKeyingInterface::UNIQUE_IV, 16>, public MessageAuthenticationCode
{
@@ -141,7 +141,7 @@ protected:
//! \sa Daniel J. Bernstein The Poly1305-AES
//! Message-Authentication Code (20050329) and Andy Polyakov Poly1305 Revised
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
template
class Poly1305 : public MessageAuthenticationCodeFinal >
{
diff --git a/rdrand.cpp b/rdrand.cpp
index 7947b3e1..6eb45f8f 100644
--- a/rdrand.cpp
+++ b/rdrand.cpp
@@ -55,8 +55,16 @@
#if defined(CRYPTOPP_CPUID_AVAILABLE)
# if defined(CRYPTOPP_MSC_VERSION)
-# define MASM_RDRAND_ASM_AVAILABLE 1
-# define MASM_RDSEED_ASM_AVAILABLE 1
+# if (CRYPTOPP_MSC_VERSION >= 1700)
+# define ALL_RDRAND_INTRIN_AVAILABLE 1
+# else
+# define MASM_RDRAND_ASM_AVAILABLE 1
+# endif
+# if (CRYPTOPP_MSC_VERSION >= 1800)
+# define ALL_RDSEED_INTRIN_AVAILABLE 1
+# else
+# define MASM_RDSEED_ASM_AVAILABLE 1
+# endif
# elif defined(CRYPTOPP_LLVM_CLANG_VERSION) || defined(CRYPTOPP_APPLE_CLANG_VERSION)
# define GCC_RDRAND_ASM_AVAILABLE 1
# define GCC_RDSEED_ASM_AVAILABLE 1
diff --git a/rdrand.h b/rdrand.h
index 8b56239c..5e602697 100644
--- a/rdrand.h
+++ b/rdrand.h
@@ -38,6 +38,8 @@ public:
class RDRAND : public RandomNumberGenerator
{
public:
+ virtual ~RDRAND() {}
+
std::string AlgorithmName() const {return "RDRAND";}
//! \brief Construct a RDRAND generator
@@ -46,14 +48,10 @@ public:
//! for failed generation attempts.
//! \details According to DJ of Intel, the Intel RDRAND circuit does not underflow.
//! If it did hypothetically underflow, then it would return 0 for the random value.
- //! Its not clear what AMD's behavior will be, and what the returned value will be if
- //! underflow occurs.
- //! Also see RDRAND
- //! not really random with Oracle Studio 12.3 + patches
+ //! AMD's RDRAND implementation appears to provide the same behavior except the
+ //! values are not generated consistent with FIPS 140.
RDRAND(unsigned int retries = 4) : m_retries(retries) {}
- virtual ~RDRAND() {}
-
//! \brief Retrieve the number of retries used by the generator
//! \returns the number of times GenerateBlock() will attempt to recover from a failed generation
unsigned int GetRetries() const
@@ -125,6 +123,8 @@ public:
class RDSEED : public RandomNumberGenerator
{
public:
+ virtual ~RDSEED() {}
+
std::string AlgorithmName() const {return "RDSEED";}
//! \brief Construct a RDSEED generator
@@ -132,12 +132,10 @@ public:
//! \details RDSEED() constructs a generator with a maximum number of retires
//! for failed generation attempts.
//! \details Empirical testing under a 6th generaton i7 (6200U) shows RDSEED fails
- //! to fulfill requests at about 6 to 8 times the rate of RDRAND. The default
- //! retries reflects the difference.
+ //! to fulfill requests at about once every for every 256 bytes requested.
+ //! The default retries reflects the expected ceiling when requesting 10,000 bytes.
RDSEED(unsigned int retries = 64) : m_retries(retries) {}
- virtual ~RDSEED() {}
-
//! \brief Retrieve the number of retries used by the generator
//! \returns the number of times GenerateBlock() will attempt to recover from a failed generation
unsigned int GetRetries() const
diff --git a/secblock.h b/secblock.h
index 11c3169a..7ee41f61 100644
--- a/secblock.h
+++ b/secblock.h
@@ -603,7 +603,7 @@ public:
//! occur as CPU cycles are spent zeroizing unintialized memory.
//! \details If Assign(), New(), Grow(), CleanNew(), CleanGrow() are called, then the
//! count is reset to its default state, which is the maxmimum number of elements.
- //! \since Crypto++ 5.7
+ //! \since Crypto++ 6.0
void SetMark(size_t count) {m_mark = count;}
//! \brief Set contents and size from an array
diff --git a/sha.h b/sha.h
index 455d0af4..ce2ff06e 100644
--- a/sha.h
+++ b/sha.h
@@ -2,7 +2,7 @@
//! \file sha.h
//! \brief Classes for SHA-1 and SHA-2 family of message digests
-//! \since SHA1 since Crypto++ 1.0, SHA2 since Crypto++ 4.0, Intel SHA extensions since Crypto++ 5.7
+//! \since SHA1 since Crypto++ 1.0, SHA2 since Crypto++ 4.0, Intel SHA extensions since Crypto++ 6.0
#ifndef CRYPTOPP_SHA_H
#define CRYPTOPP_SHA_H
@@ -21,7 +21,7 @@ NAMESPACE_BEGIN(CryptoPP)
//! \class SHA1
//! \brief SHA-1 message digest
//! \sa SHA-1
-//! \since Crypto++ 1.0, Intel SHA extensions since Crypto++ 5.7
+//! \since Crypto++ 1.0, Intel SHA extensions since Crypto++ 6.0
class CRYPTOPP_DLL SHA1 : public IteratedHashWithStaticTransform
{
public:
@@ -35,7 +35,7 @@ typedef SHA1 SHA; // for backwards compatibility
//! \class SHA256
//! \brief SHA-256 message digest
//! \sa SHA-256
-//! \since Crypto++ 4.0, Intel SHA extensions since Crypto++ 5.7
+//! \since Crypto++ 4.0, Intel SHA extensions since Crypto++ 6.0
class CRYPTOPP_DLL SHA256 : public IteratedHashWithStaticTransform
{
public:
@@ -50,7 +50,7 @@ public:
//! \class SHA224
//! \brief SHA-224 message digest
//! \sa SHA-224
-//! \since Crypto++ 4.0, Intel SHA extensions since Crypto++ 5.7
+//! \since Crypto++ 4.0, Intel SHA extensions since Crypto++ 6.0
class CRYPTOPP_DLL SHA224 : public IteratedHashWithStaticTransform
{
public:
diff --git a/sha3.h b/sha3.h
index ac393ab4..e551767f 100644
--- a/sha3.h
+++ b/sha3.h
@@ -54,7 +54,7 @@ protected:
//! \class SHA3_224
//! \tparam DigestSize controls the digest size as a template parameter instead of a per-class constant
//! \brief SHA3-X message digest, template for more fine-grained typedefs
-//! \since Crypto++ 5.7.0
+//! \since Crypto++ 6.0.0
template
class SHA3_Final : public SHA3
{
diff --git a/siphash.h b/siphash.h
index e41b6303..c0b0014a 100644
--- a/siphash.h
+++ b/siphash.h
@@ -21,7 +21,7 @@
//! hash.Final(...);
//! \sa Jean-Philippe Aumasson and Daniel J. Bernstein SipHash:
//! a fast short-input PRF
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
#ifndef CRYPTOPP_SIPHASH_H
#define CRYPTOPP_SIPHASH_H
@@ -135,7 +135,7 @@ private:
//! hash.Final(...);
//! \sa Jean-Philippe Aumasson and Daniel J. Bernstein SipHash:
//! a fast short-input PRF
-//! \since Crypto++ 5.7
+//! \since Crypto++ 6.0
template
class SipHash : public SipHash_Base
{