(Integer value, unsigned int base)
{
diff --git a/integer.h b/integer.h
index 4618528ad..a7859154d 100644
--- a/integer.h
+++ b/integer.h
@@ -553,7 +553,7 @@ class CRYPTOPP_DLL Integer : private InitializeInteger, public ASN1Object
/// \name BINARY OPERATORS
//@{
/// \brief Perform signed comparison
- /// \param a the Integer to comapre
+ /// \param a the Integer to compare
/// \retval -1 if *this < a
/// \retval 0 if *this = a
/// \retval 1 if *this > a
diff --git a/keccak.h b/keccak.h
index f40cec5e2..95f69a44e 100644
--- a/keccak.h
+++ b/keccak.h
@@ -26,7 +26,7 @@ NAMESPACE_BEGIN(CryptoPP)
/// \details Keccak will likely change in the future to accommodate extensibility of the
/// round function and the XOF functions.
/// \details Perform the following to specify a different digest size. The class will use F1600,
-/// XOF d=0x01, and a new vaue for r() (which will be 200-2*24 = 152).
+/// XOF d=0x01, and a new value for r() (which will be 200-2*24 = 152).
/// Keccack_192 : public Keccack
/// {
/// public:
diff --git a/mersenne.h b/mersenne.h
index 3ec6f4c60..9a0646613 100644
--- a/mersenne.h
+++ b/mersenne.h
@@ -2,7 +2,7 @@
/// \file mersenne.h
/// \brief Class file for Mersenne Twister
-/// \warning MersenneTwister is suitable for Monte-Carlo simulations, where uniformaly distrubuted
+/// \warning MersenneTwister is suitable for Monte-Carlo simulations, where uniformaly distributed
/// numbers are required quickly. It should not be used for cryptographic purposes.
/// \since Crypto++ 5.6.3
#ifndef CRYPTOPP_MERSENNE_TWISTER_H
@@ -23,7 +23,7 @@ NAMESPACE_BEGIN(CryptoPP)
/// \details Provides the MersenneTwister implementation. The class is a header-only implementation.
/// \details You should reseed the generator after a fork() to avoid multiple generators
/// with the same internal state.
-/// \warning MersenneTwister is suitable for simulations, where uniformaly distrubuted numbers are
+/// \warning MersenneTwister is suitable for simulations, where uniformaly distributed numbers are
/// required quickly. It should not be used for cryptographic purposes.
/// \sa MT19937, MT19937ar
/// \since Crypto++ 5.6.3
@@ -162,7 +162,7 @@ class MersenneTwister : public RandomNumberGenerator
return temp ^ (temp >> 18);
}
- /// \brief Performs the twist operaton on the state array
+ /// \brief Performs the twist operation on the state array
void Twist()
{
static const word32 magic[2]={0x0UL, K};
diff --git a/misc.cpp b/misc.cpp
index 5ff76b713..3fa6b708c 100644
--- a/misc.cpp
+++ b/misc.cpp
@@ -254,7 +254,7 @@ bool VerifyBufsEqual(const byte *buf, const byte *mask, size_t count)
for (size_t i=0; isrc is aligned. If unaligned it uses vec_lvsl,
/// vec_ld, vec_perm and src. The fixups using
/// vec_lvsl and vec_perm are relatively expensive so
-/// you should provide aligned memory adresses.
+/// you should provide aligned memory addresses.
/// \par Wraps
/// vec_ld, vec_lvsl, vec_perm
/// \sa VecLoad, VecLoadAligned
@@ -331,7 +331,7 @@ inline uint32x4_p VecLoad_ALTIVEC(const byte src[16])
/// of src is aligned. If unaligned it uses vec_lvsl,
/// vec_ld, vec_perm and src.
/// \details The fixups using vec_lvsl and vec_perm are
-/// relatively expensive so you should provide aligned memory adresses.
+/// relatively expensive so you should provide aligned memory addresses.
/// \par Wraps
/// vec_ld, vec_lvsl, vec_perm
/// \sa VecLoad, VecLoadAligned
@@ -806,7 +806,7 @@ inline uint32x4_p VecLoadBE(int off, const byte src[16])
/// \details VecStore_ALTIVEC() uses vec_st if the effective address
/// of dest is aligned, and uses vec_ste otherwise.
/// vec_ste is relatively expensive so you should provide aligned
-/// memory adresses.
+/// memory addresses.
/// \details VecStore_ALTIVEC() is used when POWER7 or above
/// and unaligned loads is not available.
/// \par Wraps
@@ -846,7 +846,7 @@ inline void VecStore_ALTIVEC(const T data, byte dest[16])
/// \details VecStore_ALTIVEC() uses vec_st if the effective address
/// of dest is aligned, and uses vec_ste otherwise.
/// vec_ste is relatively expensive so you should provide aligned
-/// memory adresses.
+/// memory addresses.
/// \details VecStore_ALTIVEC() is used when POWER7 or above
/// and unaligned loads is not available.
/// \par Wraps
diff --git a/pubkey.h b/pubkey.h
index 41a574a2a..b144e9e50 100644
--- a/pubkey.h
+++ b/pubkey.h
@@ -872,7 +872,7 @@ class CRYPTOPP_NO_VTABLE DL_GroupParameters : public CryptoParameters
}
/// \brief Exponentiates an element
- /// \param base the base elemenet
+ /// \param base the base element
/// \param exponent the exponent to raise the base
/// \return the result of the exponentiation
/// \details Internally, ExponentiateElement() calls SimultaneousExponentiate().
diff --git a/queue.cpp b/queue.cpp
index bc1495228..021e86a09 100644
--- a/queue.cpp
+++ b/queue.cpp
@@ -255,7 +255,7 @@ size_t ByteQueue::Put2(const byte *inString, size_t length, int messageEnd, bool
void ByteQueue::CleanupUsedNodes()
{
- // Test for m_head due to Enterprise Anlysis finding
+ // Test for m_head due to Enterprise Analysis finding
while (m_head && m_head != m_tail && m_head->UsedUp())
{
ByteQueueNode *temp=m_head;
@@ -263,7 +263,7 @@ void ByteQueue::CleanupUsedNodes()
delete temp;
}
- // Test for m_head due to Enterprise Anlysis finding
+ // Test for m_head due to Enterprise Analysis finding
if (m_head && m_head->CurrentSize() == 0)
m_head->Clear();
}
diff --git a/randpool.cpp b/randpool.cpp
index 8e686f07c..bda49ec00 100644
--- a/randpool.cpp
+++ b/randpool.cpp
@@ -105,7 +105,7 @@ void OldRandomPool::IncorporateEntropy(const byte *input, size_t length)
}
}
-// GenerateWord32 is overriden and provides Crypto++ 5.4 behavior.
+// GenerateWord32 is overridden and provides Crypto++ 5.4 behavior.
// Taken from RandomNumberGenerator::GenerateWord32 in cryptlib.cpp.
word32 OldRandomPool::GenerateWord32 (word32 min, word32 max)
{
diff --git a/randpool.h b/randpool.h
index e640b943f..da1c34870 100644
--- a/randpool.h
+++ b/randpool.h
@@ -87,7 +87,7 @@ class CRYPTOPP_DLL OldRandomPool : public RandomNumberGenerator
byte GenerateByte();
void GenerateBlock(byte *output, size_t size);
- // GenerateWord32 is overriden and provides Crypto++ 5.4 behavior.
+ // GenerateWord32 is overridden and provides Crypto++ 5.4 behavior.
// Taken from RandomNumberSource::GenerateWord32 in cryptlib.cpp.
word32 GenerateWord32 (word32 min=0, word32 max=0xffffffffUL);
diff --git a/rdrand.cpp b/rdrand.cpp
index f8ebe82bb..51c4ed8ab 100644
--- a/rdrand.cpp
+++ b/rdrand.cpp
@@ -12,12 +12,12 @@
// to select an implementation or throws "NotImplemented". Users of the
// classes should call HasRDRAND() or HasRDSEED() to determine if a
// generator is available at runtime.
-// The original classes accepted a retry count. Retries were superflous for
+// The original classes accepted a retry count. Retries were superfluous for
// RDRAND, and RDSEED encountered a failure about 1 in 256 bytes depending
// on the processor. Retries were removed at Crypto++ 6.0 because
// GenerateBlock unconditionally retries and always fulfills the request.
// Intel recommends using a retry count in case RDRAND or RDSEED circuit
-// is bad. This implemenation does not follow the advice and requires
+// is bad. This implementation does not follow the advice and requires
// good silicon. If the circuit or processor is bad then the user has
// bigger problems than generating random numbers.
diff --git a/rdrand.h b/rdrand.h
index 11d29ca99..17169c7a6 100644
--- a/rdrand.h
+++ b/rdrand.h
@@ -14,7 +14,7 @@
// to select an implementation or "throw NotImplemented". At runtime the
// constructor will throw RDRAND_Err or RDSEED_Err if a generator is
// is not available.
-// The original classes accepted a retry count. Retries were superflous for
+// The original classes accepted a retry count. Retries were superfluous for
// RDRAND, and RDSEED encountered a failure about 1 in 256 bytes depending
// on the processor. Retries were removed at Crypto++ 6.0 because
// GenerateBlock unconditionally retries and always fulfills the request.
@@ -107,7 +107,7 @@ class RDSEED : public RandomNumberGenerator
virtual ~RDSEED() {}
/// \brief Construct a RDSEED generator
- /// \details Empirical testing under a 6th generaton i7 (6200U) shows RDSEED fails
+ /// \details Empirical testing under a 6th generation i7 (6200U) shows RDSEED fails
/// to fulfill requests at about once every for every 256 bytes requested.
/// The generator runs about 4 times slower than RDRAND.
/// \throw RDSEED_Err if the random number generator is not available
diff --git a/rijndael.cpp b/rijndael.cpp
index 65f6d9e0a..945793f1f 100644
--- a/rijndael.cpp
+++ b/rijndael.cpp
@@ -136,7 +136,7 @@ ANONYMOUS_NAMESPACE_BEGIN
// with the same 4k block offsets as the Te table. Logically,
// the code is trying to create the condition:
//
-// Two sepearate memory pages:
+// Two separate memory pages:
//
// +-----+ +-----+
// |XXXXX| |YYYYY|
diff --git a/rng.h b/rng.h
index 7f982ab17..0ff2faae2 100644
--- a/rng.h
+++ b/rng.h
@@ -17,7 +17,7 @@ NAMESPACE_BEGIN(CryptoPP)
/// \brief Linear Congruential Generator (LCG)
/// \details Originally propsed by William S. England.
-/// \warning LC_RNG is suitable for simulations, where uniformaly distrubuted numbers are
+/// \warning LC_RNG is suitable for simulations, where uniformaly distributed numbers are
/// required quickly. It should not be used for cryptographic purposes.
class LC_RNG : public RandomNumberGenerator
{
diff --git a/scrypt.cpp b/scrypt.cpp
index 3b995813f..37bc6b7a3 100644
--- a/scrypt.cpp
+++ b/scrypt.cpp
@@ -237,7 +237,7 @@ void Scrypt::ValidateParameters(size_t derivedLen, word64 cost, word64 blockSize
// '128 * r * N' and '128 * r * p' do not overflow. They are the tests
// that set errno to ENOMEM. We can make the logic a little more clear
// using word128. At first blush the word128 may seem like overkill.
- // However, this alogirthm is dominated by slow moving parts, so a
+ // However, this algorithm is dominated by slow moving parts, so a
// one-time check is insignificant in the bigger picture.
#if defined(CRYPTOPP_WORD128_AVAILABLE)
const word128 maxElems = static_cast(SIZE_MAX);
diff --git a/shake.h b/shake.h
index 0eaab43b2..edf9df83c 100644
--- a/shake.h
+++ b/shake.h
@@ -75,7 +75,7 @@ class SHAKE_Final : public SHAKE
/// \details SHAKE128 and SHAKE256 don't need the output size in advance
/// because the output size does not affect the digest. TruncatedFinal
/// produces the correct digest for any output size. However, cSHAKE
- /// requires the output size in advance because the algoirthm uses
+ /// requires the output size in advance because the algorithm uses
/// output size as a parameter to the hash function.
SHAKE_Final(unsigned int outputSize=DIGESTSIZE) : SHAKE(outputSize) {}
@@ -111,7 +111,7 @@ class SHAKE128 : public SHAKE_Final<128>
/// \details SHAKE128 and SHAKE256 don't need the output size in advance
/// because the output size does not affect the digest. TruncatedFinal
/// produces the correct digest for any output size. However, cSHAKE
- /// requires the output size in advance because the algoirthm uses
+ /// requires the output size in advance because the algorithm uses
/// output size as a parameter to the hash function.
/// \since Crypto++ 8.1
SHAKE128() {}
@@ -120,7 +120,7 @@ class SHAKE128 : public SHAKE_Final<128>
/// \details SHAKE128 and SHAKE256 don't need the output size in advance
/// because the output size does not affect the digest. TruncatedFinal
/// produces the correct digest for any output size. However, cSHAKE
- /// requires the output size in advance because the algoirthm uses
+ /// requires the output size in advance because the algorithm uses
/// output size as a parameter to the hash function.
/// \since Crypto++ 8.1
SHAKE128(unsigned int outputSize) : SHAKE_Final<128>(outputSize) {}
@@ -141,7 +141,7 @@ class SHAKE256 : public SHAKE_Final<256>
/// \details SHAKE128 and SHAKE256 don't need the output size in advance
/// because the output size does not affect the digest. TruncatedFinal
/// produces the correct digest for any output size. However, cSHAKE
- /// requires the output size in advance because the algoirthm uses
+ /// requires the output size in advance because the algorithm uses
/// output size as a parameter to the hash function.
/// \since Crypto++ 8.1
SHAKE256() {}
@@ -150,7 +150,7 @@ class SHAKE256 : public SHAKE_Final<256>
/// \details SHAKE128 and SHAKE256 don't need the output size in advance
/// because the output size does not affect the digest. TruncatedFinal
/// produces the correct digest for any output size. However, cSHAKE
- /// requires the output size in advance because the algoirthm uses
+ /// requires the output size in advance because the algorithm uses
/// output size as a parameter to the hash function.
/// \since Crypto++ 8.1
SHAKE256(unsigned int outputSize) : SHAKE_Final<256>(outputSize) {}
diff --git a/shark.cpp b/shark.cpp
index 6e3b8da3f..6c725a4ff 100644
--- a/shark.cpp
+++ b/shark.cpp
@@ -40,7 +40,7 @@ void SHARK::Base::UncheckedSetKey(const byte *key, unsigned int keyLen, const Na
m_rounds = GetRoundsAndThrowIfInvalid(params, this);
m_roundKeys.New(m_rounds+1);
- // concatenate key enought times to fill a
+ // concatenate key enough times to fill a
for (unsigned int i=0; i<(m_rounds+1)*8; i++)
((byte *)m_roundKeys.begin())[i] = key[i%keyLen];
diff --git a/simple.h b/simple.h
index d3047e228..78de40983 100644
--- a/simple.h
+++ b/simple.h
@@ -18,7 +18,7 @@
NAMESPACE_BEGIN(CryptoPP)
-/// \brief Base class for identifying alogorithm
+/// \brief Base class for identifying algorithm
/// \tparam BASE base class from which to derive
/// \tparam DERIVED class which to clone
template
@@ -467,12 +467,12 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Store : public AutoSignalingSMS4 Encryption Algorithm for Wireless Networks,
/// Reference implementation using OpenSSL and
@@ -38,7 +38,7 @@ struct SM4_Info : public FixedBlockSize<16>, FixedKeyLength<16>
/// \brief Classes for the SM4 block cipher
/// \details SM4 is a block cipher designed by Xiaoyun Wang, et al. The block cipher is part of the
-/// Chinese State Cryptography Administration portfolio. The cipher was formely known as SMS4.
+/// Chinese State Cryptography Administration portfolio. The cipher was formerly known as SMS4.
/// \sa SMS4 Encryption Algorithm for Wireless Networks
/// \since Crypto++ 6.0
class CRYPTOPP_NO_VTABLE SM4 : public SM4_Info, public BlockCipherDocumentation
@@ -60,7 +60,7 @@ class CRYPTOPP_NO_VTABLE SM4 : public SM4_Info, public BlockCipherDocumentation
/// \details Enc provides implementation for encryption transformation. All key
/// sizes are supported.
/// \details SM4 encryption is accelerated on machines with AES-NI. Decryption is
- /// not acclerated because it is not profitable. Thanks to Markku-Juhani Olavi
+ /// not accelerated because it is not profitable. Thanks to Markku-Juhani Olavi
/// Saarinen.
/// \since Crypto++ 6.0, AESNI encryption since Crypto++ 8.0
class CRYPTOPP_NO_VTABLE Enc : public Base
@@ -78,7 +78,7 @@ class CRYPTOPP_NO_VTABLE SM4 : public SM4_Info, public BlockCipherDocumentation
/// \details Dec provides implementation for decryption transformation. All key
/// sizes are supported.
/// \details SM4 encryption is accelerated on machines with AES-NI. Decryption is
- /// not acclerated because it is not profitable. Thanks to Markku-Juhani Olavi
+ /// not accelerated because it is not profitable. Thanks to Markku-Juhani Olavi
/// Saarinen.
/// \since Crypto++ 6.0
class CRYPTOPP_NO_VTABLE Dec : public Base
diff --git a/smartptr.h b/smartptr.h
index 04cb9a420..da441f123 100644
--- a/smartptr.h
+++ b/smartptr.h
@@ -220,7 +220,7 @@ template counted_ptr & counted_ptr::operator=(const counted_ptr<
template class vector_member_ptrs
{
public:
- /// Construct an arry of \p T
+ /// Construct an array of \p T
/// \param size the size of the array, in elements
/// \details If \p T is a Plain Old Dataype (POD), then the array is uninitialized.
vector_member_ptrs(size_t size=0)
diff --git a/strciphr.h b/strciphr.h
index ec703c34d..ad905eebd 100644
--- a/strciphr.h
+++ b/strciphr.h
@@ -86,9 +86,9 @@ enum KeystreamOperationFlags {
/// \sa AdditiveCipherAbstractPolicy::GetBytesPerIteration(), AdditiveCipherAbstractPolicy::GetOptimalBlockSize()
/// and AdditiveCipherAbstractPolicy::GetAlignment()
enum KeystreamOperation {
- /// \brief Wirte the keystream to the output buffer, input is NULL
+ /// \brief Write the keystream to the output buffer, input is NULL
WRITE_KEYSTREAM = INPUT_NULL,
- /// \brief Wirte the keystream to the aligned output buffer, input is NULL
+ /// \brief Write the keystream to the aligned output buffer, input is NULL
WRITE_KEYSTREAM_ALIGNED = INPUT_NULL | OUTPUT_ALIGNED,
/// \brief XOR the input buffer and keystream, write to the output buffer
XOR_KEYSTREAM = 0,
@@ -399,7 +399,7 @@ class CRYPTOPP_NO_VTABLE AdditiveCipherTemplate : public BASE, public RandomNumb
size_t m_leftOver;
};
-/// \brief Policy object for feeback based stream ciphers
+/// \brief Policy object for feedback based stream ciphers
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CFB_CipherAbstractPolicy
{
public:
diff --git a/validat1.cpp b/validat1.cpp
index db5238802..fa9ae5978 100644
--- a/validat1.cpp
+++ b/validat1.cpp
@@ -1074,7 +1074,7 @@ bool TestAltivecOps()
return true;
}
- // These tests may seem superflous, but we really want to test the
+ // These tests may seem superfluous, but we really want to test the
// Altivec/POWER4 implementation. That does not happen when POWER7
// or POWER8 is available because we use POWER7's unaligned loads
// and stores with POWER8's AES, SHA, etc. These tests enage
diff --git a/validat10.cpp b/validat10.cpp
index 4e7bf9f8e..a8e92a52d 100644
--- a/validat10.cpp
+++ b/validat10.cpp
@@ -3,8 +3,8 @@
// Source files split in July 2018 to expedite compiles.
//
// There are two types or sets of self tests. First is a known answer test,
-// and second are pairwise consitency checks. The known answer tests are test
-// vectors lifted from libsodium. The pairwise consitency checks are randomized
+// and second are pairwise consistency checks. The known answer tests are test
+// vectors lifted from libsodium. The pairwise consistency checks are randomized
// and confirm the library can arrive at the same result or round trip data
// using it's own transformations.
//
diff --git a/validat7.cpp b/validat7.cpp
index 32db7e4db..62f5b1d08 100644
--- a/validat7.cpp
+++ b/validat7.cpp
@@ -262,7 +262,7 @@ bool ValidateEC2N_Agreement()
return pass;
}
-// TestX25519 is slighty more comprehensive than ValidateX25519
+// TestX25519 is slightly more comprehensive than ValidateX25519
// because it cross-validates against Bernstein's NaCL library.
// TestX25519 called in Debug builds.
bool TestX25519()
@@ -454,7 +454,7 @@ bool TestX25519()
return pass;
}
-// TestEd25519 is slighty more comprehensive than ValidateEd25519
+// TestEd25519 is slightly more comprehensive than ValidateEd25519
// because it cross-validates against Bernstein's NaCL library.
// TestEd25519 called in Debug builds.
bool TestEd25519()
diff --git a/xed25519.h b/xed25519.h
index 3dcbd2565..da79d10d1 100644
--- a/xed25519.h
+++ b/xed25519.h
@@ -69,7 +69,7 @@ class x25519 : public SimpleKeyAgreementDomain, public CryptoParameters, public
/// \brief Create a x25519 object
/// \details This constructor creates an empty x25519 object. It is
/// intended for use in loading existing parameters, like CryptoBox
- /// parameters. If you are perfoming key agreement you should use a
+ /// parameters. If you are performing key agreement you should use a
/// constructor that generates random parameters on construction.
x25519() {}
@@ -350,7 +350,7 @@ struct ed25519_MessageAccumulator : public PK_MessageAccumulator
/// If you call GetPrivateExponent() then the little-endian byte
/// array is converted to a big-endian Integer() so it can be
/// returned the way a caller expects. And calling
-/// SetPrivateExponent perfoms a similar internal conversion.
+/// SetPrivateExponent performs a similar internal conversion.
/// \since Crypto++ 8.0
struct ed25519PrivateKey : public PKCS8PrivateKey
{
@@ -360,7 +360,7 @@ struct ed25519PrivateKey : public PKCS8PrivateKey
/// \brief Size of the public key
/// \details PUBLIC_KEYLENGTH is the size of the public key, in bytes.
CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32);
- /// \brief Size of the siganture
+ /// \brief Size of the signature
/// \details SIGNATURE_LENGTH is the size of the signature, in bytes.
/// ed25519 is a DL-based signature scheme. The signature is the
/// concatenation of r || s.
@@ -503,7 +503,7 @@ struct ed25519Signer : public PK_Signer
/// \brief Size of the public key
/// \details PUBLIC_KEYLENGTH is the size of the public key, in bytes.
CRYPTOPP_CONSTANT(PUBLIC_KEYLENGTH = 32);
- /// \brief Size of the siganture
+ /// \brief Size of the signature
/// \details SIGNATURE_LENGTH is the size of the signature, in bytes.
/// ed25519 is a DL-based signature scheme. The signature is the
/// concatenation of r || s.
@@ -629,7 +629,7 @@ struct ed25519Signer : public PK_Signer
/// If you call GetPublicElement() then the little-endian byte
/// array is converted to a big-endian Integer() so it can be
/// returned the way a caller expects. And calling
-/// SetPublicElement() perfoms a similar internal conversion.
+/// SetPublicElement() performs a similar internal conversion.
/// \since Crypto++ 8.0
struct ed25519PublicKey : public X509PublicKey
{