mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-26 19:30:21 +00:00
Fix typos (PR# 1099)
This commit is contained in:
parent
d994989cda
commit
715a0bcce3
@ -5755,10 +5755,10 @@ if [[ "$IS_SOLARIS" -ne 0 ]]; then
|
||||
# Release build
|
||||
echo
|
||||
echo "************************************" | tee -a "$TEST_RESULTS"
|
||||
echo "Testing: Soalris GCC, release, default CXXFLAGS" | tee -a "$TEST_RESULTS"
|
||||
echo "Testing: Solaris GCC, release, default CXXFLAGS" | tee -a "$TEST_RESULTS"
|
||||
echo
|
||||
|
||||
TEST_LIST+=("Soalris GCC, release, default CXXFLAGS")
|
||||
TEST_LIST+=("Solaris GCC, release, default CXXFLAGS")
|
||||
|
||||
"$MAKE" clean &>/dev/null
|
||||
rm -f "${TMPDIR}/test.exe" &>/dev/null
|
||||
|
@ -58,7 +58,7 @@ PublicElement - the public element when KeyFormat=Component
|
||||
PrivateExponent - the private exponent when KeyFormat=Component
|
||||
Message - encoded string, message to be signed or verified
|
||||
Signature - encoded string, signature to be verified or compared with
|
||||
BlockSize - encoded string, block size for vaiable block ciphers
|
||||
BlockSize - encoded string, block size for variable block ciphers
|
||||
Plaintext - encoded string
|
||||
Ciphertext - encoded string
|
||||
Header - encoded string
|
||||
|
2
asn.h
2
asn.h
@ -110,7 +110,7 @@ public:
|
||||
/// \brief Construct an UnknownOID
|
||||
UnknownOID() : BERDecodeErr("BER decode error: unknown object identifier") {}
|
||||
/// \brief Construct an UnknownOID
|
||||
/// \param err error message to use for the execption
|
||||
/// \param err error message to use for the exception
|
||||
UnknownOID(const char *err) : BERDecodeErr(err) {}
|
||||
};
|
||||
|
||||
|
@ -182,7 +182,7 @@ void BaseN_Decoder::InitializeDecodingLookupArray(int *lookup, const byte *alpha
|
||||
for (unsigned int i=0; i<base; i++)
|
||||
{
|
||||
// Debug asserts for 'lookup[alphabet[i]] == -1' removed because the self tests
|
||||
// have unusal tests that try to break the encoders and decoders. Tests include
|
||||
// have unusual tests that try to break the encoders and decoders. Tests include
|
||||
// a string of the same characters. I.,e., a string of stars like '********...'.
|
||||
if (caseInsensitive && isalpha(alphabet[i]))
|
||||
{
|
||||
|
2
chacha.h
2
chacha.h
@ -3,7 +3,7 @@
|
||||
// and Bernstein's reference ChaCha family implementation at
|
||||
// http://cr.yp.to/chacha.html.
|
||||
|
||||
// The library added Bernstein's ChaCha classses at Crypto++ 5.6.4. The IETF
|
||||
// The library added Bernstein's ChaCha classes at Crypto++ 5.6.4. The IETF
|
||||
// uses a slightly different implementation than Bernstein, and the IETF
|
||||
// ChaCha and XChaCha classes were added at Crypto++ 8.1. We wanted to maintain
|
||||
// ABI compatibility at the 8.1 release so the original ChaCha classes were not
|
||||
|
@ -130,7 +130,7 @@
|
||||
#endif
|
||||
|
||||
// Couple to CRYPTOPP_DISABLE_AESNI, but use CRYPTOPP_CLMUL_AVAILABLE so we can selectively
|
||||
// disable for misbehaving platofrms and compilers, like Solaris or some Clang.
|
||||
// disable for misbehaving platforms and compilers, like Solaris or some Clang.
|
||||
#if defined(CRYPTOPP_DISABLE_AESNI)
|
||||
#define CRYPTOPP_DISABLE_CLMUL 1
|
||||
#endif
|
||||
|
@ -104,7 +104,7 @@
|
||||
/// \brief Override for internal linkage
|
||||
/// \details CRYPTOPP_TABLE can be used to override internal linkage
|
||||
/// on tables with the <tt>const</tt> qualifier. According to C++ rules
|
||||
/// a decalration with <tt>const</tt> qualifier is internal linkage.
|
||||
/// a declaration with <tt>const</tt> qualifier is internal linkage.
|
||||
/// \note The name CRYPTOPP_TABLE was chosen because it is often used to
|
||||
/// export a table, like AES or SHA constants. The name avoids collisions
|
||||
/// with the DLL gear macros, like CRYPTOPP_EXPORTS and CRYPTOPP_EXTERN.
|
||||
|
@ -22,7 +22,7 @@
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<!-- Microsoft documentation clearly shows the Global property group -->
|
||||
<!-- preceeds the import of Cpp.Default.props and Cpp.props -->
|
||||
<!-- precedes the import of Cpp.Default.props and Cpp.props -->
|
||||
<!-- https://msdn.microsoft.com/en-us/library/2208a1f2.aspx -->
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{94a428a1-9ba8-4db2-b76e-bd2e3c08f257}</ProjectGuid>
|
||||
|
@ -38,7 +38,7 @@
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<!-- Microsoft documentation clearly shows the Global property group -->
|
||||
<!-- preceeds the import of Cpp.Default.props and Cpp.props -->
|
||||
<!-- precedes the import of Cpp.Default.props and Cpp.props -->
|
||||
<!-- https://msdn.microsoft.com/en-us/library/2208a1f2.aspx -->
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{09cdac08-e6ae-48a9-8de7-0fbc779eebde}</ProjectGuid>
|
||||
|
12
cryptlib.h
12
cryptlib.h
@ -2100,7 +2100,7 @@ public:
|
||||
void CopyAllTo(BufferedTransformation &target, const std::string &channel=DEFAULT_CHANNEL) const;
|
||||
|
||||
/// \brief Retrieve the next message in a series
|
||||
/// \return true if a message was retreved, false otherwise
|
||||
/// \return true if a message was retrieved, false otherwise
|
||||
/// \details Internally, the base class implementation returns false.
|
||||
virtual bool GetNextMessageSeries() {return false;}
|
||||
/// \brief Provides the number of messages in a series
|
||||
@ -2432,7 +2432,7 @@ public:
|
||||
/// \throw NotImplemented
|
||||
/// \details Save() writes the material to a BufferedTransformation.
|
||||
/// \details If the material is a key, then the key is written with ASN.1 DER encoding. The key
|
||||
/// includes an object identifier with an algorthm id, like a subjectPublicKeyInfo.
|
||||
/// includes an object identifier with an algorithm id, like a subjectPublicKeyInfo.
|
||||
/// \details A "raw" key without the "key info" can be saved using a key's DEREncode() method.
|
||||
/// \details If a derived class does not override Save(), then the base class throws
|
||||
/// NotImplemented().
|
||||
@ -2449,7 +2449,7 @@ public:
|
||||
/// <li>the key should be ASN.1 BER encoded
|
||||
/// <li>the key should be a "key info"
|
||||
/// </ul>
|
||||
/// \details "key info" means the key should have an object identifier with an algorthm id,
|
||||
/// \details "key info" means the key should have an object identifier with an algorithm id,
|
||||
/// like a subjectPublicKeyInfo.
|
||||
/// \details To read a "raw" key without the "key info", then call the key's BERDecode() method.
|
||||
/// \note Load() generally does not check that the key is valid. Call Validate(), if needed.
|
||||
@ -2541,7 +2541,7 @@ class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE PrivateKey : public GeneratableCryptoMater
|
||||
{
|
||||
};
|
||||
|
||||
/// \brief Interface for crypto prameters
|
||||
/// \brief Interface for crypto parameters
|
||||
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE CryptoParameters : public GeneratableCryptoMaterial
|
||||
{
|
||||
};
|
||||
@ -2881,7 +2881,7 @@ public:
|
||||
/// \brief Create a new HashTransformation to accumulate the message to be signed
|
||||
/// \param rng a RandomNumberGenerator derived class
|
||||
/// \return a pointer to a PK_MessageAccumulator
|
||||
/// \details NewSignatureAccumulator() can be used with all signing methods. Sign() will autimatically delete the
|
||||
/// \details NewSignatureAccumulator() can be used with all signing methods. Sign() will automatically delete the
|
||||
/// accumulator pointer. The caller is responsible for deletion if a method is called that takes a reference.
|
||||
virtual PK_MessageAccumulator * NewSignatureAccumulator(RandomNumberGenerator &rng) const =0;
|
||||
|
||||
@ -2944,7 +2944,7 @@ public:
|
||||
|
||||
/// \brief Create a new HashTransformation to accumulate the message to be verified
|
||||
/// \return a pointer to a PK_MessageAccumulator
|
||||
/// \details NewVerificationAccumulator() can be used with all verification methods. Verify() will autimatically delete
|
||||
/// \details NewVerificationAccumulator() can be used with all verification methods. Verify() will automatically delete
|
||||
/// the accumulator pointer. The caller is responsible for deletion if a method is called that takes a reference.
|
||||
virtual PK_MessageAccumulator * NewVerificationAccumulator() const =0;
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<!-- Microsoft documentation clearly shows the Global property group -->
|
||||
<!-- preceeds the import of Cpp.Default.props and Cpp.props -->
|
||||
<!-- precedes the import of Cpp.Default.props and Cpp.props -->
|
||||
<!-- https://msdn.microsoft.com/en-us/library/2208a1f2.aspx -->
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{c39f4b46-6e89-4074-902e-ca57073044d2}</ProjectGuid>
|
||||
|
@ -19,7 +19,7 @@
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
// The purpose of this function Mash() is to take an arbitrary length input
|
||||
// string and *deterministicly* produce an arbitrary length output string such
|
||||
// string and *deterministically* produce an arbitrary length output string such
|
||||
// that (1) it looks random, (2) no information about the input is
|
||||
// deducible from it, and (3) it contains as much entropy as it can hold, or
|
||||
// the amount of entropy in the input string, whichever is smaller.
|
||||
@ -28,7 +28,7 @@ template <class H>
|
||||
static void Mash(const byte *in, size_t inLen, byte *out, size_t outLen, int iterations)
|
||||
{
|
||||
if (BytePrecision(outLen) > 2)
|
||||
throw InvalidArgument("Mash: output legnth too large");
|
||||
throw InvalidArgument("Mash: output length too large");
|
||||
|
||||
size_t bufSize = RoundUpToMultipleOf(outLen, (size_t)H::DIGESTSIZE);
|
||||
byte b[2];
|
||||
|
@ -22,7 +22,7 @@
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<!-- Microsoft documentation clearly shows the Global property group -->
|
||||
<!-- preceeds the import of Cpp.Default.props and Cpp.props -->
|
||||
<!-- precedes the import of Cpp.Default.props and Cpp.props -->
|
||||
<!-- https://msdn.microsoft.com/en-us/library/2208a1f2.aspx -->
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{1974a53a-9863-41c9-886d-b2b8c2fc3c8b}</ProjectGuid>
|
||||
|
@ -1935,7 +1935,7 @@ ed25519_sign_CXX(std::istream& stream, const byte sk[32], const byte pk[32], byt
|
||||
ALIGN(ALIGN_SPEC) ge25519 R;
|
||||
hash_512bits extsk, hashr, hram;
|
||||
|
||||
// Unfortunately we need to read the stream twice. The fisrt time calculates
|
||||
// Unfortunately we need to read the stream twice. The first time calculates
|
||||
// 'r = H(aExt[32..64], m)'. The second time calculates 'S = H(R,A,m)'. There
|
||||
// is a data dependency due to hashing 'RS' with 'R = [r]B' that does not
|
||||
// allow us to read the stream once.
|
||||
|
@ -1650,7 +1650,7 @@ ed25519_sign_CXX(std::istream& stream, const byte sk[32], const byte pk[32], byt
|
||||
ALIGN(ALIGN_SPEC) ge25519 R;
|
||||
hash_512bits extsk, hashr, hram;
|
||||
|
||||
// Unfortunately we need to read the stream twice. The fisrt time calculates
|
||||
// Unfortunately we need to read the stream twice. The first time calculates
|
||||
// 'r = H(aExt[32..64], m)'. The second time calculates 'S = H(R,A,m)'. There
|
||||
// is a data dependency due to hashing 'RS' with 'R = [r]B' that does not
|
||||
// allow us to read the stream once.
|
||||
|
@ -6,7 +6,7 @@
|
||||
// clean, but it has one potential problem. The original code is C and relies
|
||||
// upon unions. Accessing the inactive union member is undefined behavior in
|
||||
// C++. That means copying the array into packedelem8.u is OK; but then using
|
||||
// packedelem8.v in a calcualtion is UB. Fortunately most (all?) compilers
|
||||
// packedelem8.v in a calculation is UB. Fortunately most (all?) compilers
|
||||
// take pity on C++ developers and compile the code. We will have to keep an
|
||||
// eye on things or rewrite significant portions of this code.
|
||||
|
||||
|
10
eccrypto.h
10
eccrypto.h
@ -587,7 +587,7 @@ struct ECGDSA : public DL_SS<
|
||||
|
||||
/// \brief Elliptic Curve Integrated Encryption Scheme
|
||||
/// \tparam COFACTOR_OPTION cofactor multiplication option
|
||||
/// \tparam HASH HashTransformation derived class used for key drivation and MAC computation
|
||||
/// \tparam HASH HashTransformation derived class used for key derivation and MAC computation
|
||||
/// \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
|
||||
/// \details ECIES is an Elliptic Curve based Integrated Encryption Scheme (IES). The scheme combines a Key Encapsulation
|
||||
@ -595,7 +595,7 @@ struct ECGDSA : public DL_SS<
|
||||
/// <A HREF="http://en.wikipedia.org/wiki/ciphertext_indistinguishability">IND-CCA2</A>, which is a strong notion of security.
|
||||
/// You should prefer an Integrated Encryption Scheme over homegrown schemes.
|
||||
/// \details If you desire an Integrated Encryption Scheme with Crypto++ 4.2 compatibility, then use the ECIES_P1363.
|
||||
/// If you desire an Integrated Encryption Scheme compatibile with Bouncy Castle 1.54 and Botan 1.11 compatibility, then use the ECIES
|
||||
/// If you desire an Integrated Encryption Scheme compatible with Bouncy Castle 1.54 and Botan 1.11 compatibility, then use the ECIES
|
||||
/// template class with <tt>NoCofactorMultiplication</tt>, <tt>DHAES_MODE=true</tt> and <tt>LABEL_OCTETS=false</tt>.
|
||||
/// \details The default template parameters ensure compatibility with Bouncy Castle 1.54 and Botan 1.11. The combination of
|
||||
/// <tt>IncompatibleCofactorMultiplication</tt> and <tt>DHAES_MODE=true</tt> is recommended for best efficiency and security.
|
||||
@ -619,16 +619,16 @@ struct ECIES
|
||||
|
||||
/// \brief Elliptic Curve Integrated Encryption Scheme for P1363
|
||||
/// \tparam COFACTOR_OPTION cofactor multiplication option
|
||||
/// \tparam HASH HashTransformation derived class used for key drivation and MAC computation
|
||||
/// \tparam HASH HashTransformation derived class used for key derivation and MAC computation
|
||||
/// \details ECIES_P1363 is an Elliptic Curve based Integrated Encryption Scheme (IES) for P1363. The scheme combines a Key Encapsulation
|
||||
/// Method (KEM) with a Data Encapsulation Method (DEM) and a MAC tag. The scheme is
|
||||
/// <A HREF="http://en.wikipedia.org/wiki/ciphertext_indistinguishability">IND-CCA2</A>, which is a strong notion of security.
|
||||
/// You should prefer an Integrated Encryption Scheme over homegrown schemes.
|
||||
/// \details The library's original implementation is based on an early P1363 draft, which itself appears to be based on an early Certicom
|
||||
/// SEC-1 draft (or an early SEC-1 draft was based on a P1363 draft). Crypto++ 4.2 used the early draft in its Integrated Ecryption
|
||||
/// SEC-1 draft (or an early SEC-1 draft was based on a P1363 draft). Crypto++ 4.2 used the early draft in its Integrated Enryption
|
||||
/// Schemes with <tt>NoCofactorMultiplication</tt>, <tt>DHAES_MODE=false</tt> and <tt>LABEL_OCTETS=true</tt>.
|
||||
/// \details If you desire an Integrated Encryption Scheme with Crypto++ 4.2 compatibility, then use the ECIES_P1363.
|
||||
/// If you desire an Integrated Encryption Scheme compatibile with Bouncy Castle 1.54 and Botan 1.11 compatibility, then use the ECIES
|
||||
/// If you desire an Integrated Encryption Scheme compatible with Bouncy Castle 1.54 and Botan 1.11 compatibility, then use the ECIES
|
||||
/// template class with <tt>NoCofactorMultiplication</tt>, <tt>DHAES_MODE=true</tt> and <tt>LABEL_OCTETS=false</tt>.
|
||||
/// \details The default template parameters ensure compatibility with P1363. The combination of
|
||||
/// <tt>IncompatibleCofactorMultiplication</tt> and <tt>DHAES_MODE=true</tt> is recommended for best efficiency and security.
|
||||
|
10
filters.h
10
filters.h
@ -25,7 +25,7 @@
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// \brief Implementation of BufferedTransformation's attachment interface
|
||||
/// \details Filter is a cornerstone of the Pipeline trinitiy. Data flows from
|
||||
/// \details Filter is a cornerstone of the Pipeline trinity. Data flows from
|
||||
/// Sources, through Filters, and then terminates in Sinks. The difference
|
||||
/// between a Source and Filter is a Source \a pumps data, while a Filter does
|
||||
/// not. The difference between a Filter and a Sink is a Filter allows an
|
||||
@ -222,7 +222,7 @@ struct CRYPTOPP_DLL FilterPutSpaceHelper
|
||||
byte *HelpCreatePutSpace(BufferedTransformation &target, const std::string &channel, size_t minSize, size_t bufferSize)
|
||||
{return HelpCreatePutSpace(target, channel, minSize, minSize, bufferSize);}
|
||||
|
||||
/// \brief Temporay working space
|
||||
/// \brief Temporary working space
|
||||
SecByteBlock m_tempSpace;
|
||||
};
|
||||
|
||||
@ -537,7 +537,7 @@ public:
|
||||
/// \param c reference to a StreamTransformation
|
||||
/// \param attachment an optional attached transformation
|
||||
/// \param padding the \ref BlockPaddingSchemeDef "padding scheme"
|
||||
/// \details This contructor creates a StreamTransformationFilter() for stream ciphers and
|
||||
/// \details This constructor creates a StreamTransformationFilter() for stream ciphers and
|
||||
/// confidentiality-only block cipher modes of operation. If you are using an authenticated
|
||||
/// encryption mode of operation, then use either AuthenticatedEncryptionFilter() or
|
||||
/// AuthenticatedDecryptionFilter().
|
||||
@ -1191,7 +1191,7 @@ private:
|
||||
|
||||
/// \brief Copy input to a memory buffer
|
||||
/// \details ArraySink wraps a fixed size buffer. The buffer is full once Put returns non-0.
|
||||
/// When used in a pipleline, ArraySink silently discards input if the buffer is full.
|
||||
/// When used in a pipeline, ArraySink silently discards input if the buffer is full.
|
||||
/// AvailableSize() can be used to determine how much space remains in the buffer.
|
||||
/// TotalPutLength() can be used to determine how many bytes were processed.
|
||||
/// \sa StringSink, ArrayXorSink
|
||||
@ -1233,7 +1233,7 @@ protected:
|
||||
|
||||
/// \brief Xor input to a memory buffer
|
||||
/// \details ArrayXorSink wraps a fixed size buffer. The buffer is full once Put returns non-0.
|
||||
/// When used in a pipleline, ArrayXorSink silently discards input if the buffer is full.
|
||||
/// When used in a pipeline, ArrayXorSink silently discards input if the buffer is full.
|
||||
/// AvailableSize() can be used to determine how much space remains in the buffer.
|
||||
/// TotalPutLength() can be used to determine how many bytes were processed.
|
||||
/// \sa StringSink, ArraySink
|
||||
|
@ -17,7 +17,7 @@
|
||||
NAMESPACE_BEGIN(CryptoPP)
|
||||
|
||||
/// Exception thrown when a crypto algorithm is used after a self test fails
|
||||
/// \details The self tests for an algorithm are performed by Algortihm class
|
||||
/// \details The self tests for an algorithm are performed by Algorithm class
|
||||
/// when CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 is defined.
|
||||
class CRYPTOPP_DLL SelfTestFailure : public Exception
|
||||
{
|
||||
@ -51,7 +51,7 @@ enum PowerUpSelfTestStatus {
|
||||
/// \param expectedModuleMac the expected MAC of the components protected by the integrity check
|
||||
/// \details Performs the power-up self test, and sets the self test status to
|
||||
/// POWER_UP_SELF_TEST_PASSED or POWER_UP_SELF_TEST_FAILED.
|
||||
/// \details The self tests for an algorithm are performed by the Algortihm class
|
||||
/// \details The self tests for an algorithm are performed by the Algorithm class
|
||||
/// when CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 is defined.
|
||||
CRYPTOPP_DLL void CRYPTOPP_API DoPowerUpSelfTest(const char *moduleFilename, const byte *expectedModuleMac);
|
||||
|
||||
@ -59,7 +59,7 @@ CRYPTOPP_DLL void CRYPTOPP_API DoPowerUpSelfTest(const char *moduleFilename, con
|
||||
/// \details Performs the power-up self test using the filename of this DLL and the
|
||||
/// embedded module MAC, and sets the self test status to POWER_UP_SELF_TEST_PASSED or
|
||||
/// POWER_UP_SELF_TEST_FAILED.
|
||||
/// \details The self tests for an algorithm are performed by the Algortihm class
|
||||
/// \details The self tests for an algorithm are performed by the Algorithm class
|
||||
/// when CRYPTOPP_ENABLE_COMPLIANCE_WITH_FIPS_140_2 is defined.
|
||||
CRYPTOPP_DLL void CRYPTOPP_API DoDllPowerUpSelfTest();
|
||||
|
||||
@ -83,7 +83,7 @@ CRYPTOPP_DLL MessageAuthenticationCode * CRYPTOPP_API NewIntegrityCheckingMAC();
|
||||
/// \param moduleFilename the fully qualified name of the module
|
||||
/// \param expectedModuleMac the expected MAC of the components protected by the integrity check
|
||||
/// \param pActualMac the actual MAC of the components calculated by the integrity check
|
||||
/// \param pMacFileLocation the offest of the MAC in the PE/PE+ module
|
||||
/// \param pMacFileLocation the offset of the MAC in the PE/PE+ module
|
||||
/// \return true if the MAC is valid, false otherwise
|
||||
CRYPTOPP_DLL bool CRYPTOPP_API IntegrityCheckModule(const char *moduleFilename, const byte *expectedModuleMac, SecByteBlock *pActualMac = NULLPTR, unsigned long *pMacFileLocation = NULLPTR);
|
||||
|
||||
|
2
gf2n.h
2
gf2n.h
@ -28,7 +28,7 @@ class CRYPTOPP_DLL PolynomialMod2
|
||||
public:
|
||||
/// \name ENUMS, EXCEPTIONS, and TYPEDEFS
|
||||
//@{
|
||||
/// \brief Excpetion thrown when divide by zero is encountered
|
||||
/// \brief Exception thrown when divide by zero is encountered
|
||||
class DivideByZero : public Exception
|
||||
{
|
||||
public:
|
||||
|
@ -864,7 +864,7 @@ CRYPTOPP_DLL_TEMPLATE_CLASS DL_PrivateKey_WithSignaturePairwiseConsistencyTest<D
|
||||
/// \details If you need this method for Crypto++ 4.2 compatibility, then use the ECIES template class with
|
||||
/// <tt>NoCofactorMultiplication</tt>, <tt>DHAES_MODE=false</tt> and <tt>LABEL_OCTETS=true</tt>.
|
||||
/// \details If you need this method for Bouncy Castle 1.54 and Botan 1.11 compatibility, then use the ECIES template class with
|
||||
/// <tt>NoCofactorMultiplication</tt>, <tt>DHAES_MODE=ture</tt> and <tt>LABEL_OCTETS=false</tt>.
|
||||
/// <tt>NoCofactorMultiplication</tt>, <tt>DHAES_MODE=true</tt> and <tt>LABEL_OCTETS=false</tt>.
|
||||
/// \details Bouncy Castle 1.54 and Botan 1.11 compatibility are the default template parameters.
|
||||
/// \since Crypto++ 4.0
|
||||
template <class MAC, bool DHAES_MODE, bool LABEL_OCTETS=false>
|
||||
|
@ -20,7 +20,7 @@
|
||||
// them. Initialization priorities are init_priority() on Linux and init_seg()
|
||||
// on Windows. OS X and several other platforms lack them. Initialization
|
||||
// priorities are platform specific but they are also the most trouble free
|
||||
// with determisitic destruction.
|
||||
// with deterministic destruction.
|
||||
// Second, if C++11 dynamic initialization is available, then we use it. After
|
||||
// the std::call_once fiasco we moved to dynamic initialization to avoid
|
||||
// unknown troubles platforms that are tested less frequently. In addition
|
||||
@ -39,7 +39,7 @@
|
||||
// resource acquisition in reverse. For resources provided through the
|
||||
// Singletons, there is no way to express the dependency order to safely
|
||||
// destroy resources. (That's one of the problems C++11 dynamic
|
||||
// intitialization with concurrent execution is supposed to solve).
|
||||
// initialization with concurrent execution is supposed to solve).
|
||||
// The final problem with Singletons is resource/memory exhaustion in languages
|
||||
// like Java and .Net. Java and .Net load and unload a native DLL hundreds or
|
||||
// thousands of times during the life of a program. Each load produces a
|
||||
@ -4762,7 +4762,7 @@ const Integer& MontgomeryRepresentation::MultiplicativeInverse(const Integer &a)
|
||||
}
|
||||
|
||||
// Specialization declared in misc.h to allow us to print integers
|
||||
// with additional control options, like arbirary bases and uppercase.
|
||||
// with additional control options, like arbitrary bases and uppercase.
|
||||
template <> CRYPTOPP_DLL
|
||||
std::string IntToString<Integer>(Integer value, unsigned int base)
|
||||
{
|
||||
|
@ -553,7 +553,7 @@ public:
|
||||
/// \name BINARY OPERATORS
|
||||
//@{
|
||||
/// \brief Perform signed comparison
|
||||
/// \param a the Integer to comapre
|
||||
/// \param a the Integer to compare
|
||||
/// \retval -1 if <tt>*this < a</tt>
|
||||
/// \retval 0 if <tt>*this = a</tt>
|
||||
/// \retval 1 if <tt>*this > a</tt>
|
||||
|
2
keccak.h
2
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 <tt>r()</tt> (which will be <tt>200-2*24 = 152</tt>).
|
||||
/// XOF d=0x01, and a new value for <tt>r()</tt> (which will be <tt>200-2*24 = 152</tt>).
|
||||
/// <pre> Keccack_192 : public Keccack
|
||||
/// {
|
||||
/// public:
|
||||
|
@ -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 @@ protected:
|
||||
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};
|
||||
|
2
misc.cpp
2
misc.cpp
@ -254,7 +254,7 @@ bool VerifyBufsEqual(const byte *buf, const byte *mask, size_t count)
|
||||
for (size_t i=0; i<count; i++)
|
||||
acc8 |= buf[i] ^ mask[i];
|
||||
|
||||
// word32 resuts in this tail code on x86:
|
||||
// word32 results in this tail code on x86:
|
||||
// 33a: 85 c0 test %eax, %eax
|
||||
// 33c: 0f 94 c0 sete %al
|
||||
// 33f: c3 ret
|
||||
|
@ -847,7 +847,7 @@ Integer Lucas(const Integer &e, const Integer &pIn, const Integer &n)
|
||||
return m.ConvertOut(v);
|
||||
}
|
||||
|
||||
// This is Peter Montgomery's unpublished Lucas sequence evalutation algorithm.
|
||||
// This is Peter Montgomery's unpublished Lucas sequence evaluation algorithm.
|
||||
// The total number of multiplies and squares used is less than the binary
|
||||
// algorithm (see above). Unfortunately I can't get it to run as fast as
|
||||
// the binary algorithm because of the extra overhead.
|
||||
|
2
oids.h
2
oids.h
@ -1,7 +1,7 @@
|
||||
// oids.h - originally written and placed in the public domain by Wei Dai
|
||||
|
||||
/// \file oids.h
|
||||
/// \brief ASN.1 object identifiers for algorthms and schemes
|
||||
/// \brief ASN.1 object identifiers for algorithms and schemes
|
||||
/// \details Most OIDs can be found at http://www.oid-info.com/. The Chinese OIDs
|
||||
/// are assigned in GM/T 0006-2012, Cryptographic Application Identifier Criterion
|
||||
/// Specification. A reproduction can be found at http://gmssl.org/docs/oid.html.
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Based on Andy Polyakov's Base-2^26 scalar multiplication implementation.
|
||||
// For more information, see https://www.openssl.org/~appro/cryptogams/.
|
||||
|
||||
// The library added Bernstein's Poly1305 classses at Crypto++ 6.0. The IETF
|
||||
// The library added Bernstein's Poly1305 classes at Crypto++ 6.0. The IETF
|
||||
// uses a slightly different implementation than Bernstein, and the IETF
|
||||
// classes were added at Crypto++ 8.1. We wanted to maintain ABI compatibility
|
||||
// at the 8.1 release so the original Poly1305 classes were not disturbed.
|
||||
|
12
ppc_simd.h
12
ppc_simd.h
@ -4,8 +4,8 @@
|
||||
/// \brief Support functions for PowerPC and vector operations
|
||||
/// \details This header provides an agnostic interface into Clang, GCC
|
||||
/// and IBM XL C/C++ compilers modulo their different built-in functions
|
||||
/// for accessing vector intructions.
|
||||
/// \details The abstractions are necesssary to support back to GCC 4.8 and
|
||||
/// for accessing vector instructions.
|
||||
/// \details The abstractions are necessary to support back to GCC 4.8 and
|
||||
/// XLC 11 and 12. GCC 4.8 and 4.9 are still popular, and they are the
|
||||
/// default compiler for GCC112, GCC119 and others on the compile farm.
|
||||
/// Older IBM XL C/C++ compilers also have the need due to lack of
|
||||
@ -300,7 +300,7 @@ inline T VecReverseBE(const T data)
|
||||
/// of <tt>src</tt> is aligned. If unaligned it uses <tt>vec_lvsl</tt>,
|
||||
/// <tt>vec_ld</tt>, <tt>vec_perm</tt> and <tt>src</tt>. The fixups using
|
||||
/// <tt>vec_lvsl</tt> and <tt>vec_perm</tt> 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 <tt>src</tt> is aligned. If unaligned it uses <tt>vec_lvsl</tt>,
|
||||
/// <tt>vec_ld</tt>, <tt>vec_perm</tt> and <tt>src</tt>.
|
||||
/// \details The fixups using <tt>vec_lvsl</tt> and <tt>vec_perm</tt> 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 <tt>vec_st</tt> if the effective address
|
||||
/// of <tt>dest</tt> is aligned, and uses <tt>vec_ste</tt> otherwise.
|
||||
/// <tt>vec_ste</tt> 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 <tt>vec_st</tt> if the effective address
|
||||
/// of <tt>dest</tt> is aligned, and uses <tt>vec_ste</tt> otherwise.
|
||||
/// <tt>vec_ste</tt> 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
|
||||
|
2
pubkey.h
2
pubkey.h
@ -872,7 +872,7 @@ public:
|
||||
}
|
||||
|
||||
/// \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().
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -87,7 +87,7 @@ public:
|
||||
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);
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
4
rdrand.h
4
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 @@ public:
|
||||
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
|
||||
|
@ -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|
|
||||
|
2
rng.h
2
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
|
||||
{
|
||||
|
@ -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<word128>(SIZE_MAX);
|
||||
|
10
shake.h
10
shake.h
@ -75,7 +75,7 @@ public:
|
||||
/// \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 @@ public:
|
||||
/// \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 @@ public:
|
||||
/// \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 @@ public:
|
||||
/// \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 @@ public:
|
||||
/// \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) {}
|
||||
|
@ -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];
|
||||
|
||||
|
6
simple.h
6
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 <class DERIVED, class BASE>
|
||||
@ -467,12 +467,12 @@ protected:
|
||||
};
|
||||
|
||||
/// \brief Implementation of BufferedTransformation's attachment interface
|
||||
/// \details Sink is a cornerstone of the Pipeline trinitiy. Data flows from
|
||||
/// \details Sink is a cornerstone of the Pipeline trinity. Data flows from
|
||||
/// Sources, through Filters, and then terminates in Sinks. The difference
|
||||
/// between a Source and Filter is a Source \a pumps data, while a Filter does
|
||||
/// not. The difference between a Filter and a Sink is a Filter allows an
|
||||
/// attached transformation, while a Sink does not.
|
||||
/// \details A Sink doesnot produce any retrievable output.
|
||||
/// \details A Sink does not produce any retrievable output.
|
||||
/// \details See the discussion of BufferedTransformation in cryptlib.h for
|
||||
/// more details.
|
||||
class CRYPTOPP_DLL CRYPTOPP_NO_VTABLE Sink : public BufferedTransformation
|
||||
|
10
sm4.h
10
sm4.h
@ -3,8 +3,8 @@
|
||||
/// \file sm4.h
|
||||
/// \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.
|
||||
/// \details SM4 encryption is accelerated on machines with AES-NI. Decryption is not acclerated because
|
||||
/// Chinese State Cryptography Administration portfolio. The cipher was formerly known as SMS4.
|
||||
/// \details SM4 encryption is accelerated on machines with AES-NI. Decryption is not accelerated because
|
||||
/// it is not profitable. Thanks to Markku-Juhani Olavi Saarinen for help and the code.
|
||||
/// \sa <A HREF="http://eprint.iacr.org/2008/329.pdf">SMS4 Encryption Algorithm for Wireless Networks</A>,
|
||||
/// <A HREF="http://github.com/guanzhi/GmSSL">Reference implementation using OpenSSL</A> 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 <A HREF="http://eprint.iacr.org/2008/329.pdf">SMS4 Encryption Algorithm for Wireless Networks</A>
|
||||
/// \since Crypto++ 6.0
|
||||
class CRYPTOPP_NO_VTABLE SM4 : public SM4_Info, public BlockCipherDocumentation
|
||||
@ -60,7 +60,7 @@ public:
|
||||
/// \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 @@ public:
|
||||
/// \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
|
||||
|
@ -220,7 +220,7 @@ template <class T> counted_ptr<T> & counted_ptr<T>::operator=(const counted_ptr<
|
||||
template <class T> 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)
|
||||
|
@ -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 @@ protected:
|
||||
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:
|
||||
|
@ -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
|
||||
|
@ -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.
|
||||
//
|
||||
|
@ -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()
|
||||
|
10
xed25519.h
10
xed25519.h
@ -69,7 +69,7 @@ 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 @@ protected:
|
||||
/// 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 <tt>r || s</tt>.
|
||||
@ -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 <tt>r || s</tt>.
|
||||
@ -629,7 +629,7 @@ protected:
|
||||
/// 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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user