| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
The library used to provide DEFAULT_CHANNEL and AAD_CHANNEL this way. We experienced Static Initialization Order Fiasco crashes on occassion, so we moved them into cryptlib.h with internal linkage. The cost was, each translation unit got a copy of the strings which contributed to bloat. Issue 751 shows Clang compiles the global constructors for DEFAULT_CHANNEL and AAD_CHANNEL above the base ISA so we caught crashes on OS X with down-level hardware.
We are now at a "pick your poison" point. We selected Static Initialization Order Fiasco because it seems to be less prevalent.
Hat tip to the C++ Committee for allowing this problem to fester for three decades.
|
|
|
| |
Also see https://groups.google.com/forum/#!topic/cryptopp-users/5btwLoxXXD4.
|
|
|
|
| |
This helps contain UB on pointer subtraction by ensuring a ptrdiff_t is used. The code is a little uglier but it is also more portable.
|
|
|
|
|
|
| |
Increase use of ptrdiff_t when performing pointer math
Reduce AlgorithmProvider overrides
Fix CPU_ProbeARMv7 on Aarch64
|
|
|
|
| |
Also see https://stackoverflow.com/q/49658309/608639
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This may cause GH #300, "Clang 3.9 and missing member definitions for template classes" or GH #294, "Fix clang warnings about undefined variable templates in pkcspad.h" to resurface. Man I hope not...
|
| |
|
|
|
|
| |
overflowed to 0xYYYY" (GH #549)
|
|
|
|
| |
Also see https://groups.google.com/forum/#!topic/cryptopp-users/A7-Xt5Knlzw
|
|
|
|
| |
Removed defined-out code
|
|
|
|
| |
Update comments and documentation
|
| |
|
|
|
|
|
|
| |
Some authenticated encryption modes have needs that are not expressed well with MandatoryBlockSize() and MinLastBlockSize(). When IsLastBlockSpecial() returns true three things happen. First, standard block cipher padding is not applied. Second, the ProcessLastBlock() is used that provides inString and outString lengths. Third, outString is larger than inString by 2*MandatoryBlockSize(). That is, there's a reserve available when processing the last block.
The return value of ProcessLastBlock() indicates how many bytes were written to outString. A filter driving data will send outString and returned length to an AttachedTransformation() for additional processing.
|
|
|
|
| |
Its too noisy
|
| |
|
|
|
|
| |
This broke some self tests.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should lead the way for more modern block ciphers like Threefish and Kalyna. It tested well with both regular cipher modes (the mode has an instance of the cipher) and external cipher modes (the cipher and mode are distinct objects, and the mode holds a reference to the cipher).
We still have to work out the details of naming a cipher. For example, Kalyna with a 128-bit key can use a 128-bit or 256-bit block size. Kalyna-128 is not enough to describe the algorithm and locate it in the object registry. Kalyna-128-128 looks kind of weird; maybe Kalyna-128(128) or Kalyna-128(256) would be better.
Here are the initial test cases to verify functionality:
byte key[64] = {}, iv[32] = {};
ECB_Mode<Kalyna>::Encryption enc1;
enc1.SetKey(key, 16);
CBC_Mode<Kalyna>::Encryption enc2;
enc2.SetKeyWithIV(key, 16, iv);
AlgorithmParameters params = MakeParameters
(Name::BlockSize(), 32)
(Name::IV(), ConstByteArrayParameter(iv, 32));
CTR_Mode<Kalyna>::Encryption enc3;
enc3.SetKey(key, 16, params);
CBC_Mode<Kalyna>::Encryption enc4;
enc4.SetKey(key, 32, params);
Kalyna::Encryption enc5;
ECB_Mode_ExternalCipher::Encryption ecb(enc5);
ecb.SetKey(key, 16, params);
Kalyna::Encryption enc6;
ECB_Mode_ExternalCipher::Encryption cbc(enc6);
cbc.SetKey(key, 32, params);
|
|
|
|
|
|
|
|
|
|
|
| |
Wrap DetectArmFeatures and DetectX86Features in InitializeCpu class
Use init_priority for InitializeCpu
Remove HAVE_GCC_CONSTRUCTOR1 and HAVE_GCC_CONSTRUCTOR0
Use init_seg(<name>) on Windows and explicitly insert at XCU segment
Simplify logic for HAVE_GAS
Remove special recipies for MACPORTS_GCC_COMPILER
Move C++ static initializers into anonymous namespace when possible
Add default NullNameValuePairs ctor for Clang
|
|
|
|
|
| |
When MSVC init_seg or GCC init_priority is available, we don't need to use the Singleton. We only need to create a file scope class variable and place it in the segment for MSVC or provide the attribute for GCC.
An additional upside is we cleared all the memory leaks that used to be reported by MSVC for debug builds.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
These function are intended to catch mining and matching of library versions. BuildVersion provides CRYPTOPP_VERSION when the shared object was built. RuntimeVersion provides CRYPTOPP_VERSION the app compiled against, which could be different than the shared object's version
|
|
|
|
| |
We have made a fair number of changes, and we don't want WD to receive credit for issues he was not part of
|
| |
|
| |
|
| |
|
|
|
|
| |
trap.h and CRYPTOPP_ASSERT has existed for over a year in Master. We deferred on the cut-over waiting for a minor version bump (5.7). We have to use it now due to CVE-2016-7420
|
| |
|
|
|
|
| |
(Issue 223)
|
|
|
|
| |
(Coverity rollup)
|
| |
|
|
|
|
| |
AadChannel(). Cout-over DEFAULT_CHANNEL and AAD_CHANNEL to use them behind the scenes
|
| |
|
|
|
|
| |
{libc++, libstdc++}. It included bringing in the correct <memory> in <stdcpp.h>, and then only including <stdcpp.h> when <memory> was needed.
|
| |
|
| |
|
|
|
|
| |
compilers. The macro was needed to help with managing old compilers, like GCC 4.2.1, present on OpenBSD
|
| |
|
|
|
|
|
| |
tolerate double destruction of Singleton and g_nullNameValuePairs
fix #include of standard headers
|
|
|
|
|
| |
add DEFAULT_CHANNEL and AAD_CHANNEL,
fix macChannel for AuthenticatedEncryptionFilter
|
| |
|