issue_owner_repo listlengths 2 2 | issue_body stringlengths 0 261k ⌀ | issue_title stringlengths 1 925 | issue_comments_url stringlengths 56 81 | issue_comments_count int64 0 2.5k | issue_created_at stringlengths 20 20 | issue_updated_at stringlengths 20 20 | issue_html_url stringlengths 37 62 | issue_github_id int64 387k 2.46B | issue_number int64 1 127k |
|---|---|---|---|---|---|---|---|---|---|
[
"weidai11",
"cryptopp"
] | Add SHAKE128 and SHAKE256. Also see [FIPS 202, SHA-3 Standard: Permutation-Based Hash and Extendable-Output Functions](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf) | Add SHAKE-128 and SHAKE-256 | https://api.github.com/repos/weidai11/cryptopp/issues/805/comments | 1 | 2019-02-13T00:15:55Z | 2019-02-13T04:18:29Z | https://github.com/weidai11/cryptopp/issues/805 | 409,562,841 | 805 |
[
"weidai11",
"cryptopp"
] | ### Crypto++ 8.0 Issue Report
The type uint8_t and int64_t not defined under old VC. So we need add following workaround to the head of this cpp file:
```C++
#if defined(_MSC_VER) && _MSC_VER < 1700
typedef unsigned char uint8_t;
typedef signed __int64 int64_t;
#endif
```
| donna_64.cpp failed to compile under VC2005 with x64 target | https://api.github.com/repos/weidai11/cryptopp/issues/802/comments | 1 | 2019-02-12T18:19:29Z | 2019-02-12T19:40:47Z | https://github.com/weidai11/cryptopp/issues/802 | 409,435,900 | 802 |
[
"weidai11",
"cryptopp"
] | ### Crypto++ 8.0 Issue Report
A method:
```C++
std::string AlgorithmProvider() const {return Panama<B>::AlgorithmProvider();}
```
Need to be added to the PanamaHash class, otherwise following code will produce a few of compiler errors:
```C++
HMAC<CryptoPP::Weak::PanamaHash<LittleEndian> > testL;
// or
HMAC<CryptoPP::Weak::PanamaHash<BigEndian> > testB;
```
| Missing method "AlgorithmProvider" on class "PanamaHash" | https://api.github.com/repos/weidai11/cryptopp/issues/801/comments | 2 | 2019-02-12T17:47:08Z | 2019-02-12T20:05:57Z | https://github.com/weidai11/cryptopp/issues/801 | 409,422,782 | 801 |
[
"weidai11",
"cryptopp"
] | ### Crypto++ 8.0 Issue Report
I think the old ChaCha8, ChaCha12 and ChaCha20 is better then current ChaCha with "Rounds" parameter, because:
1. New API need to setting up the rounds on every key reset. This usage is neither natural nor convenient, since the rounds is itself a fixed part of the algorithm, it is usually not modified when changing the key. In essence, different rounds can actually be seen as completely different algorithms. Setting the number of rounds from 8 to 20 is like switching the encryption algorithm from DES to AES. The new API forces us to remember its rounds and specify it each time we reset the password.
2. Template parameters are known constants at compile time, and I guess using template parameters allows some compilers to better optimize their generated code. | The old ChaCha8, ChaCha12 and ChaCha20 is better then current ChaCha with "Rounds" parameter | https://api.github.com/repos/weidai11/cryptopp/issues/800/comments | 3 | 2019-02-12T17:31:42Z | 2019-02-12T21:56:48Z | https://github.com/weidai11/cryptopp/issues/800 | 409,416,397 | 800 |
[
"weidai11",
"cryptopp"
] | ### Crypto++ Issue Report
Win10 1809 VS2017
Crypto++8.0
VS2017 build
CryptoPP::HexDecoder decode

| HexDecoder decode will cause exception on Win10 x64 | https://api.github.com/repos/weidai11/cryptopp/issues/799/comments | 2 | 2019-02-12T14:02:12Z | 2019-02-12T16:59:22Z | https://github.com/weidai11/cryptopp/issues/799 | 409,314,754 | 799 |
[
"weidai11",
"cryptopp"
] | Hi,
We are receiving crashes from our users in the cryptopp library. We have an iOS application, currently the app is linking with cryptopp version 8, to be more precise, we built cryptopp pointed to the commit: 982655845a784a9a4cfbc92221359a25a74184a3 using the setenv-ios.sh script.
The crash is not a new for us, in previous versions of our app we had the same crash too, using the cryptopp version 5.6.5. I thought that updating the cryptopp lib the crash could be mitigated, but we have had no luck. We never reproduced the crash while debugging.
*Crash information:*
```
Hardware Model: iPhone10,2
Process: MEGA [11576]
Version: 140 (4.4.3)
AppStoreTools: 10B63
AppVariant: 1:iPhone10,2:12
Code Type: ARM-64 (Native)
Role: Foreground
Parent Process: launchd [1]
Date/Time: 2019-02-07 12:13:09.6767 -0600
Launch Time: 2019-02-07 12:10:39.6970 -0600
OS Version: iPhone OS 12.1.2 (16C101)
Baseband Version: 3.31.00
Report Version: 104
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000dedca495c038
VM Region Info: 0xdedca495c038 is not in any region. Bytes after previous region: 245027961159737
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
MALLOC_NANO 0000000280000000-00000002a0000000 [512.0M] rw-/rwx SM=PRV
--->
UNUSED SPACE AT END
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [11576]
Triggered by Thread: 4
```
*Stack trace:*
```
Thread 4 Crashed:
0 MEGA 0x00000001013bf930 CryptoPP::RandomPool::GenerateIntoBufferedTransformation(CryptoPP::BufferedTransformation&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long) + 10402096 (randpool.cpp:46)
1 MEGA 0x000000010138e404 CryptoPP::RandomNumberGenerator::GenerateBlock(unsigned char*, unsigned long) + 10200068 (cryptlib.cpp:317)
2 MEGA 0x000000010138e404 CryptoPP::RandomNumberGenerator::GenerateBlock(unsigned char*, unsigned long) + 10200068 (cryptlib.cpp:317)
3 MEGA 0x0000000101375da8 mega::PrnGen::genuint32+ 10100136 (unsigned long long) + 40
4 MEGA 0x0000000101293004 mega::BackoffTimer::backoff+ 9170948 () + 88
5 MEGA 0x00000001012eb530 mega::MegaClient::exec+ 9532720 () + 7544
6 MEGA 0x0000000101327f64 mega::MegaApiImpl::loop+ 9781092 () + 632
7 MEGA 0x0000000101327cd8 mega::MegaApiImpl::threadEntryPoint+ 9780440 (void*) + 52
8 libsystem_pthread.dylib 0x00000001868a825c _pthread_body + 128 (pthread.c:857)
9 libsystem_pthread.dylib 0x00000001868a81bc _pthread_start + 48 (pthread.c:884)
10 libsystem_pthread.dylib 0x00000001868abcf4 thread_start + 4
```
If you need more information let me know.
Kind regards. | Crash in RandomPool::GenerateIntoBufferedTransformation | https://api.github.com/repos/weidai11/cryptopp/issues/798/comments | 8 | 2019-02-12T13:32:45Z | 2019-02-23T02:24:30Z | https://github.com/weidai11/cryptopp/issues/798 | 409,299,733 | 798 |
[
"weidai11",
"cryptopp"
] | Current ed25519 signing and verification does not lend itself to signing large messages, like a 4.4 GB file (a typical LiveCD ISO). Pre-hashing the message could allow existential forgeries, so we probably want to avoid letting users hash the message `M' = H(M)` and then using `M'` as the message to be signed or verified.
That leaves us two choices. First, modify ed25519 signing and verification for RFC 8032's ed25519ph. Second, add a stream overload that reads through the stream in blocks and feeds it to the hash by repeatedly calling `Update` in place of `Update(m, mlen)`.
I don't want to modify things for RFC 8032 just yet. It looks like the IETF changed the algorithm beyond using `dom2` and `PH(M)`, if I am parsing the RFC sections 5.1.6 and 5.1.7 correctly.
I think that leaves the overload that takes an `istream` in place of `byte* message, size_t messageLength`. | ed25519 needs SignStream and VerifyStream functions | https://api.github.com/repos/weidai11/cryptopp/issues/796/comments | 0 | 2019-02-11T00:34:48Z | 2019-02-11T15:56:53Z | https://github.com/weidai11/cryptopp/issues/796 | 408,603,348 | 796 |
[
"weidai11",
"cryptopp"
] | Given a test file with just
static void foo() {}
`gcc -Wall` will print
warning: ‘void foo()’ defined but not used [-Wunused-function]
But if I add
#define CRYPTOPP_ENABLE_NAMESPACE_WEAK 1
#include <cryptopp/md5.h>
No waning is printed. This is because of the following in `cryptopp/config.h`.
#pragma GCC diagnostic ignored "-Wunused-function"
| Including Crypto++ headers disables warnings | https://api.github.com/repos/weidai11/cryptopp/issues/793/comments | 5 | 2019-01-30T17:06:37Z | 2019-02-01T11:34:27Z | https://github.com/weidai11/cryptopp/issues/793 | 404,871,658 | 793 |
[
"weidai11",
"cryptopp"
] | 'length': unreferenced formal parameter chacha.cpp 382
'length': unreferenced formal parameter poly1305.cpp 315
'argument': conversion from 'size_t' to 'int', possible loss of data poly1305.cpp 212
| MSVC warnings | https://api.github.com/repos/weidai11/cryptopp/issues/792/comments | 0 | 2019-01-29T18:40:47Z | 2019-01-30T05:36:07Z | https://github.com/weidai11/cryptopp/issues/792 | 404,431,664 | 792 |
[
"weidai11",
"cryptopp"
] | ### Crypto++ Documentation Issue Report
When generation the documentation a number of warnings are issued:
```
trap.h:56: warning: explicit link request to 'if' could not be resolved
trap.h:59: warning: explicit link request to 'endif' could not be resolved
trap.h:131: warning: explicit link request to 'if' could not be resolved
trap.h:133: warning: explicit link request to 'endif' could not be resolved
```
The line numbers are not completely correct, but on line 46 and 119 there is `<pre>` and on line 56 and 129 there is `</pre>` replacing these with `\code` and `\endcode` will remove the warnings and also show the code as a code block (with syntax highlighting and links).
| Warnings when generation documentation | https://api.github.com/repos/weidai11/cryptopp/issues/791/comments | 1 | 2019-01-27T15:10:21Z | 2019-02-01T00:47:39Z | https://github.com/weidai11/cryptopp/issues/791 | 403,560,860 | 791 |
[
"weidai11",
"cryptopp"
] | ChaCha and the IETF's ChaChaTLS are slightly different implementations. Each uses the ChaCha state variables slightly differently, which leads to two slightly different implementations. Two of the differences are:
* ChaCha uses two 32-bit words for a block counter
* ChaCha uses two 32-bit words for a nonce
* ChaChaTLS uses one 32-bit word for a block counter
* ChaChaTLS uses three 32-bit words for a nonce
And:
* ChaCha does not wrap because the counter always starts at 0 and 64-bits is large enough for inputs
* ChaChaTLS does wrap because the counter can be an arbitrary value, like `0xfffffffe`, that wraps the 32-bit word almost immediately
Crypto++, Botan and libsodium are arriving at different results for ChaChaTLS for the following test case, which verifies behavior around the wrap condition:
* Key - All 0's
* IV - All 0's
* Initial Block Counter - 0xfffffffe
Crypto++ arrives at the following keystream (see [`chacha_tls.txt`](https://github.com/weidai11/cryptopp/blob/master/TestVectors/chacha_tls.txt#L227)):
```
032CC123482C31711F94C941AF5AB1F4155784332ED5348FE79AEC5EAD4C06C3
F13C280D8CC49925E4A6A5922EC80E13A4CDFA840C70A1427A3CB699166991A5
ACE4CD09E294D1912D4AD205D06F95D9C2F2BFCF453E8753F128765B62215F4D
92C74F2F626C6A640C0B1284D839EC81F1696281DAFC3E684593937023B58B1D
76B8E0ADA0F13D90405D6AE55386BD28BDD219B8A08DED1AA836EFCC8B770DC7 <== Difference
DA41597C5157488D7724E03FB8D84A376A43B8F41518A11CC387B669B2EE6586
9F07E7BE5551387A98BA977C732D080DCB0F29A048E3656912C6533E32EE7AED
29B721769CE64E43D57133B074D839D531ED1F28510AFB45ACE10A1F4B794D6F
```
Botan and libsodium arrive at the following keystream (see Botan [`chacha.vec`](https://github.com/randombit/botan/blob/master/src/tests/data/stream/chacha.vec#L497)):
```
032CC123482C31711F94C941AF5AB1F4155784332ED5348FE79AEC5EAD4C06C3
F13C280D8CC49925E4A6A5922EC80E13A4CDFA840C70A1427A3CB699166991A5
ACE4CD09E294D1912D4AD205D06F95D9C2F2BFCF453E8753F128765B62215F4D
92C74F2F626C6A640C0B1284D839EC81F1696281DAFC3E684593937023B58B1D
3DB41D3AA0D329285DE6F225E6E24BD59C9A17006943D5C9B680E3873BDC683A <== Difference
5819469899989690C281CD17C96159AF0682B5B903468A61F50228CF09622B5A
46F0F6EFEE15C8F1B198CB49D92B990867905159440CC723916DC00128269810
39CE1766AA2542B05DB3BD809AB142489D5DBFE1273E7399637B4B3213768AAA
```
The problem everyone is having is, RFC 7539 does not say what should happen. Crypto++ wraps the counter block (`state[12]`) back to 0. Botan and libsodium wrap the counter block (`state[12]`) back to 0 ***and*** increment the first word of the nonce (`state[13]`).
We can't find authority to increment the nonce, and it feels like a wild memory write because it is a different object (message nonce vs block counter).
This bug report merely documents the problem. We need the RFC to say what we should do.
Also see [How to handle block counter wrap in IETF's ChaCha algorithm?](https://mailarchive.ietf.org/arch/msg/cfrg/gsOnTJzcbgG6OqD8Sc0GO5aR_tU) on the CFRG mailing list. | ChaChaTLS results when counter block wraps | https://api.github.com/repos/weidai11/cryptopp/issues/790/comments | 1 | 2019-01-26T00:29:06Z | 2019-02-23T05:22:50Z | https://github.com/weidai11/cryptopp/issues/790 | 403,382,388 | 790 |
[
"weidai11",
"cryptopp"
] | ### Crypto++ Issue Report
OS: mac os 10.13.6 High Sierra
Crypto++ library Version: stable 8.0.0
Built the library: brew
I tried following the wiki to generate a signature and verify a message with it. Unfortunately it does not work. Any ideas? Is this a bug or am I doing sth wrong here?
Also tested on:
OS: buster debian
Crypto++ library Version: libcrypto++6 (5.6.4-8)
Built the library: apt package
same result.
```C++
#include <iostream>
#include <cryptopp/eccrypto.h>
#include <cryptopp/osrng.h>
#include <cryptopp/oids.h>
int main(int argc, const char **argv)
{
using namespace CryptoPP;
AutoSeededRandomPool prng;
ECDSA<ECP, SHA1>::PrivateKey k1;
k1.Initialize( prng, ASN1::secp256r1() );
ECDSA<ECP, SHA1>::Signer signer(k1);
signer.AccessKey().Initialize( prng, ASN1::secp256r1());
std::string message = "Do or do not. There is no try.";
size_t siglen = signer.MaxSignatureLength();
std::string signature(siglen, 0x00);
siglen = signer.SignMessage( prng, (const byte*)&message[0], message.size(), (byte*)&signature[0] );
signature.resize(siglen);
ECDSA<ECP, SHA1>::PublicKey publicKey;
k1.MakePublicKey(publicKey);
ECDSA<ECP, SHA1>::Verifier verifier(publicKey);
bool result = verifier.VerifyMessage( (const byte*)&message[0], message.size(), (const byte*)&signature[0], signature.size() );
// bool result = false;
//
// StringSource ss( signature+message, true /*pump all*/,
// new SignatureVerificationFilter(
// verifier,
// new ArraySink( (byte*)&result, sizeof(result) )
// ) // SignatureVerificationFilter
// );
//
// // Verification failure?
if( !result ) {
std::cout << "Failed to verify signature on message" << std::endl;
} else {
std::cout << "All good!" << std::endl;
}
}
```
```
$ clang++ -Wall -std=c++11 -lcryptopp main.cpp -o main
$ ./main
Failed to verify signature on message
```
| ECDSA signature verification examples from wiki do not work | https://api.github.com/repos/weidai11/cryptopp/issues/789/comments | 2 | 2019-01-25T12:41:59Z | 2019-01-26T01:17:19Z | https://github.com/weidai11/cryptopp/issues/789 | 403,142,066 | 789 |
[
"weidai11",
"cryptopp"
] | Here is my code:
```
int main(int argc, char *argv[]) {
CryptoPP::RabbitWithIV::Encryption enc;
CryptoPP::RabbitWithIV::Encryption dec;
uint8_t rabbitKey[16] = "012345678901234";
uint8_t rabbitIV[8] = "0123456";
enc.SetKeyWithIV(rabbitKey, 16, rabbitIV, 8);
dec.SetKeyWithIV(rabbitKey, 16, rabbitIV, 8);
array<char, 3> origin = { 1,2,3 };
array<char, 3> encrpyt;
enc.ProcessData((uint8_t*)encrpyt.data(), (uint8_t*)origin.data(), origin.size());
array<char, 3> decrypt;
dec.ProcessData((uint8_t*)decrypt.data(), (uint8_t*)encrpyt.data(), encrpyt.size());//get right data 1 2 3
dec.ProcessData((uint8_t*)decrypt.data(), (uint8_t*)encrpyt.data(), encrpyt.size());//wrong data 47 45 -14
dec.ProcessData((uint8_t*)decrypt.data(), (uint8_t*)encrpyt.data(), encrpyt.size());//wrong data -7 -116 -30
getchar();
}
```
as you can see, I'm decoding the same encrypted array, but only the first result is right. | [Rabbit] Decrypt same encrypted data multiple times results in different data | https://api.github.com/repos/weidai11/cryptopp/issues/788/comments | 2 | 2019-01-24T07:10:53Z | 2019-01-25T04:05:04Z | https://github.com/weidai11/cryptopp/issues/788 | 402,571,146 | 788 |
[
"weidai11",
"cryptopp"
] | The scrypt implementation uses OpenMP 3 features, but the MSVC compiler for Windows only supports OpenMP 2. This causes key derivation for [CryFS](https://github.com/cryfs/cryfs) on Windows to take quite a long time because it is only using one core. Is it possible to change the scrypt implementation to use OpenMP 2 features only?
see also this thread where this was briefly discussed: https://github.com/cryfs/cryfs/issues/157 | scrypt needs OpenMP 3, MSVC only supports OpenMP 2 | https://api.github.com/repos/weidai11/cryptopp/issues/787/comments | 4 | 2019-01-20T21:55:10Z | 2019-01-22T09:30:45Z | https://github.com/weidai11/cryptopp/issues/787 | 401,143,317 | 787 |
[
"weidai11",
"cryptopp"
] | crypto++8.0.0 release
macOS 10.14.2, Xcode 10.1
$ clang --version
Apple LLVM version 10.0.0 (clang-1000.11.45.5)
Target: x86_64-apple-darwin18.2.0
Cmake (from cryptopp-cmake project) static lib
$ cmake --version
cmake version 3.12.2
This may be related to #772
crypto++7 built fine
```
cryptopp/crc_simd.cpp:148:13: error: always_inline function '_mm_crc32_u8' requires target feature 'popcnt', but would be inlined into function 'CRC32C_Update_SSE42' that is compiled without support for 'popcnt'
c = _mm_crc32_u8(c, *s);
^
cryptopp/crc_simd.cpp:151:13: error: always_inline function '_mm_crc32_u32' requires target feature 'popcnt', but would be inlined into function 'CRC32C_Update_SSE42' that is compiled without support for 'popcnt'
c = _mm_crc32_u32(c, *(const word32 *)(void*)s);
^
/cryptopp/crc_simd.cpp:154:13: error: always_inline function '_mm_crc32_u8' requires target feature 'popcnt', but would be inlined into function 'CRC32C_Update_SSE42' that is compiled without support for 'popcnt'
c = _mm_crc32_u8(c, *s);
^
3 errors generated.
```
Source for the function is wrapped by CRYPTOPP_SSE42_AVAILABLE and that checks for CRYPTOPP_APPLE_CLANG_VERSION >= 40000.
However, compiler flags do not have SSE4.2 enabled by default:
```
$ c++ -arch x86_64 -std=c++14 -dM -E -x c++ - < /dev/null | grep SSE
#define __SSE2_MATH__ 1
#define __SSE2__ 1
#define __SSE3__ 1
#define __SSE4_1__ 1
#define __SSE_MATH__ 1
#define __SSE__ 1
#define __SSSE3__ 1
```
In Xcode this can be overrode with the "Enable Additional Vector Extensions" whose raw name is "CLANG_X86_VECTOR_INSTRUCTIONS". | 8.0 fails to build on Xcode 10 | https://api.github.com/repos/weidai11/cryptopp/issues/786/comments | 3 | 2019-01-17T23:15:19Z | 2019-01-18T14:45:06Z | https://github.com/weidai11/cryptopp/issues/786 | 400,504,647 | 786 |
[
"weidai11",
"cryptopp"
] | There appears to be a bug in ECDH with secp160r1 in release 8.0, as illustrated below:
CryptoPP::ECDH<CryptoPP::ECP>::Domain ecdh((CryptoPP::ASN1::secp160r1());
cout << ecdh.PrivateKeyLength() << endl;
....prints 21, when I had expected 20. Other curves seem to behave correctly.
I am using VS2017 version 15.9.5 on Windows 10, although I couldn't see any compiler dependencies from the brief look I took at it.
| ECDH Private key length incorrect with secp160r1 | https://api.github.com/repos/weidai11/cryptopp/issues/785/comments | 3 | 2019-01-17T16:49:42Z | 2019-02-11T23:12:56Z | https://github.com/weidai11/cryptopp/issues/785 | 400,367,770 | 785 |
[
"weidai11",
"cryptopp"
] | Intel published a paper on using carryless multiplies to speed up binary curves. See [Polynomial Multiplication Instruction and its Usage for Elliptic Curve Cryptography](https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/polynomial-multiplication-instructions-paper.pdf).
The techniques apply to other arches, like ARMv8 and Power8, and other curves. For now we want to try the waters with NIST's b233 and k233 curves. Performance is good. We see a speedup of about 2.5x-3x, and we hit within about 15% of Intel's optimized numbers.
The curves are out of favor so we probably won't do much more than the 233-bit curve. | Use carryless multiplies for NIST b233 and k233 curves | https://api.github.com/repos/weidai11/cryptopp/issues/783/comments | 0 | 2019-01-16T04:55:57Z | 2019-01-16T05:15:38Z | https://github.com/weidai11/cryptopp/issues/783 | 399,647,612 | 783 |
[
"weidai11",
"cryptopp"
] | https://travis-ci.org/odant/conan-cryptopp/builds/480116204
Passed if add CXXFLAGS -DCRYPTOPP_DISABLE_ASM | 32-bits GCC/Linux debug build self test failures | https://api.github.com/repos/weidai11/cryptopp/issues/782/comments | 7 | 2019-01-15T23:40:54Z | 2019-01-24T06:36:05Z | https://github.com/weidai11/cryptopp/issues/782 | 399,584,502 | 782 |
[
"weidai11",
"cryptopp"
] | Builds on Windows seems to fail with an linker error when in recent versions of Crypto++, I have read the README.txt and could not find any further instructions on how to build it. As far as I know there my VS 2017 C++ setup is as standard as you can get.
* Windows 10.0.15063
* Building in Visual Studio 2017 15.9.5 using the provided solution file
* Affected Crypto++ versions: 8.0, 7.0, 6.0
* Working Crypto++ version: 5.6.5
**Steps to reproduce:**
1. Download and unzip source for one of the affected Crypto++ versions
2. Open cryptest.sln in VS 2017
3. Rebuild the solution (or just cryptlib project), build configuration does not matter
**Expected result:** The solution should build as intended
**Actual result:**
The solution fail to build with the error:
```
Severity Code Description Project File Line Suppression State
Error C1083 Cannot open include file: 'stddef.h': No such file or directory cryptlib c:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.16.27023\include\cstddef 7
```
| Crypto++ build error due to <stddef.h> on Windows | https://api.github.com/repos/weidai11/cryptopp/issues/781/comments | 7 | 2019-01-14T10:36:23Z | 2021-11-30T22:01:18Z | https://github.com/weidai11/cryptopp/issues/781 | 398,829,666 | 781 |
[
"weidai11",
"cryptopp"
] | We have a linker problem in the iPhone simulator with `master`. It works for devices but not for simulator. The problem is that for the simulator the flag `-DCRYPTOPP_DISABLE_ASM` is added to the compilation and then the flag `CRYPTOPP_BOOL_ALIGN16` is set to 0 in the `config.h`, so `CryptoPP::AlignedAllocate` and `CryptoPP::AlignedDeallocate` aren't compiled:
```
Undefined symbols for architecture x86_64:
"CryptoPP::AlignedAllocate(unsigned long)", referenced from:
CryptoPP::AllocatorWithCleanup<unsigned int, true>::allocate(unsigned long, void const*) in libMEGASDK.a(megaapi_impl.o)
...
"CryptoPP::AlignedDeallocate(void*)", referenced from:
CryptoPP::AllocatorWithCleanup<unsigned int, true>::deallocate(void*, unsigned long) in libMEGASDK.a(megaapi_impl.o)
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
In our headers search path, the cryptopp `config.h` has the line https://github.com/weidai11/cryptopp/blob/master/config.h#L64 commented and I think for that the linker fails. This line should be commented for devices (armv7, armv7s and arm64) but not for simulator (x84_64).
The problem is that we have a fat library (for iPhone and iPhone simulator), the arch x86_64 built with `-DCRYPTOPP_DISABLE_ASM` and the others one without `-DCRYPTOPP_DISABLE_ASM` and then we have the same `config.h` (one library with all archs and one common include folder). We compile the `cryptopp` using the `setenv-ios.sh` scrript and the `make -f GNUmakefile-cross lean -j 8`.
We can fix the issue, compiling all the archs with `-DCRYPTOPP_DISABLE_ASM` and uncommented the line in the `config.h`, but we wouldn't take the adventage of use `ASM` where available.
Any advice to fix this issues?
| Undefined symbols for architecture x86_64 iPhone Simulator | https://api.github.com/repos/weidai11/cryptopp/issues/779/comments | 3 | 2019-01-11T14:11:12Z | 2019-01-11T21:44:33Z | https://github.com/weidai11/cryptopp/issues/779 | 398,304,388 | 779 |
[
"weidai11",
"cryptopp"
] | Do you think we can take care of these warning?
```
clang++ -DNDEBUG -g2 -O3 -fPIC -pipe -Wall -arch armv7 -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk" -stdlib=libc++ -ffunction-sections -fdata-sections -c scrypt.cpp
scrypt.cpp:167:24: warning: result of comparison of constant 137438953440 with expression of type 'size_t' (aka 'unsigned long') is always false [-Wtautological-constant-out-of-range-compare]
if (derivedLen > maxLen) {
~~~~~~~~~~ ^ ~~~~~~
```
```
clang++ -DNDEBUG -g2 -O3 -fPIC -pipe -Wall -miphoneos-version-min=6 -arch armv7s -isysroot "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk" -stdlib=libc++ -ffunction-sections -fdata-sections -c scrypt.cpp
scrypt.cpp:167:24: warning: result of comparison of constant 137438953440 with expression of type 'size_t' (aka 'unsigned long') is always false [-Wtautological-constant-out-of-range-compare]
if (derivedLen > maxLen) {
~~~~~~~~~~ ^ ~~~~~~
```
| Compiler warnings on clang++ for archs armv7 and armv7s | https://api.github.com/repos/weidai11/cryptopp/issues/777/comments | 2 | 2019-01-09T18:54:10Z | 2019-01-10T18:15:41Z | https://github.com/weidai11/cryptopp/issues/777 | 397,507,812 | 777 |
[
"weidai11",
"cryptopp"
] | This is an open-ended report to track changes for Microsoft ARM and ARM64 compiles. Microsoft recently [released their ARM64 compiler](https://blogs.windows.com/buildingapps/2018/11/15/official-support-for-windows-10-on-arm-development/) (part of Visual Studio 15.9), so we can now test a compile and link. I'm trying to get hold of an ASUS TP370QL for testing so we can actually run the test vectors.
Here's the first issue. A typical initialization is shown below. The problem is, it is using GCC extensions:
```
const uint32x4_t CTRS[3] = {
{1,0,0,0}, {2,0,0,0}, {3,0,0,0}
};
```
And a compile results in:
```
cl.exe /nologo /W4 /D_MBCS /Zi /TP /GR /EHsc /DNDEBUG /D_NDEBUG /Oi /Oy /O2 /MT
/FI sdkddkver.h /FI winapifamily.h /DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP /c c
hacha_simd.cpp
chacha_simd.cpp(306) : error C2078: too many initializers
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\BIN\x86_ARM\cl.exe"' : return code '0x2'
Stop.
```
Peter Cordes (@pcordes) provided a workaround at [Error C2078 when initializing uint32x4_t on ARM?](https://stackoverflow.com/q/54016821/608639) on Stack Overflow. It requires macros, but it avoids other problems with the compiler:
```
#if (CRYPTOPP_ARM_NEON_AVAILABLE)
# if defined(_MSC_VER)
# define PACK32x4(w,x,y,z) { ((w) + (uint64_t(x) << 32)), ((y) + (uint64_t(z) << 32)) }
# else
# define PACK32x4(w,x,y,z) { (w), (x), (y), (z) }
# endif
#endif // Microsoft workaround
```
``` | Compile failures using ARM and ARM64 with Microsoft tools | https://api.github.com/repos/weidai11/cryptopp/issues/776/comments | 5 | 2019-01-03T18:32:59Z | 2019-01-05T02:41:30Z | https://github.com/weidai11/cryptopp/issues/776 | 395,679,479 | 776 |
[
"weidai11",
"cryptopp"
] | Hi,
My goal is build `cryptopp` for `arm64`, `armv7s`, `armv7` and `x86_64` archs (iPhoneOS and iPhoneSimulator). And then create a fat static library using `lipo`.
Look like there is an issue in the `setenv-ios.sh`.
If you want build a static `cryptopp` library for `arm64`, `armv7s`, `armv6` or `armv5` archs, the `APPLE_SDK` is empty and the script uses the default values:
```
if [ -z "$APPLE_SDK" ]; then
BACK_ARCH=armv7
APPLE_SDK=iPhoneOS
fi
```
So, when you run the script using `arm64`, for example, you build `cryptopp` for `armv7` instead for `arm64`
```
$ source setenv-ios.sh arm64
Configuring for iPhoneOS (armv7)
XCODE_SDK: iPhoneOS12.1.sdk
XCODE_DEVELOPER: /Applications/Xcode.app/Contents/Developer
XCODE_TOOLCHAIN: /Applications/Xcode.app/Contents/Developer/usr/bin
XCODE_DEVELOPER_TOP: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer
IOS_ARCH: armv7
IOS_TOOLCHAIN: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/
IOS_FLAGS:
IOS_SYSROOT: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.1.sdk
```
The Pull Request https://github.com/weidai11/cryptopp/pull/774 fix this issue.
Let me know if there's a problem.
Greetings | It is not possible build cryptopp for arm64, armv7s, armv6 or armv5 using the script "setenv-ios.sh" | https://api.github.com/repos/weidai11/cryptopp/issues/775/comments | 0 | 2019-01-03T17:31:43Z | 2019-01-05T01:21:38Z | https://github.com/weidai11/cryptopp/issues/775 | 395,660,924 | 775 |
[
"weidai11",
"cryptopp"
] | https://github.com/weidai11/cryptopp/blob/a79fe3a826727bb3bdb2c8d1e035335fe655ebca/osrng.h#L237
Declaration has more informative `additionalEntropy` instead of `input`.
https://github.com/weidai11/cryptopp/blob/a79fe3a826727bb3bdb2c8d1e035335fe655ebca/smartptr.h#L146
Declaration has `p` instead of `r` for a reference argument.
| Argument declaration and definition mismatch. | https://api.github.com/repos/weidai11/cryptopp/issues/773/comments | 1 | 2019-01-03T05:17:25Z | 2019-01-04T02:05:01Z | https://github.com/weidai11/cryptopp/issues/773 | 395,459,223 | 773 |
[
"weidai11",
"cryptopp"
] | ### Crypto++ Issue Report
MacOS Mojave 10.14.2, Xcode-10.1. Current master.
Current tests do not seem to differentiate between `avx512f` and `avx512vl`, incorrectly assuming that if AVX512F has been detected then it is safe to use AVX512VL instructions:
```
. . . . .
clang++ -maes -mpclmul -msse2 -mssse3 -msse4 -msse4.2 -mrdseed -mrdrnd -mavx2 -mavx512f -std=gnu++17 -Os -Ofast -DCRYPTOPP_DISABLE_MIXED_ASM -fPIC -pthread -pipe -mssse3 -c cham_simd.cpp
. . . . .
cham_simd.cpp:646:12: error: '__builtin_ia32_prold128_mask' needs target feature avx512vl
return _mm_rol_epi32(val, R);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include/avx512vlintrin.h:4333:12: note: expanded from macro '_mm_rol_epi32'
(__m128i)__builtin_ia32_prold128_mask((__v4si)(__m128i)(a), (int)(b), \
^
cham_simd.cpp:659:12: error: '__builtin_ia32_prord128_mask' needs target feature avx512vl
return _mm_ror_epi32(val, R);
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include/avx512vlintrin.h:4509:12: note: expanded from macro '_mm_ror_epi32'
(__m128i)__builtin_ia32_prord128_mask((__v4si)(__m128i)(A), (int)(B), \
^
2 errors generated.
```
| Current master fails to compile on AVX512F CPU | https://api.github.com/repos/weidai11/cryptopp/issues/772/comments | 7 | 2019-01-02T16:39:34Z | 2019-10-13T07:16:24Z | https://github.com/weidai11/cryptopp/issues/772 | 395,306,802 | 772 |
[
"weidai11",
"cryptopp"
] | Recent testing under SunCC results in:
```
"/opt/developerstudio12.5/lib/compilers/include/CC/Cstd/memory", line 479: Error: Too many arguments in call to "CryptoPP::AllocatorBase<unsigned char>::max_size() const".
"/opt/developerstudio12.5/lib/compilers/include/CC/Cstd/vector", line 387: Where: While instantiating "std::allocator_interface<CryptoPP::AllocatorWithCleanup<unsigned char, 0>, unsigned char>::max_size() const".
"/opt/developerstudio12.5/lib/compilers/include/CC/Cstd/vector", line 387: Where: Instantiated from std::vector<unsigned char, CryptoPP::AllocatorWithCleanup<unsigned char, 0>>::reserve(unsigned).
"xed25519.h", line 280: Where: Instantiated from non-template code.
1 Error(s) detected.
gmake: *** [xed25519.o] Error 2
gmake: *** Waiting for unfinished jobs....
```
`xed25519.h` is using the library's secure allocator with a `std::vector`:
```
struct ed25519_MessageAccumulator : public PK_MessageAccumulator
{
...
std::vector<byte, AllocatorWithCleanup<byte> > m_msg;
};
```
It appears SunCC uses Rogue Wave code, and it expects the extra allocator member function. From `/opt/developerstudio12.5/lib/compilers/include/CC/Cstd/memory`:
```
//
// Alternate allocator uses an interface class (allocator_interface)
// to get type safety.
//
template <class _Tt>
class allocator
{
public:
...
size_type max_size (size_type size) const
{
return 1 > UINT_MAX/size ? size_type(1) : size_type(UINT_MAX/size);
}
};
```
I'm not sure what the best way to proceed is. For triage we can add the member function for SunCC. But that will break the ABI for SunCC.
Also see [SunCC std::allocator and size_type max_size(size_type) const member function?](https://stackoverflow.com/q/53999461/608639) on Stack Overflow. | SunCC expects Allocator::max_size(size_type) member function | https://api.github.com/repos/weidai11/cryptopp/issues/770/comments | 0 | 2019-01-01T22:51:13Z | 2019-01-02T00:03:14Z | https://github.com/weidai11/cryptopp/issues/770 | 395,118,417 | 770 |
[
"weidai11",
"cryptopp"
] | It looks like 32-bit MinGW is failing self tests for LEA, SIMON, SPECK and SM4.
An example of a failure is shown below.
```
Testing SymmetricCipher algorithm SM4/ECB.
.....................
Testing SymmetricCipher algorithm SM4/CBC.
.......................
incorrectly encrypted: 9B195C61B03B3DF17F0A5C36C332A1A8EF265A6EB555E140D3BBF04EA
41B0FF3F333DB0EB42671ED22AF0000371DAA94B1ACD4BB7D5E362BE83A0A75253B529D70FE88FC3
1E4A2E25C525EFFD54AC8CF4F1346C2D68D77F3E7F7DE1575E30B4AEE95D4F9505FACC40925B642C
09160931FB3B5E062DD438DECFBEB005F7BFA6B
AlgorithmType: SymmetricCipher
Ciphertext: 7A97307CB8E9EACD703E6F9B518772AB2C7A0FA3F9FF61FBE8CE0896F10DA287E0CA
E7C276EC9E6713A692908284EEA0420CAC3B35C6D43594605CA637C7520CB6B7759FBE7660167C4C
08B337C4451B85890C3B354382C5721A555777474CDA0E0A82E623FEC9C0645CECD7A7FE7E5F499E
71E49DB83A1540448FC1B84BC06C
Comment: SM4-128(128)
IV: B09B187F7CCE25E94F534F06D8442796
Key: 5458876D02C39DB8458372E89CB3EF27
Name: SM4/CBC
Plaintext: 751579F1BB15910733507A4CC04CF00EAEFC3577EAD165F77F2CDF037B445CA4390B5
6EDF0F3832889828B613A785CA924D3259AD7E664186D2C88C01615B637D0796246AEBBA584AA374
6E10EEF436E73792CFEA40290260AE9BE1CABA919919F5AF3A2F7A2CE67912FD3464A564BF4D4374
895F0CE6AB91851F35A1CB197B9
Source: Botan 2.3 generated
Test: Encrypt
Test FAILED.
Skipping to next test.
......
Tests complete. Total tests = 51. Failed tests = 1.
``` | 32-bit MinGW self test failures | https://api.github.com/repos/weidai11/cryptopp/issues/768/comments | 1 | 2018-12-27T22:26:03Z | 2019-01-16T20:22:23Z | https://github.com/weidai11/cryptopp/issues/768 | 394,500,413 | 768 |
[
"weidai11",
"cryptopp"
] | We have been dragging our feet on a curve25519 implementation. At [Pull Request 566](https://github.com/weidai11/cryptopp/pull/566) we added test code to allow us to cross-validate a real implementation, but we never provided the real implementation. The real implementation was delayed for various reasons, but one of the bigger ones was the algorithms based on the curve are hard to fit into the library the way we want it to fit.
It also looks like the IETF has provided enough information/RFCs to roll an implementation and actually interop with other libraries and software.
This is the next step in getting proper curve25519 support into the library. It provides the near-constant time curve operations optimized for 32-bit and 64-bit platforms. | Add ed25519 for modern signatures | https://api.github.com/repos/weidai11/cryptopp/issues/764/comments | 0 | 2018-12-17T09:35:46Z | 2018-12-25T20:51:19Z | https://github.com/weidai11/cryptopp/issues/764 | 391,626,328 | 764 |
[
"weidai11",
"cryptopp"
] | I am trying to integrate Crypto++ in an Android project in Android Studio. The NDK component of my project is built using cmake, so I'm trying to integrate CryptoPP in the build process using CMake's `ExternalProject_Add`.
Our requirements are that we can build for Android using Windows as a host OS, and the current android `setupenv-android.sh` doesn't support Windows hosts.
I have built a python script which does most of the stuff in `setupenv-android.sh` [here](https://gist.github.com/chibicitiberiu/7cc01a63109043d54e9da58d9a333010) (some things are missing). The advantage with python is that it's cross platform, unlike bash.
| Building for Android using NDK not supported on Windows hosts | https://api.github.com/repos/weidai11/cryptopp/issues/763/comments | 9 | 2018-12-13T11:16:40Z | 2019-11-16T22:54:28Z | https://github.com/weidai11/cryptopp/issues/763 | 390,631,659 | 763 |
[
"weidai11",
"cryptopp"
] | We have been dragging our feet on a curve25519 implementation. At [Pull Request 566](https://github.com/weidai11/cryptopp/pull/566) we added test code to allow us to cross-validate a real implementation, but we never provided the real implementation. The real implementation was delayed for various reasons, but one of the bigger ones was the algorithms based on the curve are hard to fit into the library the way we want it to fit.
It also looks like the IETF has provided enough information/RFCs to roll an implementation and actually interop with other libraries and software.
This is the next step in getting proper curve25519 support into the library. It provides the near-constant time curve operations optimized for 32-bit and 64-bit platforms.
<strike>Langley recommends that folks use a different implementation, like NaCL or libsodum. We evaluated several alternatives, including DJB's SuperCop implementation. For many folks, like Botan and Crypto++, Langley's code is easier to cleanly cut-in. DJB's code was the messiest and we prefer to avoid it for maintenance purposes.</strike>
After testing Langley's BSD-style code with Andrew Moon's public domain code we opted for Moon's code. Moon's code was a little more work but it performed a little better during benchmarks. | Add curve25519 for modern key agreement | https://api.github.com/repos/weidai11/cryptopp/issues/761/comments | 0 | 2018-12-11T13:47:59Z | 2018-12-25T20:51:35Z | https://github.com/weidai11/cryptopp/issues/761 | 389,772,747 | 761 |
[
"weidai11",
"cryptopp"
] | Currently our self tests only work when run from the build directory. The behavior can be changed such that they run from the install directory, but then the self tests don't run from the build directory.
To accommodate both cases we need to check the install location and the build directory. However, Debian err'd on the side of security and asked us to avoid searching. We honored Debian's request because it was a sound decision.
Revisiting the strategy I think we want the common case to be, the self tests "just work" under reasonable use cases. That is, they work when run from the build directory, and they work when run from the install directory. This helps regular users the most.
We can add a define to disable searching for test vectors for Debian. | Make self-tests run after install by a typical user | https://api.github.com/repos/weidai11/cryptopp/issues/760/comments | 1 | 2018-12-07T13:21:08Z | 2018-12-07T17:47:56Z | https://github.com/weidai11/cryptopp/issues/760 | 388,652,325 | 760 |
[
"weidai11",
"cryptopp"
] | As reported on the mailing list at [Stream Cipher (Panama) & Decoder question](https://groups.google.com/d/msg/cryptopp-users/sHCHSjM7scY/PkcSbIo-DQAJ). The issue appears to affect builds where the inline assembly is engaged. GCC and MS have the issue, Clang does not have the issue. The issue is also present in Crypto++ 5.6.2.
```
AutoSeededRandomPool prng;
std::string plain("High-school students - who have been protesting against changes to colleges and the university system - also seized on the mood of protest and stepped up their blockades.");
std::string cipher_hex, recover1, recover2, cipher_bin;
SecByteBlock key(32), iv(32);
prng.GenerateBlock(key, key.size());
prng.GenerateBlock(iv, iv.size());
PanamaCipher<LittleEndian>::Encryption enc;
enc.SetKeyWithIV(key, key.size(), iv, iv.size());
PanamaCipher<LittleEndian>::Decryption dec;
dec.SetKeyWithIV(key, key.size(), iv, iv.size());
StringSource (plain, true, new StreamTransformationFilter(enc, new HexEncoder(new StringSink(cipher_hex))));
// works fine, recover1 = plain
StringSource (cipher_hex, true, new HexDecoder(new StringSink(cipher_bin)));
StringSource (cipher_bin, true, new StreamTransformationFilter(dec, new StringSink(recover1)));
enc.Resynchronize(iv, iv.size());
dec.Resynchronize(iv, iv.size());
// does not work, recover2 = "High-school students – who have been protesting against changes –Ö)‘à« ç›áS` ¥¨~]Šm Qÿö:Û (...) "
StringSource (cipher_hex, true, new HexDecoder(new StreamTransformationFilter(enc, new StringSink(recover2))));
std::cout << "One: ";
std::cout << recover1 << std::endl;
std::cout << "Two: ";
std::cout << recover2 << std::endl;
``` | Incorrect result when resynchronizing Panama cipher | https://api.github.com/repos/weidai11/cryptopp/issues/758/comments | 3 | 2018-12-06T14:20:17Z | 2020-12-20T08:28:42Z | https://github.com/weidai11/cryptopp/issues/758 | 388,234,432 | 758 |
[
"weidai11",
"cryptopp"
] | `config.h` currently has a define called `CRYPTOPP_DISABLE_INTEL_ASM`. `CRYPTOPP_DISABLE_INTEL_ASM` is used for Clang because it cannot handle code that mixes Intel-style body with AT&T style assembler templates and positional arguments. The LLVM bug of interest is Issue 39895, [Error: unknown token in expression using inline asm](https://bugs.llvm.org/show_bug.cgi?id=39895).
This causes Clang to fail:
```
#include <cstddef>
int main(int argc, char* argv[])
{
size_t ret = 1, N = 1;
asm __volatile__
(
".intel_syntax noprefix ;\n"
"xor rsi, rsi ;\n"
"neg %1 ;\n"
"inc %1 ;\n"
"push %1 ;\n"
"pop rax ;\n"
".att_syntax prefix ;\n"
: "=a" (ret) : "c" (N) : "%rsi"
);
return (int)ret;
}
```
Additionally, we use `CRYPTOPP_CLANG_INTEGRATED_ASSEMBER` to set `CRYPTOPP_DISABLE_INTEL_ASM`. The root cause is the integrated assembler's inability to handle the mixed asm with positional arguments, so we don't need two defines.
We can add a makefile feature test and set `CRYPTOPP_DISABLE_MIXED_ASM` that handles both conditions.
------
On OS X, GCC is OK as long as the integrated assembler is not used. However, if the integrated assembler is used then GCC has to disable some code paths:
```
$ /opt/local/bin/g++-mp-6 TestPrograms/test_mixed_asm.cxx
$ /opt/local/bin/g++-mp-6 -Wa,-q TestPrograms/test_mixed_asm.cxx
TestPrograms/test_mixed_asm.cxx:31:5: error: unknown token in expression
neg %rcx ;
^
TestPrograms/test_mixed_asm.cxx:32:5: error: unknown token in expression
inc %rcx ;
^
TestPrograms/test_mixed_asm.cxx:33:6: error: unknown token in expression
push %rcx ;
^
``` | Add CRYPTOPP_DISABLE_MIXED_ASM define and feature test | https://api.github.com/repos/weidai11/cryptopp/issues/756/comments | 0 | 2018-12-05T14:31:13Z | 2018-12-06T00:00:36Z | https://github.com/weidai11/cryptopp/issues/756 | 387,783,237 | 756 |
[
"weidai11",
"cryptopp"
] | The following is from Fedora 29 using Clang 6.
The `__attribute__ ((init_priority` is part of, for example, `const std::string DEFAULT_CHANNEL __attribute__ ((init_priority (CRYPTOPP_INIT_PRIORITY + 25))) = "";`. The full guard is around [`cryptlib.cpp : 1000`](https://github.com/weidai11/cryptopp/blob/master/cryptlib.cpp#L995).
We don't protect functions in the test suite. It simulates a user program, and we welcome crashes from it.
-----
```
$ CXX=/opt/llvm/bin/clang++ CXXFLAGS="-Wglobal-constructors" make
Using testing flags: -Wglobal-constructors
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c cryptlib.cpp
cryptlib.cpp:999:19: warning: declaration requires a global destructor
[-Wglobal-constructors]
const std::string DEFAULT_CHANNEL __attribute__ ((init_priority (CRYPTOP...
^
cryptlib.cpp:1000:19: warning: declaration requires a global destructor
[-Wglobal-constructors]
const std::string AAD_CHANNEL __attribute__ ((init_priority (CRYPTOPP_IN...
^
cryptlib.cpp:1001:26: warning: declaration requires a global destructor
[-Wglobal-constructors]
const NullNameValuePairs s_nullNameValuePairs __attribute__ ((init_prior...
^
3 warnings generated.
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c cpu.cpp
cpu.cpp:1066:16: warning: declaration requires a global constructor
[-Wglobal-constructors]
...s_init __attribute__ ((init_priority (CRYPTOPP_INIT_PRIORITY + 10))) = InitCpu();
^ ~~~~~~~~~
1 warning generated.
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c integer.cpp
integer.cpp:4817:20: warning: declaration requires a global constructor
[-Wglobal-constructors]
...s_init __attribute__ ((init_priority (CRYPTOPP_INIT_PRIORITY + 10))) = InitInteger();
^ ~~~~~~~~~~~~~
integer.cpp:4818:16: warning: declaration requires a global destructor
[-Wglobal-constructors]
const Integer g_zero __attribute__ ((init_priority (CRYPTOPP_INI...
^
integer.cpp:4819:16: warning: declaration requires a global destructor
[-Wglobal-constructors]
const Integer g_one __attribute__ ((init_priority (CRYPTOPP_INIT...
^
integer.cpp:4820:16: warning: declaration requires a global destructor
[-Wglobal-constructors]
const Integer g_two __attribute__ ((init_priority (CRYPTOPP_INIT...
^
4 warnings generated.
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c 3way.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c adler32.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c algebra.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c algparam.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c arc4.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c aria.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -mssse3 -c aria_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c ariatab.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c asn.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c authenc.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c base32.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c base64.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c basecode.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c bfinit.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c blake2.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -msse4.1 -c blake2b_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -msse4.1 -c blake2s_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c blowfish.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c blumshub.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c camellia.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c cast.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c casts.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c cbcmac.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c ccm.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c chacha.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -mavx2 -c chacha_avx.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -msse2 -c chacha_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c cham.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -mssse3 -c cham_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c channels.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c cmac.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c crc.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -msse4.2 -c crc_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c darn.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c default.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c des.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c dessp.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c dh.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c dh2.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c dll.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c dsa.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c eax.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c ec2n.cpp
ec2n.cpp:19:21: warning: declaration requires a global destructor
[-Wglobal-constructors]
const EC2N::Point g_identity __attribute__ ((init_priority (CRYPTOPP_I...
^
1 warning generated.
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c eccrypto.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c ecp.cpp
ecp.cpp:21:20: warning: declaration requires a global destructor
[-Wglobal-constructors]
const ECP::Point g_identity __attribute__ ((init_priority (CRYPTOPP_IN...
^
1 warning generated.
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c elgamal.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c emsa2.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c eprecomp.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c esign.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c files.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c filters.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c fips140.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c fipstest.cpp
fipstest.cpp:56:14: warning: declaration requires a global destructor
[-Wglobal-constructors]
SecByteBlock g_actualMac;
^
1 warning generated.
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c gcm.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -mssse3 -mpclmul -c gcm_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c gf256.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c gf2_32.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c gf2n.cpp
gf2n.cpp:26:24: warning: declaration requires a global destructor
[-Wglobal-constructors]
const PolynomialMod2 g_zero __attribute__ ((init_priority (CRYPTOPP_IN...
^
gf2n.cpp:27:24: warning: declaration requires a global destructor
[-Wglobal-constructors]
const PolynomialMod2 g_one __attribute__ ((init_priority (CRYPTOPP_INI...
^
2 warnings generated.
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c gfpcrypt.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c gost.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c gzip.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c hc128.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c hc256.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c hex.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c hight.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c hmac.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c hrtimer.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c ida.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c idea.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c iterhash.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c kalyna.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c kalynatab.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c keccak.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c keccakc.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c lea.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -mssse3 -c lea_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c lsh.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c luc.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c mars.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c marss.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c md2.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c md4.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c md5.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c misc.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c modes.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c mqueue.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c mqv.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c nbtheory.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c neon_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c oaep.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c ospstore.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c osrng.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c padlkrng.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c panama.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c pkcspad.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c poly1305.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c polynomi.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c ppc_power7.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c ppc_power8.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c ppc_power9.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c ppc_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c pssr.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c pubkey.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c queue.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c rabbit.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c rabin.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c randpool.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c rc2.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c rc5.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c rc6.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c rdrand.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c rdtables.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c rijndael.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -msse4.1 -maes -c rijndael_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c ripemd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c rng.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c rsa.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c rw.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c safer.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c salsa.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c scrypt.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c seal.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c seed.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c serpent.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c sha.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c sha3.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -msse4.2 -msha -c sha_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c shacal2.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -msse4.2 -msha -c shacal2_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c shark.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c sharkbox.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c simeck.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -mssse3 -c simeck_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c simon.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -mssse3 -c simon128_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -msse4.1 -c simon64_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c skipjack.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c sm3.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c sm4.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -mssse3 -maes -c sm4_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c sosemanuk.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c speck.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -mssse3 -c speck128_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -msse4.1 -c speck64_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c square.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c squaretb.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -msse2 -c sse_simd.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c strciphr.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c tea.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c tftables.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c threefish.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c tiger.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c tigertab.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c ttmac.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c tweetnacl.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c twofish.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c vmac.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c wake.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c whrlpool.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c xtr.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c xtrcrypt.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c zdeflate.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c zinflate.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c zlib.cpp
ar r libcryptopp.a cryptlib.o cpu.o integer.o 3way.o adler32.o algebra.o algparam.o arc4.o aria.o aria_simd.o ariatab.o asn.o authenc.o base32.o base64.o basecode.o bfinit.o blake2.o blake2b_simd.o blake2s_simd.o blowfish.o blumshub.o camellia.o cast.o casts.o cbcmac.o ccm.o chacha.o chacha_avx.o chacha_simd.o cham.o cham_simd.o channels.o cmac.o crc.o crc_simd.o darn.o default.o des.o dessp.o dh.o dh2.o dll.o dsa.o eax.o ec2n.o eccrypto.o ecp.o elgamal.o emsa2.o eprecomp.o esign.o files.o filters.o fips140.o fipstest.o gcm.o gcm_simd.o gf256.o gf2_32.o gf2n.o gfpcrypt.o gost.o gzip.o hc128.o hc256.o hex.o hight.o hmac.o hrtimer.o ida.o idea.o iterhash.o kalyna.o kalynatab.o keccak.o keccakc.o lea.o lea_simd.o lsh.o luc.o mars.o marss.o md2.o md4.o md5.o misc.o modes.o mqueue.o mqv.o nbtheory.o neon_simd.o oaep.o ospstore.o osrng.o padlkrng.o panama.o pkcspad.o poly1305.o polynomi.o ppc_power7.o ppc_power8.o ppc_power9.o ppc_simd.o pssr.o pubkey.o queue.o rabbit.o rabin.o randpool.o rc2.o rc5.o rc6.o rdrand.o rdtables.o rijndael.o rijndael_simd.o ripemd.o rng.o rsa.o rw.o safer.o salsa.o scrypt.o seal.o seed.o serpent.o sha.o sha3.o sha_simd.o shacal2.o shacal2_simd.o shark.o sharkbox.o simeck.o simeck_simd.o simon.o simon128_simd.o simon64_simd.o skipjack.o sm3.o sm4.o sm4_simd.o sosemanuk.o speck.o speck128_simd.o speck64_simd.o square.o squaretb.o sse_simd.o strciphr.o tea.o tftables.o threefish.o tiger.o tigertab.o ttmac.o tweetnacl.o twofish.o vmac.o wake.o whrlpool.o xtr.o xtrcrypt.o zdeflate.o zinflate.o zlib.o
ar: creating libcryptopp.a
ranlib libcryptopp.a
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c adhoc.cpp
adhoc.cpp:40:12: warning: declaration requires a global constructor
[-Wglobal-constructors]
static int s_i = (AdhocTest = &MyAdhocTest, 0);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c test.cpp
test.cpp:116:27: warning: declaration requires a global destructor
[-Wglobal-constructors]
OFB_Mode<AES>::Encryption s_globalRNG;
^
test.cpp:128:13: warning: declaration requires a global destructor
[-Wglobal-constructors]
std::string s_globalSeed;
^
2 warnings generated.
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c bench1.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c bench2.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c bench3.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c datatest.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c dlltest.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c fipsalgt.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c validat0.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c validat1.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c validat2.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c validat3.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c validat4.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c validat5.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c validat6.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c validat7.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c validat8.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c validat9.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c validat10.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c regtest1.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c regtest2.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c regtest3.cpp
/opt/llvm/bin/clang++ -Wglobal-constructors -fPIC -pthread -pipe -c regtest4.cpp
/opt/llvm/bin/clang++ -o cryptest.exe -Wglobal-constructors -fPIC -pthread -pipe adhoc.o test.o bench1.o bench2.o bench3.o datatest.o dlltest.o fipsalgt.o validat0.o validat1.o validat2.o validat3.o validat4.o validat5.o validat6.o validat7.o validat8.o validat9.o validat10.o regtest1.o regtest2.o regtest3.o regtest4.o ./libcryptopp.a
``` | Global Constructor Audit | https://api.github.com/repos/weidai11/cryptopp/issues/754/comments | 0 | 2018-12-04T08:35:38Z | 2018-12-05T12:37:53Z | https://github.com/weidai11/cryptopp/issues/754 | 387,173,153 | 754 |
[
"weidai11",
"cryptopp"
] | MacOS 10.14.1 Mojave. Xcode-10.1. Current master.
**Problem:** no appropriate tests for AVX512 extended instruction set.
**Symptoms**:
```
$ CXX=g++ make all test
Using testing flags: -maes -mpclmul -msse2 -mssse3 -msse4 -msse4.2 -mrdseed -mrdrnd -mavx2 -mavx512f -msha -std=gnu++17 -Os -Ofast -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1
g++ -maes -mpclmul -msse2 -mssse3 -msse4 -msse4.2 -mrdseed -mrdrnd -mavx2 -mavx512f -msha -std=gnu++17 -Os -Ofast -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -fPIC -pthread -pipe -mavx2 -msse4.2 -msha -c integer.cpp
<stdin>:11397:2: error: instruction requires: AVX-512 ISA
vmovdqu64 (%rdi,%rax), %zmm0
^
<stdin>:11398:2: error: instruction requires: AVX-512 ISA
vmovdqu64 %zmm0, (%rsi,%rax)
^
<stdin>:14420:2: error: instruction requires: AVX-512 ISA
vmovdqu64 (%rsi,%rax), %zmm0
^
<stdin>:14421:2: error: instruction requires: AVX-512 ISA
vmovdqu64 %zmm0, (%r10,%rax)
^
<stdin>:14616:2: error: instruction requires: AVX-512 ISA
vmovdqu64 (%rax,%rdx), %zmm1
^
<stdin>:14617:2: error: instruction requires: AVX-512 ISA
vpandq (%rcx,%rdx), %zmm1, %zmm0
^
<stdin>:14618:2: error: instruction requires: AVX-512 ISA
vmovdqu64 %zmm0, (%rax,%rdx)
^
<stdin>:14731:2: error: instruction requires: AVX-512 ISA
vmovdqu64 (%rdi,%rax), %zmm1
^
<stdin>:14732:2: error: instruction requires: AVX-512 ISA
vporq (%rdx,%rax), %zmm1, %zmm0
^
<stdin>:14733:2: error: instruction requires: AVX-512 ISA
vmovdqu64 %zmm0, (%rdi,%rax)
^
<stdin>:14816:2: error: instruction requires: AVX-512 ISA
vmovdqu64 (%rax,%rdx), %zmm2
^
<stdin>:14817:2: error: instruction requires: AVX-512 ISA
vporq (%rsi,%rdx), %zmm2, %zmm0
^
<stdin>:14818:2: error: instruction requires: AVX-512 ISA
vmovdqu64 %zmm0, (%rax,%rdx)
^
<stdin>:15640:2: error: instruction requires: AVX-512 ISA
vmovdqu64 (%rdx,%rax), %zmm0
^
<stdin>:15641:2: error: instruction requires: AVX-512 ISA
vmovdqu64 %zmm0, (%r12,%rax)
^
<stdin>:15826:2: error: instruction requires: AVX-512 ISA
vmovdqu64 (%rdi,%rax), %zmm1
^
<stdin>:15827:2: error: instruction requires: AVX-512 ISA
vpxorq (%rdx,%rax), %zmm1, %zmm0
^
<stdin>:15828:2: error: instruction requires: AVX-512 ISA
vmovdqu64 %zmm0, (%rdi,%rax)
^
<stdin>:15915:2: error: instruction requires: AVX-512 ISA
vmovdqu64 (%rax,%rdx), %zmm2
^
<stdin>:15916:2: error: instruction requires: AVX-512 ISA
vpxorq (%rsi,%rdx), %zmm2, %zmm0
^
<stdin>:15917:2: error: instruction requires: AVX-512 ISA
vmovdqu64 %zmm0, (%rax,%rdx)
^
<stdin>:16302:2: error: instruction requires: AVX-512 ISA
vmovdqu64 (%rdx,%rax), %zmm1
^
<stdin>:16303:2: error: instruction requires: AVX-512 ISA
vpandq (%rcx,%rax), %zmm1, %zmm0
^
<stdin>:16304:2: error: instruction requires: AVX-512 ISA
vmovdqu64 %zmm0, (%rdx,%rax)
^
<stdin>:16381:2: error: instruction requires: AVX-512 ISA
vmovdqu64 (%rdx,%rax), %zmm2
^
<stdin>:16382:2: error: instruction requires: AVX-512 ISA
vpandq (%rcx,%rax), %zmm2, %zmm0
^
<stdin>:16383:2: error: instruction requires: AVX-512 ISA
vmovdqu64 %zmm0, (%rdx,%rax)
^
<stdin>:16637:2: error: instruction requires: AVX-512 ISA
vmovdqu64 (%rdx,%rax), %zmm1
^
<stdin>:16638:2: error: instruction requires: AVX-512 ISA
vporq (%rcx,%rax), %zmm1, %zmm0
^
<stdin>:16639:2: error: instruction requires: AVX-512 ISA
vmovdqu64 %zmm0, (%rdx,%rax)
^
<stdin>:16717:2: error: instruction requires: AVX-512 ISA
vmovdqu64 (%rdx,%rax), %zmm2
^
<stdin>:16718:2: error: instruction requires: AVX-512 ISA
vporq (%rcx,%rax), %zmm2, %zmm0
^
<stdin>:16719:2: error: instruction requires: AVX-512 ISA
vmovdqu64 %zmm0, (%rdx,%rax)
^
<stdin>:16972:2: error: instruction requires: AVX-512 ISA
vmovdqu64 (%rdx,%rax), %zmm1
^
<stdin>:16973:2: error: instruction requires: AVX-512 ISA
vpxorq (%rcx,%rax), %zmm1, %zmm0
^
<stdin>:16974:2: error: instruction requires: AVX-512 ISA
vmovdqu64 %zmm0, (%rdx,%rax)
^
<stdin>:17052:2: error: instruction requires: AVX-512 ISA
vmovdqu64 (%rdx,%rax), %zmm2
^
<stdin>:17053:2: error: instruction requires: AVX-512 ISA
vpxorq (%rcx,%rax), %zmm2, %zmm0
^
<stdin>:17054:2: error: instruction requires: AVX-512 ISA
vmovdqu64 %zmm0, (%rdx,%rax)
^
make: *** [integer.o] Error 1
```
**Proposed solution:** add `-mavx512f` when appropriate, and for Macports GCC - add `-Wa,-mavx512f` too (somehow this is not picked by default). Like this:
```
$ g++ -maes -mpclmul -msse2 -mssse3 -msse4 -msse4.2 -mrdseed -mrdrnd -mavx2 -mavx512f -msha -std=gnu++17 -Os -Ofast -Wa,-q -DCRYPTOPP_CLANG_INTEGRATED_ASSEMBLER=1 -fPIC -pthread -pipe -mavx2 -msse4.2 -msha -Wa,-mavx512f -c integer.cpp
$
``` | GNUmakefile fails to properly accommodate for AVX512f | https://api.github.com/repos/weidai11/cryptopp/issues/753/comments | 21 | 2018-12-03T17:22:02Z | 2019-10-13T07:16:47Z | https://github.com/weidai11/cryptopp/issues/753 | 386,921,591 | 753 |
[
"weidai11",
"cryptopp"
] | I'm testing on an old MacBook Pro from about 2011. It has OS X 10.8 and SSE4 but nothing higher. Using Macports Clang 6.0 for a compile:
```
$ CXX=/opt/local/bin/clang++-mp-6.0 make -j 5
/opt/local/bin/clang++-mp-6.0 ... -c cryptlib.cpp
/opt/local/bin/clang++-mp-6.0 ... -c cpu.cpp
...
/opt/local/bin/clang++-mp-6.0 ... -c chacha.cpp
/opt/local/bin/clang++-mp-6.0 ... -mavx2 -c chacha_avx.cpp
/opt/local/bin/clang++-mp-6.0 ... -msse2 -c chacha_simd.cpp
...
```
Notice `chacha_avx.cpp` is compiled with `-mavx2`. At runtime we catch a `SIGILL` on a down level machine:
```
$ lldb cryptest.exe
(lldb) target create "cryptest.exe"
Current executable set to 'cryptest.exe' (x86_64).
(lldb) r v
...
* thread #1: tid = 0x19fcc6f, 0x0000000100194b29 cryptest.exe`_GLOBAL__sub_I_chacha_avx.cpp at string:1356, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
frame #0: 0x0000000100194b29 cryptest.exe`_GLOBAL__sub_I_chacha_avx.cpp at string:1356
1353 {
1354 size_type (&__a)[__n_words] = __r_.first().__r.__words;
1355 for (unsigned __i = 0; __i < __n_words; ++__i)
-> 1356 __a[__i] = 0;
1357 }
1358
1359 template <size_type __a> static
(lldb) disass
cryptest.exe`_GLOBAL__sub_I_chacha_avx.cpp at chacha_avx.cpp:
0x100194b10: pushq %rbp
0x100194b11: movq %rsp, %rbp
0x100194b14: pushq %r14
0x100194b16: pushq %rbx
0x100194b17: movq 0x24a062(%rip), %rax ; (void *)0x0000000100409ad0: vtable for CryptoPP::NullNameValuePairs
0x100194b1e: addq $0x10, %rax
0x100194b22: movq %rax, 0x2ddc97(%rip) ; CryptoPP::s_nullNameValuePairs
-> 0x100194b29: vxorps %xmm0, %xmm0, %xmm0
0x100194b2d: vmovups %xmm0, 0x2ddc93(%rip) ; CryptoPP::DEFAULT_CHANNEL
0x100194b35: movq $0x0, 0x2ddc98(%rip) ; CryptoPP::DEFAULT_CHANNEL + 12
0x100194b40: leaq 0x2ddc81(%rip), %rsi ; CryptoPP::DEFAULT_CHANNEL
0x100194b47: movq 0x248a0a(%rip), %rbx ; (void *)0x00007fff8f09321e: std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()
...
```
`vxorps` is an AVX instruction. It seems Clang is using the enhanced ISA for global constructors instead of the base ISA. <strike>And it is worth mentioning we don't provide any global data.</strike>
GCC 6 does not suffer the problem. Or is it not surfacing on either the old MacBook and an old Core2 laptop running Debian. Clang is also OK on the old Debian laptop, so it looks like an issue local to OS X and Clang.
Now open on the LLVM-dev mailing list: [Restrict global constructors to base ISA](https://lists.llvm.org/pipermail/llvm-dev/2018-December/128159.html). | SIGILL on older OS X with new Clang due to global ctor instructions | https://api.github.com/repos/weidai11/cryptopp/issues/751/comments | 7 | 2018-12-01T11:19:38Z | 2018-12-05T19:03:38Z | https://github.com/weidai11/cryptopp/issues/751 | 386,449,265 | 751 |
[
"weidai11",
"cryptopp"
] | We've been using the new ED25519 support on Crypto++, but unfortunately had to fork the files involved due to some API issues.
Right now the only way to derive the public key from the private one is with the [`crypto_sign_keypair`](https://github.com/weidai11/cryptopp/blob/master/tweetnacl.cpp#L739) function, which always pulls new random data for the private key. We need an API that allows us to provide the 32 byte private key and derive the public key from it.
If I make some changes here and open a PR is this something that would be considered?
If so, then the first step would be to work out the new API that we want, whilst presumably keeping backward compatibility on the existing one. | ED25519 API design | https://api.github.com/repos/weidai11/cryptopp/issues/750/comments | 3 | 2018-11-29T06:47:20Z | 2018-11-30T10:03:45Z | https://github.com/weidai11/cryptopp/issues/750 | 385,592,792 | 750 |
[
"weidai11",
"cryptopp"
] | I'm working on GCC135, which is Power9. `cryptest.exe` is failing self tests for SIMON and SPECK. UBsan is generating findings for SIMON, SPECK and other algorithms. The findings are *`runtime error: signed integer overflow ...`*.
```
$ ./cryptest.exe tv speck
Using seed: 1543351592
Testing SymmetricCipher algorithm SPECK-64/ECB.
ppc_simd.h:965:38: runtime error: signed integer overflow: 544497990 + 1936613733 cannot be represented in type 'int'
ppc_simd.h:982:38: runtime error: signed integer overflow: 2066890867 - -184737755 cannot be represented in type 'int'
...
```
The rub is, we are relying upon unsigned wrap because that's the algorithm. `ppc_simd.h:965` and `ppc_simd.h:982` are a `vec_add`. We only use unsigned vectors and they are `uint8x16_p`, `uint32x4_p` and `uint64x2_p` datatypes. `uint32x4_p` and friends don't suffer overflow like signed integers. Unsigned integers experience wrap and that's well defined. SIMON and SPECK depend on unsigned wrap.
Other version of GCC are OK, meaning the test program passes its self tests. XLC is also OK, meaning the test program also passes its self tests. I don't believe the other versions of GCC are UBsan capable so I don't have datapoints for GCC 4.8 and 4.9.
Clang 7.0 and UBsan is clean with the [LLVM Issue 39704](https://bugs.llvm.org/show_bug.cgi?id=39704) patch. Also see [Issue 742](https://github.com/weidai11/cryptopp/issues/742).
Finally, this is [IBM's port of GCC](https://developer.ibm.com/linuxonpower/advance-toolchain/):
```
$ /opt/at12.0/bin/c++ --version
c++ (GCC) 8.2.1 20180813 (Advance-Toolchain-at12.0) [revision 263510]
```
-----
```
gcc135:cryptopp$ CXX=/opt/at12.0/bin/c++ CXXFLAGS="-DNDEBUG -g2 -O1 -std=c++14" make ubsan -j 8
Using testing flags: -DNDEBUG -g2 -O1 -std=c++14
/opt/at12.0/bin/c++ -DNDEBUG -g3 -O1 -std=c++14 -fPIC -pthread -pipe -fsanitize=undefined -DCRYPTOPP_COVERAGE -c cryptlib.cpp
/opt/at12.0/bin/c++ -DNDEBUG -g3 -O1 -std=c++14 -fPIC -pthread -pipe -fsanitize=undefined -DCRYPTOPP_COVERAGE -c cpu.cpp
...
```
And:
```
gcc135:cryptopp$ ./cryptest.exe v 2>&1 | grep runtime
ppc_simd.h:965:38: runtime error: signed integer overflow: 1795745381 + 1359893119 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1779033703 + 1788603673 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1449989905 + 907673601 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -727329920 + -2051632002 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -602958948 + -1928870611 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1763137737 + 428286322 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1398709747 + 1304921762 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2103543237 + -1060181766 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1591335787 + -682639940 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2012566639 + -157549715 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2020991569 + 1496934227 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2124850942 + 687221124 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 800772831 + 1595062450 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1482895230 + -1614132519 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1586958284 + 1212480440 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 661735398 + 1937648992 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -699689403 + -1895902549 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1275216773 + -1272510351 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1699375344 + 561843722 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1943725012 + 2109705259 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1044339728 + -1930225484 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2125394381 + -2125222627 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 748495859 + 1792621114 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 552397119 + 1888073405 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1854496772 + -1354848065 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1411900555 + 1592714781 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1176817040 + -1016953433 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1954865916 + -588601733 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2101196823 + 1023414555 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1751499647 + 1111943903 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1226289147 + 1114723798 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2012040499 + -684855106 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1199652030 + 1529513245 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1565802021 + -1048771574 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1534216914 + -1416940749 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1268189762 + 1255198866 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1286130196 + 1389721847 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1456651462 + 1671903379 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 494144353 + 1810980676 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1488479633 + 692441750 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2114045913 + -1815044361 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1867870837 + 392388082 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1994310423 + 1384578353 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -705665777 + -1663794566 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2012863428 + -929918867 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1665873643 + 753418095 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2144364446 + -953802192 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2021151317 + -228963979 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1587770740 + -1597130994 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1110065562 + 1300730933 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 650220158 + 1751470242 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1884170801 + -1533342232 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -913756598 + -1290445783 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1669664176 + -613010499 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2090764915 + 639442744 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2012292621 + 1360726055 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1088421065 + -1709235109 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1742054997 + -1994071744 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2085265870 + 600188951 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -818588343 + -1747805653 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2064111487 + -1080022242 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1049405833 + 1966709751 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1046342749 + -1503947842 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1003967599 + 1149700583 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1097477271 + 1461035322 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2048113455 + 1758328122 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1831712074 + 1865095971 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -176119344 + -2086209052 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1538155810 + 825473365 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1766977136 + 1553447489 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1959751852 + -1166412614 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1808748136 + 1377151140 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -221274127 + -1975279703 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1821256000 + -1691711539 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1454832924 + 1710436928 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1802615317 + 1942027095 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1960409936 + 1327335117 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1430968412 + 1325193843 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1795745351 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 915518272 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2115592469 + -1559451712 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1841118261 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1015383965 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 249068672 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1816206322 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1092469242 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1071908567 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1211425866 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1833077941 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 525273884 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1031353622 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1721332800 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1587880597 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1869252704 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 120765462 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2097010332 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1668879701 + -1267005768 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1032922000 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 614965666 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1280520060 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 192467543 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 370804432 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1689169172 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 126107177 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 683511018 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 356821403 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1160065707 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1717546912 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 675578770 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1015922799 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2100972562 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 647481291 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 952236828 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1373518448 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1638160611 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1987828087 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1332388558 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2023607803 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 93637225 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1310332656 + 2054847098 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7640891576939301132 + 5840696475078001361 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -4942790177534073029 + -7262195936335986787 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6625583534739731862 + 7088136013498015297 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8596438705216107424 + 4455746181456267703 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4168057771509670773 + 8691176764166632836 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -5587509538033248007 + -3814479935187347353 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -5394559187037176489 + -5482523438063429899 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7656193049704195741 + -6718933253649367068 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 9044754600488956256 + 268893986257567535 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7569661448608945228 + 6162876663482477695 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3695339333455081440 + 6549821185338779914 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -9133095486963027825 + -977155760044873205 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6211651116861703195 + -6762507972863997336 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1643534984589193245 + 8355919799446258943 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1088361176963217737 + -8961748042209081999 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8336492826701650586 + 2240392059517599311 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -5576655339148455440 + -4432342384887711699 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -5081150229338654520 + -5962536707724866431 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7869859187490301719 + -9191247468485020652 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8437746349673384477 + 8447963699608958025 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8358534945579764747 + 5149715405522965421 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8532028982861727596 + -3010024685762167608 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -4938493722606821448 + -5426253115111256963 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -5317727955167889788 + -5022778479672069281 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8564291858897228120 + 2090136275602076729 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 5463664649515524180 + 7379077927629153597 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6443594631412657080 + -5179014335783709897 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6060456895271522314 + -7087022586161955540 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3810561665119691923 + 6902122112739397052 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2234609552640854788 + -9016235296737398684 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2537175428423678690 + -8263531074292190605 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7195899224331298144 + 5645760405329227806 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -9088344030642929036 + -1848098094228521470 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7646037570993682321 + 8974260026411923395 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -5605084444049025666 + -6102825186475192151 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 9003321069300025008 + 3090951214192086597 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6352471790217440011 + -6602517929424205643 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8120906006107896672 + 8675415696416414738 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8141857148963557726 + -3223475839775172263 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 5457338137928549646 + 4039032688770564299 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7363906539342741207 + -5620137014082980813 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7268833190955867638 + 7820396463071844538 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7372182111778035661 + -7582726675765800485 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -3357514419681839440 + -6678479755682798314 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7448182490067175932 + 7842192743983349160 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8099334021858989236 + -8068891132137917153 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7713706352777029072 + 4998274493842338361 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 650177395464547057 + 8635408349173602218 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3772948782157860315 + 5732974016502626681 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -5734763227090184183 + -5718791421261893688 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7216961006517785926 + 5191392115726507856 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6863075250938038823 + -3122692305445285271 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -4364051005677086668 + -5455555603973605808 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8740379279577481904 + -7273104316554972188 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8627137464058859140 + 8164553819529825685 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6806805306506658339 + 4063926917708271069 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6921306512565194907 + -2434264864039187415 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 9121747971976431145 + 1695811340961894649 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8316191913695600515 + -8648902628234369252 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 9091172697105169294 + 7630573843081974195 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7482910984082070020 + -3682986965014540478 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7629184760771225822 + -7308287016973376014 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -4020098629209402038 + -5884046582793076083 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -4025855855768998348 + -7820159798910554615 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6600728419029998653 + 4972475255301057222 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8052261501979408521 + -8816406403631485420 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -5133769317881290698 + -6751095128581243352 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2442568410729338145 + 6938008250942322238 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6259837562138177605 + -8543899979126419110 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3814521659817884749 + 7139646696280320257 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 9157930945088217215 + 293738683704949207 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7492575717611346610 + -3059151389551898033 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7695414269836880560 + -5611297654878417581 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8995074444916385194 + -8625544805891549686 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 5140032148994253475 + 6877379779404994564 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7325082951973408718 + 2315458467186418870 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3584718330279240960 + 8925725046216986546 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -3996616980234681713 + -7828702307513655903 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -5936300697213324110 + -4796472003193380540 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6820391320043880106 + -4454889759315445385 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6787892343228700170 + -3680855198799151970 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6945350563375479047 + -4151418969906533191 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7713971373302846966 + 7965401929638824999 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2767370770767879651 + -7030818124491925492 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4909923059328819619 + 6329991962250691757 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8648555178449746473 + 1725855686351629073 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1261609496621954343 + -8665129514915141235 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8046712834119026951 + -9144654877374908035 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7206829052130040240 + -2508120616707495439 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8072333208908176070 + -2658417877005714369 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8731794404872015937 + 4931265264135458553 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6151519589416131717 + 7266309913640093105 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -4783684404702077126 + -7746879697601297566 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7597827836576259815 + 7027962680233032173 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7718954714226743313 + 3068081996664928797 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -9029473113530098791 + -2398958678225419496 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8739275022200308784 + -1461139073412572767 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8613643495696448769 + 3173448779688948794 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6910258670257588855 + -5727670390897292988 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8438428848448237146 + -1603045568250862367 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2126164474319885834 + 7712957110351826292 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8802370726031570150 + -1164117806547888995 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8353351025369439145 + 4526236708318589012 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -9215205269757060660 + -3924250498056074086 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2984849414996172178 + -6850114486308169215 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6548868522649088487 + 7992841289732747693 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6108375630478339779 + -3934574714393378812 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -3905034261327715436 + -8537233595440914744 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -3158858085404133077 + -6869514724982698153 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 5487593458374435256 + 6688564949806489467 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4312326147008854447 + 6404182248090589886 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6407901849220413367 + 8184481052331700107 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8468346813530751012 + -2557171941506769049 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6524634781891697791 + -6297540328566886608 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -3692013657942959219 + -5575547613579824388 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7462367942687920704 + 3703365007902733369 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7970527927574684819 + -8300102698135472947 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7281011123118897543 + -6551935790783007218 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4613797159807646855 + 7983229760120631001 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -5333404439004715024 + -5577186272311300464 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4360914363670354176 + 7446899515391653197 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7536153362393536128 + 2876033978074058165 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6638930194647544243 + -4597891836983327440 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6970925740274822341 + -8494274105536903889 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7960105077213181994 + -7416534276291509829 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7599735966349138870 + 3857743625552554894 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -3918126984883016375 + -8180460325559005930 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7828914065879766386 + 3869621886625749586 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -3496369156795397335 + -8893523653111133510 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -5397947145408569966 + -5825711547499952993 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7461714509465096178 + -3237843259605950025 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1111711911045911975 + -8247349074430409598 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7026020680877318954 + 6116340835090331808 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2978238515462545905 + 7828931642946546608 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -9054247158605712126 + -3890415684366931119 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7639573915300459103 + -6455146303356702949 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -5405364889229075281 + -7686751523330496561 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6025745488320239566 + 8624134549230562721 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4062732025514644304 + 8315147134948941731 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4053323322056703929 + 8832622755565416794 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -5642943605327302388 + -3791520550112082757 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7292814328025573619 + 7171507261503095568 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -4866657422661740776 + -5521354797526641365 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7079214725213347663 + 8405238946447189629 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2204748368535748190 + -9126961816157283669 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8993024367030808909 + 8111431960750966355 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8410474978992702390 + 8958620250503326249 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3113604680050215081 + 8251346773352940406 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7081792620306396129 + -4820563328463302662 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6285207559640537099 + -8070125698621742996 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3534206321568598497 + 6820979022037538893 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8064797670197323816 + -1176850549779637167 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8012527051071258351 + 5664896119856718778 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -3297248666394158683 + -6879513630413158937 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2690869019638255603 + -6989860265525003741 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7373769194716990027 + 4951341031732466403 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 5547899675958277106 + 8916311268836546253 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7368708128162742556 + 4617017515814556844 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6318547087036068808 + 4507837096187761780 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8753579168446454429 + 875996238556806181 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6773048411136587797 + 7089753113743963012 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8967533082593429318 + 4153255151214013075 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7385629095273278635 + -4165211681677404685 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6058026714364688560 + 5186078699825943901 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3072648919169997328 + 8533861353997385220 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6518685468849468518 + -6045975457507685462 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7739430804463375084 + -4909056411385797478 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -5637892472466893781 + -8949403741142120830 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7774533390233818159 + -9001184311362369016 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6325776626266480996 + -7149041912856108700 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8611574228903184425 + -1922749502671089187 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8254692844789758418 + 5302293504501612646 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2235914565956849245 + 7127040977204523766 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -7312216505283286803 + -8968283333050648890 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7805227031880027776 + 3229534199034829740 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7640891576939301192 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3860345064553105043 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -5760897922911092467 + -4672215851314136331 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7599397025216101019 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 9030020439619781983 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2522853926060645355 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 5279797136362026786 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 5839261911000597279 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8318943872975099231 + 3570014165989186563 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6034143604021067353 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -3587099383443130157 + -7465250810337745252 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4898965673448398729 + 5745341058092746977 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8576194056826864051 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8969545845431148536 + 6895241023083821721 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8470990499783792257 + 6870800871182746596 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4870181865594344503 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3849465974974659822 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6867268574064594880 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 598086962675647310 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2364899785464945335 + -6893208831083410063 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6550129362750836111 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4358451193760144614 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3080744190579727516 + 7575010763601975488 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 5569834524076678095 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7385701241938485222 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7593276487793020038 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8204733469564104569 + 5197932972505939311 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3849825073626243802 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 611095072073543802 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8813083688211435972 + -1939372579661282038 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 712853461231916526 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 949403361839920263 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2921219299657598899 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8862896780445155020 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8975684989204132343 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6623471489934705822 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4365685637722614695 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -9184921840862236693 + -8027744880859602220 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2755164461665672760 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7205840003622540508 + 8840822157848549790 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 866344403635382317 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6241014733741454220 + 8997018668855113546 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 524625672101635586 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3432488967455168122 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4194314996602624661 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6898013970550066564 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -8053893261752398336 + -4245931657829485053 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2328096813005390065 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4354685564936845355 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4354685564936845355 + 8137848963850133965 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8483996183730549600 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3092438292292523799 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8754661011712342075 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8727977436712954624 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3204232651624414911 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3583969858807943210 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3630140870141267278 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8593191148049654873 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2047586099452624202 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1077500281730469198 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4293972752423597105 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1213915255196905716 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4347426700658620688 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6517736026676816943 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8911283142826250980 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2053647974921760360 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4206048264122133070 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3328687054112319303 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7025518154987833325 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3787341247757845419 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3085584688252379054 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6085391690218234291 + -5279952176329000652 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 882634128974813817 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3182781657593317993 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4952055024768229624 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 933184147613576665 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8025371478358455897 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4556791745678395494 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4466362051994757605 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6908400885012454387 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 9069560165454420010 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8013630299484331010 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4092740473696290649 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 9148836470585850852 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 8387643986830911170 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 981253647965411253 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1937304610620891593 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1300022251434899641 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1461089992347087703 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6300724399850815914 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4940338807304473765 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2858091851805532204 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3452184996846813382 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 9155634269002976059 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7204177944436759973 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1461890713001321476 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7235242230054639238 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 5128337842483438112 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6186977736859855069 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 5507345874795867048 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 818048732713241976 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6194009313655970736 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2195730049403360023 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3350344517765215235 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2445399534832870457 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 5117904055220257021 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1308095219506068842 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 4494663350999022775 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2754818318286172967 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 7661189776679717614 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6268194441729751576 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 6205875810808660491 + 3019365217596356039 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 3966064894941076593 + 8825501086245354106 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 544497990 + 1936613733 cannot be represented in type 'int'
ppc_simd.h:982:38: runtime error: signed integer overflow: 2066890867 - -184737755 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1203497594 + 1040722969 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1136363442 + 1057227805 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1337664394 + 1015028753 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2336349467901784421 + 8388271400802151712 cannot be represented in type 'long int'
ppc_simd.h:982:38: runtime error: signed integer overflow: 4151852007556372910 - -8580311245549809276 cannot be represented in type 'long int'
.ppc_simd.h:982:38: runtime error: signed integer overflow: 6158031619197878836 - -5704907073678289980 cannot be represented in type 'long int'
ppc_simd.h:982:38: runtime error: signed integer overflow: -8513707710535931932 - 7155688914677307257 cannot be represented in type 'long int'
ppc_simd.h:982:38: runtime error: signed integer overflow: 4687045299542095385 - -5723912333271943755 cannot be represented in type 'long int'
....................ppc_simd.h:965:38: runtime error: signed integer overflow: 3866741619922154484 + 5384863931095854140 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6984703173847016066 + -3125847255663130038 cannot be represented in type 'long int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -6035939017812121305 + -3223553410878861721 cannot be represented in type 'long int'
....ppc_simd.h:965:38: runtime error: signed integer overflow: 127 + 1 cannot be represented in type 'signed char'
......ppc_simd.h:965:38: runtime error: signed integer overflow: 2036477237 + 1469461203 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2036477237 + 1469461203 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2036477237 + 1469461203 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2036477237 + 1469461203 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2019844463 + 1038200163 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2019909999 + 1021422963 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2019975535 + 1071754627 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2020041071 + 1054977427 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1580041270 + -679258745 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1580041270 + -796703344 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -346455843 + -1860210571 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1236922670 + -2125080951 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1253634334 + -2125080951 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1203237134 + -2125080951 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1219948798 + -2125080951 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1906513103 + 890186251 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1906513103 + 891234826 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1906513103 + 904866325 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 2088300882 + 1424230320 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 472152076 + 2010027954 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 949937547 + 1350810179 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1497219367 + -650478558 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -433091036 + -2144264211 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1482539293 + -1997902555 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1807565888 + 1725655180 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1480730524 + 683224585 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -2074732620 + -1972650522 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: -1949661941 + -780842280 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 532776592 + 1733081611 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1562638536 + 971408689 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1795885804 + 954865599 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1132620880 + 1286376086 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1466207165 + 1634760805 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 761727285 + 1634760805 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1255615316 + 1634760805 cannot be represented in type 'int'
ppc_simd.h:965:38: runtime error: signed integer overflow: 1902523577 + 2036477238 cannot be represented in type 'int'
``` | PowerPC, GCC 8.2 and failed self tests | https://api.github.com/repos/weidai11/cryptopp/issues/749/comments | 2 | 2018-11-27T21:24:34Z | 2018-12-10T16:05:00Z | https://github.com/weidai11/cryptopp/issues/749 | 384,992,261 | 749 |
[
"weidai11",
"cryptopp"
] | Power9 provides random numbers using `darn` instruction. This issue will track the addition of DARN for Power9. | Add Power9 Random Number Generator support | https://api.github.com/repos/weidai11/cryptopp/issues/747/comments | 0 | 2018-11-27T04:33:59Z | 2018-11-30T22:56:53Z | https://github.com/weidai11/cryptopp/issues/747 | 384,618,440 | 747 |
[
"weidai11",
"cryptopp"
] | * Windows 10, 1803, Russian language
* Latest stable version of Crypto++
* built using VS2017
```
std::string decrypt(const std::string& str_in, const std::string& key, const std::string& iv)
{
std::string str_out;
CryptoPP::CBC_Mode<CryptoPP::AES>::Decryption decryption((byte*)key.c_str(), key.length(), (byte*)iv.c_str());
CryptoPP::StringSource decryptor(str_in, true,
new CryptoPP::Base64Decoder(
new CryptoPP::StreamTransformationFilter(decryption,
new CryptoPP::StringSink(str_out)
)
)
);
return str_out;
}
```
Code works on multiple machines but fails on some computers very rarely. Tests have been done and I'm 100% sure that it is a fault in the Crypto++ lib.
Given the same key, iv, encrypted message 90% of the computers will decrypt the message fine. But for the 10% the application crashes at the decrypt() function.
| AES CBC Decrypt crashes on some machines | https://api.github.com/repos/weidai11/cryptopp/issues/746/comments | 2 | 2018-11-26T12:35:34Z | 2018-12-01T01:19:08Z | https://github.com/weidai11/cryptopp/issues/746 | 384,310,995 | 746 |
[
"weidai11",
"cryptopp"
] | A while back we were catching odd (and obscure) failures on lesser used platforms. Everything pointed to memory but we were not able to isolate or pinpoint the issue. Eventually we added an assert to `FixedSizeAllocatorWithCleanup` that verified `m_allocated` during deallocation:
```
void deallocate(void *ptr, size_type size)
{
if (ptr == GetAlignedArray())
{
// If the m_allocated assert fires then the bit twiddling for
// GetAlignedArray() is probably incorrect for the platform.
// Be sure to check CRYPTOPP_ALIGN_DATA(8). The platform may
// not have a way to declaritively align data to 8.
CRYPTOPP_ASSERT(size <= S);
CRYPTOPP_ASSERT(m_allocated);
m_allocated = false;
SecureWipeArray((pointer)ptr, size);
...
}
}
```
The assert would fire on occasion. We thought we cleared the related issues in [PR #709](https://github.com/weidai11/cryptopp/pull/709) and [PR #710](https://github.com/weidai11/cryptopp/pull/710) but we were mistaken.
We were still catching obscure failures on occasion. Reflecting back on it, we assumed we could get at least an 8-byte stack alignment out of the linkers in the toolchain, but the AIX linker appears to be going lower (perhaps 4-byte or 2-byte).
To test our theory we added another assert that verifies the end of the oversized fixed array with extra padding is larger than the end of the adjusted array returned to the caller. We did this at [Commit 6cf8895bf130](https://github.com/weidai11/cryptopp/commit/6cf8895bf130).
Test runs on Linux, Windows, and Solaris were OK. Below our new assert is lighting things up on AIX ...
```
$ CXXFLAGS="-DDEBUG -g2 -O0" make - j 8
...
$ ./cryptest.exe v
...
Testing RandomPool generator...
passed: 10240 generated bytes compressed to 10245 bytes by DEFLATE
Assertion failed: secblock.h(510): CryptoPP::FixedSizeAllocatorWithCleanup<unsigned int,16,CryptoPP::NullAllocator<unsigned int>,1>::GetAlignedArray
Assertion failed: secblock.h(510): CryptoPP::FixedSizeAllocatorWithCleanup<unsigned int,16,CryptoPP::NullAllocator<unsigned int>,1>::GetAlignedArray
Assertion failed: secblock.h(510): CryptoPP::FixedSizeAllocatorWithCleanup<unsigned int,16,CryptoPP::NullAllocator<unsigned int>,1>::GetAlignedArray
...
```
There are 1908 assertions in this run of `cryptest.exe v`. We are going to have to revisit things. | FixedSizeAllocatorWithCleanup is not always aligned as expected | https://api.github.com/repos/weidai11/cryptopp/issues/745/comments | 2 | 2018-11-22T04:01:01Z | 2018-12-05T23:54:37Z | https://github.com/weidai11/cryptopp/issues/745 | 383,372,875 | 745 |
[
"weidai11",
"cryptopp"
] | Hello everyone,
I'm trying to import a DER formated secp256k1 private key into my program.
The key was generated according to the [wiki](https://www.cryptopp.com/wiki/Keys_and_formats).
`openssl ecparam -name secp256k1 -genkey -param_enc explicit -outform DER -out key.txt`
Which generated [this file](https://github.com/weidai11/cryptopp/files/2604096/key.txt).
However the following program fails to load the key.
```c++
#include <cryptopp/osrng.h>
#include <cryptopp/eccrypto.h>
#include <cryptopp/asn.h>
#include <cryptopp/oids.h>
#include <cryptopp/files.h>
int main() {
CryptoPP::ECIES<CryptoPP::ECP>::PrivateKey key;
CryptoPP::FileSource source("key.txt", true);
key.Load(source);
}
```
> terminate called after throwing an instance of 'CryptoPP::BERDecodeErr'
> what(): BER decode error
> Abandon (core dumped)
Maybe I'm doing something wrong either in openssl or in my c++ code, but it might also be an issue in the Crypto++ library or in the wiki.
ECIES seems to be working perfectly, and importing keys generated by Crypto++ is working without any issues.
**My configuration :**
I use Ubuntu 18.10, with Crypto++ 7.0 compiled and installed from source with the given Makefile.
g++ is version 8.2.0
When cryptest.exe is run it reports :
> All tests passed! | Importing openssl-made secp256k1 private key fails | https://api.github.com/repos/weidai11/cryptopp/issues/744/comments | 1 | 2018-11-21T11:58:46Z | 2018-11-21T16:14:52Z | https://github.com/weidai11/cryptopp/issues/744 | 383,085,758 | 744 |
[
"weidai11",
"cryptopp"
] | BLAKE2s fails on GCC111, which is AIX 7.1 and XLC 12.01. Both hash and mac fails self tests.
```
$ oslevel -s
7100-03-02-1412
$ xlC -qversion
IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72)
Version: 12.01.0000.0000
```
In fact, the recent BLAKE2 rewrite from [Commit a65d55a3fd0b](https://github.com/weidai11/cryptopp/commit/a65d55a3fd0b) was due to this bug. (And the rewrite did not fix it...) | BLAKE2s failure on AIX 7.1 and XLC 12.01 | https://api.github.com/repos/weidai11/cryptopp/issues/743/comments | 1 | 2018-11-21T05:23:08Z | 2018-11-25T06:47:32Z | https://github.com/weidai11/cryptopp/issues/743 | 382,960,226 | 743 |
[
"weidai11",
"cryptopp"
] | We were able to build LLVM Clang for PowerPC on GCC112 at the [GCC Compile Farm](https://cfarm.tetaneutral.net/machines/list/). LLVM Clang behaves differently than the Clang front-end for XLC, and requires non-trivial fixes.
This report will track the changes for LLVM Clang. | Add Clang 7.0 PowerPC support | https://api.github.com/repos/weidai11/cryptopp/issues/742/comments | 3 | 2018-11-18T08:59:22Z | 2018-11-25T05:34:05Z | https://github.com/weidai11/cryptopp/issues/742 | 381,941,736 | 742 |
[
"weidai11",
"cryptopp"
] | While working [Issue 656](https://github.com/weidai11/cryptopp/issues/656) it suddenly occurred to me... This *"bad result"* is not internationalized (from [GNUmake, around line 100](https://github.com/weidai11/cryptopp/blob/master/GNUmakefile#L102)):
```
BAD_RESULT="fatal|error|unknown|unrecognized|illegal|ignored|incorrect|not found|not exist|
cannot find|not supported|not compatible|no such instruction|invalid mnemonic"
```
At this time we seem to have been running between the cracks. It seems we have been using English testers and modern Linux systems that have all the feature support. I think we need to fix the gap before it becomes a widespread problem.
We have several choices:
1. Revert to toolchain version numbers
2. Require folks to perform an English compile
3. Add international language support
4. Use output artifact as the gate
5. Use a "clean compile" as the gate
All of the choices are pretty shitty except (4) and (5). Item (4) may be a good choice as it proves the toolchain can consume the options and produce an artifact like `a.out`.
Item (5) may be a good choice long as we stay warning-free, which is what we do anyways. For example, here is the SSE2 test under normal conditions. Notice there are no messages, and we can deduce the option was accepted:
```
skylake:cryptopp$ g++ -DNDEBUG -g2 -O0 -msse2 TestPrograms/test_x86_sse2.cxx
skylake:cryptopp$
```
And here's what happens when the compiler cannot handle an option. Notice the presence of output when things go sideways.
```
$ g++ -DNDEBUG -g2 -O0 -mXXX TestPrograms/test_x86_sse2.cxx
g++: error: unrecognized command line option ‘-mXXX’
```
We may be able to combine options (4) and (5).
The caveat I am aware for option (5) is, some OS X compilers generate a warning stating *`-pthreads have no effect, passing to the linker`* (or similar). In this case we would reject a valid option.
We'll keep this report open to solicit ideas and gather feedback.
| Make-based cpu feature tests and language | https://api.github.com/repos/weidai11/cryptopp/issues/741/comments | 8 | 2018-11-18T04:29:59Z | 2018-12-01T13:17:57Z | https://github.com/weidai11/cryptopp/issues/741 | 381,927,604 | 741 |
[
"weidai11",
"cryptopp"
] | ### Crypto++ Issue Report
On the HexDecoder wiki page - https://www.cryptopp.com/wiki/HexDecoder
Section **"Decoding a String (Filter)"**
Code example is missing the `true /*pumpAll*/` as the second argument. Because of that, the code sample doesn't work. It should read:
```
StringSource ss(encoded, true /* pumpAll */,
new HexDecoder(
new StringSink(decoded)
) // HexDecoder
); // StringSource
```
| Typo on HexDecoder help wiki page | https://api.github.com/repos/weidai11/cryptopp/issues/740/comments | 1 | 2018-11-17T01:00:55Z | 2018-11-17T01:21:40Z | https://github.com/weidai11/cryptopp/issues/740 | 381,810,620 | 740 |
[
"weidai11",
"cryptopp"
] | We have two issues in the error below. First, the AVX2 test failed. I believe the Makefile's `BAD_RESULT` expression _does not_ include *`no such instruction`*. Second, we fail to add `-Wa,-q` as expected.
```
$ CXX=/opt/local/bin/g++-mp-6 make
...
/opt/local/bin/g++-mp-6 -DNDEBUG -g2 -O3 -fPIC -pthread -pipe -mavx2 -c chacha_avx.cpp
{standard input}:63:no such instruction: `vbroadcasti128 (%rdi), %ymm7'
{standard input}:64:no such instruction: `vmovdqa %ymm7, %ymm0'
{standard input}:65:no such instruction: `vmovdqa %ymm7, -240(%rbp)'
{standard input}:71:no such instruction: `vbroadcasti128 16(%rdi), %ymm7'
{standard input}:72:no such instruction: `vmovdqa %ymm7, %ymm4'
{standard input}:73:no such instruction: `vmovdqa %ymm7, -272(%rbp)'
{standard input}:79:no such instruction: `vbroadcasti128 32(%rdi), %ymm7'
{standard input}:80:no such instruction: `vmovdqa %ymm7, %ymm15'
{standard input}:81:no such instruction: `vmovdqa %ymm7, -208(%rbp)'
...
``` | Makefile not detecting Macport compiler after cutover to feature-based tests | https://api.github.com/repos/weidai11/cryptopp/issues/738/comments | 9 | 2018-11-11T18:19:22Z | 2018-11-13T17:00:54Z | https://github.com/weidai11/cryptopp/issues/738 | 379,548,493 | 738 |
[
"weidai11",
"cryptopp"
] | Filenames like `pp-simd.h` and `ppc-simd.cpp` cause some tools, like GDB, some trouble. It breaks filename autocomplete and makes it more difficult to perform symbol lookups.
This ticket will track a rename by replacing dashes with underscores. The rename will occur in two stages. First, the library will have the rename applied. This includes the Makefiles and Visual Studio projects. Second, the Autotools and CMake projects will have the rename applied.
Also see [Large rename coming up](https://groups.google.com/forum/#!topic/cryptopp-users/HBz-6gZZFOA) on the mailing list. | Rename files with dashes to underscores | https://api.github.com/repos/weidai11/cryptopp/issues/736/comments | 1 | 2018-11-10T12:57:06Z | 2018-11-10T16:23:11Z | https://github.com/weidai11/cryptopp/issues/736 | 379,420,121 | 736 |
[
"weidai11",
"cryptopp"
] | This ticket will track the cut-in of ChaCha AVX2 implementation. There a little more to this cut-in because AVX2 is new territory. I think we have most of the issues sorted out, including old Linux and Solaris with down-level compilers and linkers.
At the moment AVX2 is failing on one case. The case is VS2017, x64, Release build. AppVeyor result at [build 20159656](https://ci.appveyor.com/project/noloader/cryptopp/builds/20159656). It may be a similar problem as [Issue 649](https://github.com/weidai11/cryptopp/issues/649). | Add ChaCha AVX2 implementation | https://api.github.com/repos/weidai11/cryptopp/issues/735/comments | 1 | 2018-11-08T20:48:54Z | 2018-11-10T13:55:20Z | https://github.com/weidai11/cryptopp/issues/735 | 378,910,614 | 735 |
[
"weidai11",
"cryptopp"
] | The Botan team uncovered an overflow bug in their ChaCha SIMD implementation. Crypto++ based its code on the Botan team's implementation and shared the bug.
The problem arose when the low-word counter wrapped and the high word counter was incremented. The counters themselves were OK; the problem was with an intermediate value that did not properly manage the carry on the wrap.
The ChaCha problem got us curious about the Salsa implementation. We downloaded the ECRYPT reference implementation and modified it to allow seek'ing. We then generated some test cases to seek {1,2,16} blocks prior to the wrap.
<strike>It seems the Crypto++ SIMD implementation of Salsa has the same issue, give or take. The X86 code does not handle the low-counter wrap properly in the SIMD code.</strike>
Here is the Botan PR covering ChaCha: [Pull Request 1728](https://github.com/randombit/botan/pull/1728). Also see [Issue 732, Improve ChaCha20 implementation and test cases](https://github.com/weidai11/cryptopp/issues/732). | Improve Salsa20 implementation and test cases | https://api.github.com/repos/weidai11/cryptopp/issues/734/comments | 1 | 2018-11-05T11:39:58Z | 2018-11-05T14:04:10Z | https://github.com/weidai11/cryptopp/issues/734 | 377,362,618 | 734 |
[
"weidai11",
"cryptopp"
] | The Botan team reworked their ChaCha20 SSE2 implementation. It is about 10% faster on Skylake. They also warned of a potential bug when a users seeks() to 2^32 blocks (256 GB). The issue occurs when overflow happens in an intermediate result (and not the code that adjusts the 64-bit state).
This report tracks three items. First, it documents the work around to ensure we avoid the 256 GB seek issue. Second, it tracks additional test cases to ensure we cover the case. Third, it documents the potential SIMD rewrite to pull the additional 10% out of x86 machines (and possible other architectures).
Here is the Botan PR covering the rewrite: [Pull Request 1728](https://github.com/randombit/botan/pull/1728). | Improve ChaCha20 implementation and test cases | https://api.github.com/repos/weidai11/cryptopp/issues/732/comments | 1 | 2018-11-04T12:17:51Z | 2018-11-09T03:09:44Z | https://github.com/weidai11/cryptopp/issues/732 | 377,146,890 | 732 |
[
"weidai11",
"cryptopp"
] | This ticket will track the cut-in of BLAKE2s Power7 implementation. We have to be careful of this cut-in. It is profitable on little-endian machines, but not big-endian machines. Power7 runs slower than C++ on big endian machines.
And the numbers on GCC112, which is Power8, Linux and little-endian @3.4GHz:
| | MB/s | cpb |
| ------------- | ------------- | ------------- |
| GCC, C++ | 208| 15.58 |
| GCC, Power7 | 316 | 10.28 |
| XLC, Power7 | 125 | 26.0 |
The numbers on GCC119, which is Power8, AIX and big-endian @4.1GHz:
| | MB/s | cpb |
| ------------- | ------------- | ------------- |
| GCC, C++ | 618 | 6.32 |
| GCC, Power7 | 504 | 7.76 |
| XLC, Power7 | 647 | 6.04 |
And the numbers on GCC135, which is Power9, Linux and little-endian @3.8GHz:
| | MB/s | cpb |
| ------------- | ------------- | ------------- |
| GCC, C++ | 228 | 15.93 |
| Power7 | 301 | 12.10 | | Add BLAKE2s Power7 implementation | https://api.github.com/repos/weidai11/cryptopp/issues/731/comments | 1 | 2018-11-02T19:59:30Z | 2018-11-03T11:47:47Z | https://github.com/weidai11/cryptopp/issues/731 | 376,948,700 | 731 |
[
"weidai11",
"cryptopp"
] | This ticket will track the cut-in of BLAKE2b Power8 implementation.
And the numbers on GCC112, which is Power8, Linux and little-endian @3.4GHz:
| | MB/s | cpb |
| ------------- | ------------- | ------------- |
| GCC, C++ | 312 | 10.39 |
| GCC, Power8 | 405 | 8.01 |
| XLC, Power8 | 575 | 5.62 |
The numbers on GCC119, which is Power8, AIX and big-endian @4.1GHz:
| | MB/s | cpb |
| ------------- | ------------- | ------------- |
| GCC, C++ | 307 | 12.76 |
| GCC, Power8 | 926 | 4.22 |
| XLC, Power8 | 1107 | 3.52 |
And the numbers on GCC135, which is Power9, Linux and little-endian @3.8GHz:
| | MB/s | cpb |
| ------------- | ------------- | ------------- |
| C++ | 368 | 9.84 |
| Power8 | 398 | 9.10 | | Add BLAKE2b Power8 implementation | https://api.github.com/repos/weidai11/cryptopp/issues/729/comments | 1 | 2018-10-30T08:56:16Z | 2018-11-03T11:47:24Z | https://github.com/weidai11/cryptopp/issues/729 | 375,380,972 | 729 |
[
"weidai11",
"cryptopp"
] | `#define MX ((z>>5^y<<2)+(y>>3^z<<4))^((sum^y)+(m_k[(p&3)^e]^z))`
->
`#define MX (((z>>5^y<<2)+(y>>3^z<<4))^((sum^y)+(m_k[(p&3)^e]^z)))`
```
BTEA::Dec::ProcessAndXorBlock(...)
while (sum != 0)
```
->
```
do {} while (sum != 0);
// my machine BIG_ENDIAN_ORDER -> LITTLE_ENDIAN_ORDER
```
```
void test_tea_decrypt()
{
unsigned char in[] = { 0x55, 0x75, 0xd0, 0x3b, 0x53, 0x82, 0x10, 0x7a };
unsigned char key[] = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66 };
unsigned char out[] = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37 };
BTEA::Decryption decryption;
AlgorithmParameters params = MakeParameters("BlockSize", (int)sizeof(in));
decryption.UncheckedSetKey(key, 16, params);
decryption.ProcessAndXorBlock(in, NULLPTR, out);
}
``` | test btea | https://api.github.com/repos/weidai11/cryptopp/issues/728/comments | 3 | 2018-10-29T12:48:37Z | 2018-12-06T07:19:42Z | https://github.com/weidai11/cryptopp/issues/728 | 374,999,163 | 728 |
[
"weidai11",
"cryptopp"
] | Do you plan to add the `XChaCha20` cipher because the default cipher has only a 64-bit nonce? It should be a similar initialization as `XSalsa20` with the `HSalsa20` construction. A problem may be that it isn't standardized yet but it's implemented in other libraries such as `libsodium` and `go crypto`.
**References:**
[draft arciszewski xchacha](https://tools.ietf.org/html/draft-arciszewski-xchacha-02) | XChaCha20 support | https://api.github.com/repos/weidai11/cryptopp/issues/727/comments | 3 | 2018-10-25T22:24:23Z | 2019-02-06T09:14:58Z | https://github.com/weidai11/cryptopp/issues/727 | 374,156,839 | 727 |
[
"weidai11",
"cryptopp"
] | `ECB_Mode<BTEA>::Decryption decryption;`
Error C2385 : StaticAlgorithmName
> Thanks @ruijiexie,
>
> Cleared at [Commit daa07255ec8c](https://github.com/weidai11/cryptopp/commit/daa07255ec8c).
in modes.h
` inline unsigned int BlockSize() const
{
CRYPTOPP_ASSERT(m_register.size() > 0); //Error
return static_cast<unsigned int>(m_register.size());
}
`
| BTEA Error | https://api.github.com/repos/weidai11/cryptopp/issues/726/comments | 1 | 2018-10-25T02:06:21Z | 2018-10-25T08:56:29Z | https://github.com/weidai11/cryptopp/issues/726 | 373,743,923 | 726 |
[
"weidai11",
"cryptopp"
] | Windows 10, Crypto++ 7.0, msvc2013 compiler.
This code produces no exception:
`CryptoPP::FileSource f( "myfile", true, new CryptoPP::SignatureVerificationFilter(CryptoPP::ECDSA<CryptoPP::ECP, CryptoPP::SHA256>::Verifier(key), NULL));`
This code produces Pure virtual function call exception:
```
CryptoPP::SignatureVerificationFilter *verificationFilter = new CryptoPP::SignatureVerificationFilter(CryptoPP::ECDSA<CryptoPP::ECP, CryptoPP::SHA256>::Verifier(key), NULL);
CryptoPP::FileSource fileSource( "myfile", true, verificationFilter);
```
Call stack:
```
1 memcmp MSVCR120D 0xf8a14fa
2 purecall MSVCR120D 0xf97a943
3 CryptoPP::DL_ElgamalLikeSignatureAlgorithm<CryptoPP::ECPPoint>::SLen pubkey.h 1408 0x10ef764
4 CryptoPP::DL_SignatureSchemeBase<CryptoPP::PK_Verifier,CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>>::SignatureLength pubkey.h 1508 0x10f06c3
5 CryptoPP::SignatureVerificationFilter::FirstPut filters.cpp 1107 0x110f076
6 CryptoPP::FilterWithBufferedInput::PutMaybeModifiable filters.cpp 364 0x110a4c0
7 CryptoPP::FilterWithBufferedInput::PutModifiable2 filters.h 337 0x10dd362
8 CryptoPP::BufferedTransformation::ChannelPutModifiable2 cryptlib.cpp 484 0x11007fe
9 CryptoPP::FileStore::TransferTo2 files.cpp 99 0x11598c4
10 CryptoPP::BufferedTransformation::TransferMessagesTo2 cryptlib.cpp 656 0x10ffff9
11 CryptoPP::BufferedTransformation::TransferAllTo2 cryptlib.cpp 702 0x11003eb
12 CryptoPP::SourceTemplate<CryptoPP::FileStore>::PumpAll2 filters.h 1366 0x10dd06d
13 CryptoPP::Source::PumpAll filters.h 1309 0x10dd0d9
14 CryptoPP::Source::SourceInitialize filters.h 1343 0x10dd548
15 CryptoPP::FileSource::FileSource files.h 105 0x10d86a3
```
My intention is to pump file contents from file and signature from local variable to signature verifier to verify the signature. I tried this code but it also produces the same exception on MessageEnd call.
```
CryptoPP::SignatureVerificationFilter *verificationFilter = new CryptoPP::SignatureVerificationFilter(CryptoPP::ECDSA<CryptoPP::ECP, CryptoPP::SHA256>::Verifier(key), NULL, CryptoPP::SignatureVerificationFilter::SIGNATURE_AT_END);
CryptoPP::FileSource fileSource( "myfile", false, verificationFilter);
CryptoPP::StringSource signatureSource( (const CryptoPP::byte*)signature.data(), signature.length(), false, verificationFilter);
fileSource.Pump(file.size());
signatureSource.Pump(signature.length());
verificationFilter->MessageEnd();
```
| Pure virtual function call exception | https://api.github.com/repos/weidai11/cryptopp/issues/725/comments | 4 | 2018-10-24T19:10:03Z | 2018-10-27T09:01:37Z | https://github.com/weidai11/cryptopp/issues/725 | 373,634,728 | 725 |
[
"weidai11",
"cryptopp"
] | cryptopp supports both chacha20 and poly1305, but there is no document for chacha20-poly1305. | Need chacha20-poly1305 AEAD support | https://api.github.com/repos/weidai11/cryptopp/issues/724/comments | 1 | 2018-10-21T15:29:46Z | 2019-01-28T13:53:20Z | https://github.com/weidai11/cryptopp/issues/724 | 372,326,507 | 724 |
[
"weidai11",
"cryptopp"
] | compile cryptopp have a error | https://api.github.com/repos/weidai11/cryptopp/issues/722/comments | 1 | 2018-10-17T00:23:06Z | 2018-10-18T01:08:37Z | https://github.com/weidai11/cryptopp/issues/722 | 370,849,881 | 722 | |
[
"weidai11",
"cryptopp"
] | First, thanks for contributing such an incredible library to the community - you rock.
I am statically linking against the master branch of cryptopp.
Currently compiling with `export CXXFLAGS="-Og -g"; make static`.
Running on Centos 7 (`Linux centosdev 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux`)
Calling code is:
```
SecByteBlock iv(AES::BLOCKSIZE);
AutoSeededRandomPool rng;
rng.GenerateBlock(iv, iv.size()); // segfaults from here
```
After enabling debugging flags in cryptopp, looks like the segfault is being thrown by cryptlib.cpp:321 on the call to `GenerateIntoBufferedTransformation(TheBitBucket(), DEFAULT_CHANNEL, n);` in `RandomNumberGenerator::DiscardBytes`.
We cross compile this same code on Windows 10 without any issues. All unit tests from master pass. | SIGSEGV thrown by RandomNumberGenerator::DiscardBytes from current Master | https://api.github.com/repos/weidai11/cryptopp/issues/721/comments | 10 | 2018-10-16T17:11:32Z | 2018-10-25T06:02:33Z | https://github.com/weidai11/cryptopp/issues/721 | 370,712,951 | 721 |
[
"weidai11",
"cryptopp"
] | wiki service down | Wiki service down | https://api.github.com/repos/weidai11/cryptopp/issues/720/comments | 4 | 2018-10-13T13:20:03Z | 2018-10-20T09:17:31Z | https://github.com/weidai11/cryptopp/issues/720 | 369,801,649 | 720 |
[
"weidai11",
"cryptopp"
] | All versions of nacl sdk use the same buggy gcc 4.4.3 toolchain. When compiling C++ code, the compiler even crashes itself (SEGFAULT). But it still the only way to produce the nacl program (.nexe).
Fortunately, crypto++ does not encounter this problem. But there are some inline assembly code in x64 environment cannot be assembled correctly.
To compile the nacl_x64 target, we need some small changes:
1. vmac.cpp
from:
```
#if defined(CRYPTOPP_DISABLE_VMAC_ASM)
# undef CRYPTOPP_X86_ASM_AVAILABLE
# undef CRYPTOPP_X32_ASM_AVAILABLE
# undef CRYPTOPP_X64_ASM_AVAILABLE
# undef CRYPTOPP_SSE2_ASM_AVAILABLE
#endif
```
to:
```
#if defined(CRYPTOPP_DISABLE_VMAC_ASM) \
|| (defined(__native_client__) && CRYPTOPP_BOOL_X64) // NaCl x64 workaround
# undef CRYPTOPP_X86_ASM_AVAILABLE
# undef CRYPTOPP_X32_ASM_AVAILABLE
# undef CRYPTOPP_X64_ASM_AVAILABLE
# undef CRYPTOPP_SSE2_ASM_AVAILABLE
#endif
```
2. whrlpool.cpp:
from:
```
#if defined(CRYPTOPP_DISABLE_INTEL_ASM)
# undef CRYPTOPP_SSE2_ASM_AVAILABLE
# undef CRYPTOPP_SSSE3_ASM_AVAILABLE
#endif
```
to:
```
#if defined(CRYPTOPP_DISABLE_INTEL_ASM) \
|| (defined(__native_client__) && CRYPTOPP_BOOL_X64) // NaCl x64 workaround
# undef CRYPTOPP_SSE2_ASM_AVAILABLE
# undef CRYPTOPP_SSSE3_ASM_AVAILABLE
#endif
```
That's all. | patch for the google native client (NaCl) target | https://api.github.com/repos/weidai11/cryptopp/issues/719/comments | 7 | 2018-09-29T19:47:35Z | 2018-10-20T10:32:58Z | https://github.com/weidai11/cryptopp/issues/719 | 365,161,719 | 719 |
[
"weidai11",
"cryptopp"
] | ### Crypto++ Issue Report **: Security Hole**
Hi , I think there's a mistake about crypto++ in memory allocation , every string we decrypt by cryptopp stores in memory and it never clean up itself , for example :
1. we have an AES encrypted code = "qDhMLeaughgJVzb4lnaCPJoSIXWUbahBTTQvPMJStbvYUvFCoNKeHCeaMfZQWJBpnCY"
2. we decrypt it using cryptopp , then we clean string from memory , Now if we create a **full dump** by [Process Explorer](https://docs.microsoft.com/en-us/sysinternals/downloads/process-explorer)
We see 6 - 20 copy of decrypted string in memory :(
I have an important string that I have to send it privately to another win32 application and it can destroy everything !
**What can I do ?**
* State the operating system and version : **Windows 10**
* State the version of the Crypto++ library : **Latest Version**
* State how you built the library : **Visual Studio 2017**
| Crypto++ Memory Leak and Security Hole | https://api.github.com/repos/weidai11/cryptopp/issues/718/comments | 6 | 2018-09-24T22:12:10Z | 2018-09-25T10:32:13Z | https://github.com/weidai11/cryptopp/issues/718 | 363,339,659 | 718 |
[
"weidai11",
"cryptopp"
] | Hello, When I try compile my project with cryptopp static library there are happens some compile problems. I've tried on current master branch version.
```
Warning C4003 not enough arguments for function-like macro invocation 'F' NM_Engine d:\workspace\anti\current projects\nomercy\extern\cryptopp\misc.h 294
Error C2760 syntax error: unexpected token ')', expected 'expression' NM_Engine d:\workspace\anti\current projects\nomercy\extern\cryptopp\misc.h 294
Error C2059 syntax error: ')' NM_Engine d:\workspace\anti\current projects\nomercy\extern\cryptopp\misc.h 294
Error C1903 unable to recover from previous error(s); stopping compilation NM_Engine d:\workspace\anti\current projects\nomercy\extern\cryptopp\misc.h 301
```

IDE: Visual studio 2017(17134 SDK toolset), c++17 enabled.
| Windows compile problem | https://api.github.com/repos/weidai11/cryptopp/issues/717/comments | 4 | 2018-09-23T09:31:43Z | 2019-05-20T18:18:29Z | https://github.com/weidai11/cryptopp/issues/717 | 362,927,899 | 717 |
[
"weidai11",
"cryptopp"
] | ### Crypto++ Issue Report
Such as the following:
My function definition:
const string Md5Encrypt(const string& plainText)
{
byte digest[CryptoPP::Weak::MD5::DIGESTSIZE];
CryptoPP::Weak::MD5 hash;
hash.CalculateDigest(digest, (const byte*)plainText.c_str(), plainText.length());
CryptoPP::HexEncoder encoder;
std::string output;
encoder.Attach(new CryptoPP::StringSink(output));
encoder.Put(digest, sizeof(digest));
encoder.MessageEnd();
return output;
}
Call:
string szTmp = "appid=wx06beb33e905f09c8&attach=支付测试&body=";
string szRlt = Md5Encrypt(szTmp);
Checking:
szRlt = "D5B5A14F65FCDE4870F30BC083C1ACD0"; //Incorrect
The corresponding result is "3BF429F6251ECA0BF826EE05EADC5CEE" //Correct
if szTmp = "appid=wx06beb33e905f09c8&attach=&body=",you can get the correct result "7E86EF6508967559A46ABA3A83EDFFB5".
So if I want to use this library to deal UNICODE CHARACTERS,what should I do? And how to modify this function?
Thanks a lot!
| Crypto++ cannot encrypt wide characters correctly,such as Chinese characters. | https://api.github.com/repos/weidai11/cryptopp/issues/716/comments | 1 | 2018-09-19T01:57:13Z | 2018-09-19T03:07:53Z | https://github.com/weidai11/cryptopp/issues/716 | 361,547,472 | 716 |
[
"weidai11",
"cryptopp"
] | When trying to update cryptopp on my Gentoo Linux system, I ran into the message that the certificate for www.cryptopp.com just expired, which prevented emerge from downloading the package.
Please renew your certificate ASAP! This should not happen at all with the website of a crypto library... | TLS Certificate of www.cryptopp.com expired - please renew! | https://api.github.com/repos/weidai11/cryptopp/issues/715/comments | 7 | 2018-09-17T10:15:50Z | 2019-06-07T03:35:30Z | https://github.com/weidai11/cryptopp/issues/715 | 360,802,498 | 715 |
[
"weidai11",
"cryptopp"
] | Crypto++ 6.0 changed `DefaultDecryptor` and `DefaultDecryptorWithMAC` to use modern algorithms. Also see [Issue 345](https://github.com/weidai11/cryptopp/issues/345).
At that time we also provided `LegacyDecryptor` and `LegacyDecryptorWithMAC` for folks who needed interop with the older algorithm. We botched the interop by using the new MAC (SHA256-based) instead of the old MAC (SHA1-based). Also see [Update DefaultEncryptor, DefaultEncryptorWithMAC and friends](https://groups.google.com/d/msg/cryptopp-users/epq6IjEKwLY/3Y0HY3y-BwAJ).
This ticket will track the change to `LegacyDecryptor` and `LegacyDecryptorWithMAC` for SHA1-based MACs.
| LegacyDecryptor and LegacyDecryptorWithMAC use wrong MAC | https://api.github.com/repos/weidai11/cryptopp/issues/714/comments | 3 | 2018-09-11T01:51:32Z | 2018-10-20T13:56:52Z | https://github.com/weidai11/cryptopp/issues/714 | 358,856,265 | 714 |
[
"weidai11",
"cryptopp"
] | Can't compile an application that uses Crypto++ in the most current version 7.0.
The compiler i use is mingw32, the development environment is eclipse ide for c/c++ developers version "photon release 4.8.0"
```
09:58:28 **** Build of configuration Release for project MACAddressToPiUserPassword ****
make all
Building file: ../indiv-build/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
Invoking: Cross G++ Compiler
g++ -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"indiv-build/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.d" -MT"indiv-build/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.o" -o "indiv-build/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.o" "../indiv-build/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp"
Finished building: ../indiv-build/CMakeFiles/3.6.2/CompilerIdCXX/CMakeCXXCompilerId.cpp
Building file: ../indiv-build/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c
Invoking: Cross GCC Compiler
gcc -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"indiv-build/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.d" -MT"indiv-build/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.o" -o "indiv-build/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.o" "../indiv-build/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c"
Finished building: ../indiv-build/CMakeFiles/3.6.2/CompilerIdC/CMakeCCompilerId.c
Building file: ../indiv-build/CMakeFiles/feature_tests.c
Invoking: Cross GCC Compiler
gcc -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"indiv-build/CMakeFiles/feature_tests.d" -MT"indiv-build/CMakeFiles/feature_tests.o" -o "indiv-build/CMakeFiles/feature_tests.o" "../indiv-build/CMakeFiles/feature_tests.c"
Finished building: ../indiv-build/CMakeFiles/feature_tests.c
Building file: ../include/crypto++/3way.cpp
Invoking: Cross G++ Compiler
g++ -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"include/crypto++/3way.d" -MT"include/crypto++/3way.o" -o "include/crypto++/3way.o" "../include/crypto++/3way.cpp"
Finished building: ../include/crypto++/3way.cpp
Building file: ../include/crypto++/adler32.cpp
Invoking: Cross G++ Compiler
g++ -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"include/crypto++/adler32.d" -MT"include/crypto++/adler32.o" -o "include/crypto++/adler32.o" "../include/crypto++/adler32.cpp"
Finished building: ../include/crypto++/adler32.cpp
Building file: ../include/crypto++/algebra.cpp
Invoking: Cross G++ Compiler
g++ -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"include/crypto++/algebra.d" -MT"include/crypto++/algebra.o" -o "include/crypto++/algebra.o" "../include/crypto++/algebra.cpp"
Finished building: ../include/crypto++/algebra.cpp
Building file: ../include/crypto++/algparam.cpp
Invoking: Cross G++ Compiler
g++ -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"include/crypto++/algparam.d" -MT"include/crypto++/algparam.o" -o "include/crypto++/algparam.o" "../include/crypto++/algparam.cpp"
Finished building: ../include/crypto++/algparam.cpp
Building file: ../include/crypto++/arc4.cpp
Invoking: Cross G++ Compiler
g++ -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"include/crypto++/arc4.d" -MT"include/crypto++/arc4.o" -o "include/crypto++/arc4.o" "../include/crypto++/arc4.cpp"
Finished building: ../include/crypto++/arc4.cpp
Building file: ../include/crypto++/aria-simd.cpp
Invoking: Cross G++ Compiler
g++ -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"include/crypto++/aria-simd.d" -MT"include/crypto++/aria-simd.o" -o "include/crypto++/aria-simd.o" "../include/crypto++/aria-simd.cpp"
../include/crypto++/aria-simd.cpp: In function 'void CryptoPP::ARIA_ProcessAndXorBlock_Xor_SSSE3(const byte*, CryptoPP::byte*, const byte*, CryptoPP::word32*)':
../include/crypto++/aria-simd.cpp:122:76: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi]
const __m128i MASK = _mm_set_epi8(12,13,14,15, 8,9,10,11, 4,5,6,7, 0,1,2,3);
^
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:714:1: error: inlining failed in call to always_inline 'void _mm_storeu_si128(__m128i*, __m128i)': target specific option mismatch
_mm_storeu_si128 (__m128i *__P, __m128i __B)
^~~~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:144:65: note: called from here
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));
^
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:1286:1: error: inlining failed in call to always_inline '__m128i _mm_xor_si128(__m128i, __m128i)': target specific option mismatch
_mm_xor_si128 (__m128i __A, __m128i __B)
^~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:142:18: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:696:1: error: inlining failed in call to always_inline '__m128i _mm_loadu_si128(const __m128i*)': target specific option mismatch
_mm_loadu_si128 (__m128i const *__P)
^~~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:142:18: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../include/crypto++/aria-simd.cpp:14:0:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:136:1: error: inlining failed in call to always_inline '__m128i _mm_shuffle_epi8(__m128i, __m128i)': target specific option mismatch
_mm_shuffle_epi8 (__m128i __X, __m128i __Y)
^~~~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:142:18: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:690:1: error: inlining failed in call to always_inline '__m128i _mm_load_si128(const __m128i*)': target specific option mismatch
_mm_load_si128 (__m128i const *__P)
^~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:142:18: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:611:1: error: inlining failed in call to always_inline '__m128i _mm_set_epi8(char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char)': target specific option mismatch
_mm_set_epi8 (char __q15, char __q14, char __q13, char __q12,
^~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:122:76: note: called from here
const __m128i MASK = _mm_set_epi8(12,13,14,15, 8,9,10,11, 4,5,6,7, 0,1,2,3);
^
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:714:1: error: inlining failed in call to always_inline 'void _mm_storeu_si128(__m128i*, __m128i)': target specific option mismatch
_mm_storeu_si128 (__m128i *__P, __m128i __B)
^~~~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:152:49: note: called from here
_mm_loadu_si128(CONST_M128_CAST(xorBlock))));
^
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:1286:1: error: inlining failed in call to always_inline '__m128i _mm_xor_si128(__m128i, __m128i)': target specific option mismatch
_mm_xor_si128 (__m128i __A, __m128i __B)
^~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:149:19: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(
~~~~~~~~~~~~~~
_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_loadu_si128(CONST_M128_CAST(xorBlock))));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:696:1: error: inlining failed in call to always_inline '__m128i _mm_loadu_si128(const __m128i*)': target specific option mismatch
_mm_loadu_si128 (__m128i const *__P)
^~~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:149:19: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(
~~~~~~~~~~~~~~
_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_loadu_si128(CONST_M128_CAST(xorBlock))));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:696:1: error: inlining failed in call to always_inline '__m128i _mm_loadu_si128(const __m128i*)': target specific option mismatch
_mm_loadu_si128 (__m128i const *__P)
^~~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:149:19: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(
~~~~~~~~~~~~~~
_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_loadu_si128(CONST_M128_CAST(xorBlock))));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:714:1: error: inlining failed in call to always_inline 'void _mm_storeu_si128(__m128i*, __m128i)': target specific option mismatch
_mm_storeu_si128 (__m128i *__P, __m128i __B)
^~~~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:144:65: note: called from here
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));
^
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:1286:1: error: inlining failed in call to always_inline '__m128i _mm_xor_si128(__m128i, __m128i)': target specific option mismatch
_mm_xor_si128 (__m128i __A, __m128i __B)
^~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:142:18: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:696:1: error: inlining failed in call to always_inline '__m128i _mm_loadu_si128(const __m128i*)': target specific option mismatch
_mm_loadu_si128 (__m128i const *__P)
^~~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:142:18: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../include/crypto++/aria-simd.cpp:14:0:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:136:1: error: inlining failed in call to always_inline '__m128i _mm_shuffle_epi8(__m128i, __m128i)': target specific option mismatch
_mm_shuffle_epi8 (__m128i __X, __m128i __Y)
^~~~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:142:18: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:690:1: error: inlining failed in call to always_inline '__m128i _mm_load_si128(const __m128i*)': target specific option mismatch
_mm_load_si128 (__m128i const *__P)
^~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:142:18: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:611:1: error: inlining failed in call to always_inline '__m128i _mm_set_epi8(char, char, char, char, char, char, char, char, char, char, char, char, char, char, char, char)': target specific option mismatch
_mm_set_epi8 (char __q15, char __q14, char __q13, char __q12,
^~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:122:76: note: called from here
const __m128i MASK = _mm_set_epi8(12,13,14,15, 8,9,10,11, 4,5,6,7, 0,1,2,3);
^
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:714:1: error: inlining failed in call to always_inline 'void _mm_storeu_si128(__m128i*, __m128i)': target specific option mismatch
_mm_storeu_si128 (__m128i *__P, __m128i __B)
^~~~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:144:65: note: called from here
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));
^
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:1286:1: error: inlining failed in call to always_inline '__m128i _mm_xor_si128(__m128i, __m128i)': target specific option mismatch
_mm_xor_si128 (__m128i __A, __m128i __B)
^~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:142:18: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:696:1: error: inlining failed in call to always_inline '__m128i _mm_loadu_si128(const __m128i*)': target specific option mismatch
_mm_loadu_si128 (__m128i const *__P)
^~~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:142:18: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../include/crypto++/aria-simd.cpp:14:0:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:136:1: error: inlining failed in call to always_inline '__m128i _mm_shuffle_epi8(__m128i, __m128i)': target specific option mismatch
_mm_shuffle_epi8 (__m128i __X, __m128i __Y)
^~~~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:142:18: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:690:1: error: inlining failed in call to always_inline '__m128i _mm_load_si128(const __m128i*)': target specific option mismatch
_mm_load_si128 (__m128i const *__P)
^~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:142:18: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_shuffle_epi8(_mm_load_si128(CONST_M128_CAST(rk)), MASK)));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:714:1: error: inlining failed in call to always_inline 'void _mm_storeu_si128(__m128i*, __m128i)': target specific option mismatch
_mm_storeu_si128 (__m128i *__P, __m128i __B)
^~~~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:152:49: note: called from here
_mm_loadu_si128(CONST_M128_CAST(xorBlock))));
^
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:1286:1: error: inlining failed in call to always_inline '__m128i _mm_xor_si128(__m128i, __m128i)': target specific option mismatch
_mm_xor_si128 (__m128i __A, __m128i __B)
^~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:149:19: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(
~~~~~~~~~~~~~~
_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_loadu_si128(CONST_M128_CAST(xorBlock))));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:696:1: error: inlining failed in call to always_inline '__m128i _mm_loadu_si128(const __m128i*)': target specific option mismatch
_mm_loadu_si128 (__m128i const *__P)
^~~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:149:19: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(
~~~~~~~~~~~~~~
_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_loadu_si128(CONST_M128_CAST(xorBlock))));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\pmmintrin.h:31:0,
from c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\tmmintrin.h:31,
from ../include/crypto++/aria-simd.cpp:14:
c:\development\compilers\c++\minigw\lib\gcc\mingw32\6.3.0\include\emmintrin.h:696:1: error: inlining failed in call to always_inline '__m128i _mm_loadu_si128(const __m128i*)': target specific option mismatch
_mm_loadu_si128 (__m128i const *__P)
^~~~~~~~~~~~~~~
../include/crypto++/aria-simd.cpp:149:19: note: called from here
_mm_storeu_si128(M128_CAST(outBlock),
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
_mm_xor_si128(
~~~~~~~~~~~~~~
_mm_loadu_si128(CONST_M128_CAST(outBlock)),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_mm_loadu_si128(CONST_M128_CAST(xorBlock))));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [include/crypto++/aria-simd.o] Error 1
09:58:43 Build Failed. 26 errors, 1 warnings. (took 15s.406ms)
```
Thank you for your feedbacks.
With best regards,
Jan | Can't compile program using CMake with Crypto++ 7.0 | https://api.github.com/repos/weidai11/cryptopp/issues/713/comments | 7 | 2018-08-28T08:01:49Z | 2018-10-20T11:35:46Z | https://github.com/weidai11/cryptopp/issues/713 | 354,615,318 | 713 |
[
"weidai11",
"cryptopp"
] | I have a project with disabled RTTI and I was planning to compute sha512 using cryptopp, and but it turned out that it uses typeid() in a few places.
After some investigation I have realized that these functions (which referencing typeid()) are not used when computing sha512, and the library can be compiled with MSVC on Windows (because templates are not instantiated) but not on Linux with GCC/Clang (godbolt: https://godbolt.org/z/Zqsau8).
Is there a way (without redefinition of typeid) to compile with RTTI switched off? May be it would be possiable to add ifdef guard to cut typeid related methods off? | Compiling without RTTI support | https://api.github.com/repos/weidai11/cryptopp/issues/712/comments | 4 | 2018-08-25T10:07:38Z | 2018-08-26T01:43:01Z | https://github.com/weidai11/cryptopp/issues/712 | 354,001,056 | 712 |
[
"weidai11",
"cryptopp"
] | ### Crypto++ Issue Report
I use ndkbuild to build Crypto++ 6.1.0 and Crypto++ 7.0.0 to a static lib, but both of them failed, the error is '_mm_crc32_u8' requires target feature 'sse4.1', but would be inlined into function 'CRC32C_Update_SSE42' that is compiled without support for 'sse4.1', and I have uploaded Android.mk and Application.mk.[mks.zip](https://github.com/weidai11/cryptopp/files/2320429/mks.zip), the detail build log is
[ndkbuild.txt](https://github.com/weidai11/cryptopp/files/2320435/ndkbuild.txt)
**The detail information is:**
* macOS High Sierra, 10.13.2(71c88)
* cpu:
machdep.cpu.brand_string: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX EST TM2 SSSE3 CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC POPCNT AES PCID XSAVE OSXSAVE TSCTMR AVX1.0 RDRAND F16C
* Crypto++ 6.1.0 and Crypto++ 7.0.0
* Use ndkbuild, Android.mk and Application.mk
* ndk version is r16b, GNU Make 3.81
* Error message is:
/Users/mikeyu/work/projects/vega/source/yecha/client/frameworks/runtime-src/Classes/thirdparty/pre/jni/cryptopp700/crc-simd.cpp:148:13: error: always_inline function '_mm_crc32_u8' requires target feature 'sse4.1', but would be inlined into
function 'CRC32C_Update_SSE42' that is compiled without support for 'sse4.1'
c = _mm_crc32_u8(c, *s);
^
/Users/mikeyu/work/projects/vega/source/yecha/client/frameworks/runtime-src/Classes/thirdparty/pre/jni/cryptopp700/crc-simd.cpp:151:13: error: always_inline function '_mm_crc32_u32' requires target feature 'sse4.1', but would be inlined
into function 'CRC32C_Update_SSE42' that is compiled without support for 'sse4.1'
c = _mm_crc32_u32(c, *(const word32 *)(void*)s);
^
/Users/mikeyu/work/projects/vega/source/yecha/client/frameworks/runtime-src/Classes/thirdparty/pre/jni/cryptopp700/crc-simd.cpp:154:13: error: always_inline function '_mm_crc32_u8' requires target feature 'sse4.1', but would be inlined into
function 'CRC32C_Update_SSE42' that is compiled without support for 'sse4.1'
c = _mm_crc32_u8(c, *s);
^
3 errors generated.
make: *** [/Users/mikeyu/work/projects/vega/source/yecha/client/frameworks/runtime-src/Classes/thirdparty/pre/obj/local/x86/objs/cryptopp_static/cryptopp700/crc-simd.o] Error 1
| Android x86 build failed due to _mm_crc32_u8 requires sse4.1 | https://api.github.com/repos/weidai11/cryptopp/issues/711/comments | 6 | 2018-08-25T07:40:55Z | 2018-08-26T21:05:48Z | https://github.com/weidai11/cryptopp/issues/711 | 353,992,410 | 711 |
[
"weidai11",
"cryptopp"
] | The `Singleton` classes have two uses in the library. First they provide thread safe initialization on older platforms like WIndows XP or Linux prior to C++11 and N2660. Second they conserve resources by not allocating memory or building tables (etc). `Singletons` also have their downsides and that's what we want to address here.
We have some uses of `Singleton` class that we can migrate away from on some platforms. The platforms which allow migration include Linux with `init_priority`, Windows with `init_seg` and C++11 with [Dynamic Initialization and Destruction with Concurrency](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm).
We want to move away from `Singleton` because it uses a Create on First Use pattern. It is a dumb Nifty Counter that does not free its memory. Most programs don't suffer the the issues created by Singleton but there are two instances where it can cause a fair amount of trouble. First is leak detection tools. Second is a native DLL used in languages like Java and .Net. Java or .Net will load and unload the DLL hundreds or thousands of times so the resource leak could lead to memory exhaustion for long running processes.
Here are the places we are detecting use of the `Singleton`. `Integer` class was removed from the list because we are already addressing the issues:
```
$ grep Singleton *.cpp
ec2n.cpp: return Singleton<Point>().Ref();
ecp.cpp: return Singleton<Point>().Ref();
gf2n.cpp: return Singleton<PolynomialMod2>().Ref();
gf2n.cpp: return Singleton<PolynomialMod2, NewPolynomialMod2<1> >().Ref();
nbtheory.cpp: const std::vector<word16> &primeTable = Singleton<std::vector<word16>, NewPrimeTable>().Ref();
nbtheory.cpp: else if (p <= Singleton<Integer, NewLastSmallPrimeSquared>().Ref())
osrng.cpp: const MicrosoftCryptoProvider &hProvider = Singleton<MicrosoftCryptoProvider>().Ref();
polynomi.cpp: return Singleton<ThisType>().Ref();
polynomi.cpp: return Singleton<ThisType, NewOnePolynomial>().Ref();
xtr.cpp: return Singleton<GFP2Element>().Ref();
```
There are several classes in header files that use the `Singleton`. Due to the plumbing they are going to be trickier to migrate away from (assuming we can migrate for these cases). | Move away from Singleton when possible | https://api.github.com/repos/weidai11/cryptopp/issues/708/comments | 0 | 2018-08-22T19:20:56Z | 2018-09-05T23:08:04Z | https://github.com/weidai11/cryptopp/issues/708 | 353,089,170 | 708 |
[
"weidai11",
"cryptopp"
] | I'm seeing this exception on Linux and Solaris with newer GCC's. It happens on Linux with `-DCRYPTOPP_INIT_PRIORITY=0`, and it happens on Solaris 11 Sparc with GCC 7. Solaris does not have init priorities so we always use the `std::call_once` pattern when C++11 is available.
The reason we are seeing an exception in `PKCS12_PBKDF` is, it creates an `Integer` to help increment the buffer (IIRC).
-----
Here is the relevant code for [`InitializeInteger`](https://github.com/weidai11/cryptopp/blob/master/integer.cpp#L102). `SetFunctionPointers` just assigns a few function pointers for addition, subtraction, etc.
```
static void SetFunctionPointers();
InitializeInteger::InitializeInteger()
{
#if defined(CRYPTOPP_CXX11_SYNCHRONIZATION) && defined(CRYPTOPP_CXX11_DYNAMIC_INIT)
static std::once_flag s_flag;
std::call_once(s_flag, []() {
SetFunctionPointers();
});
#else
static bool s_flag;
MEMORY_BARRIER();
if (s_flag == false)
{
SetFunctionPointers();
s_flag = true;
MEMORY_BARRIER();
}
#endif // C++11 or C++03 flag
}
```
-----
```
$ CXXFLAGS="-DNDEBUG -g2 -O0 -DCRYPTOPP_INIT_PRIORITY=0" make -j 4
...
$ gdb cryptest.exe
(gdb) catch throw
(gdb) r v
...
PKCS #12 PBKDF validation suite running...
Catchpoint 1 (exception thrown), 0x00007ffff7ad7181 in __cxxabiv1::__cxa_throw
(obj=obj@entry=0xcc1260,
tinfo=tinfo@entry=0x7ffff7dc9ae0 <typeinfo for std::system_error>,
dest=dest@entry=0x7ffff7b03280 <std::system_error::~system_error()>)
at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:78
78 in ../../../../libstdc++-v3/libsupc++/eh_throw.cc
(gdb) bt full
#0 0x00007ffff7ad7181 in __cxxabiv1::__cxa_throw (obj=obj@entry=0xcc1260,
tinfo=tinfo@entry=0x7ffff7dc9ae0 <typeinfo for std::system_error>,
dest=dest@entry=0x7ffff7b03280 <std::system_error::~system_error()>)
at ../../../../libstdc++-v3/libsupc++/eh_throw.cc:78
globals = <optimized out>
header = <optimized out>
#1 0x00007ffff7ad2c2d in std::__throw_system_error (__i=0xffffffff)
from /lib64/libstdc++.so.6
No locals.
#2 0x00000000005b877d in std::call_once<CryptoPP::InitializeInteger::InitializeInteger()::<lambda()> >(std::once_flag &, CryptoPP::InitializeInteger::<lambda()> &&) (__once=..., __f=...) at /usr/include/c++/8/mutex:698
__callable = {__(float) = @0x7fffffffbc9f}
__e = 0xffffffff
#3 0x000000000059c709 in CryptoPP::InitializeInteger::InitializeInteger (
this=0x7fffffffbd50) at integer.cpp:111
s_flag = {_M_once = 0x0}
#4 0x00000000005affde in CryptoPP::Integer::Integer (this=0x7fffffffbd50,
encodedInteger=0xcc1140 "\212\252\346){l\260FB\253[\axQ(N\267\022\217\032\212\252\346){l\260FB\253[\axQ(N\267\022\217\032\212\252\346){l\260FB\253[\axQ(N\267\022\217\032\212\252\346)", byteCount=0x40, s=CryptoPP::Integer::UNSIGNED,
o=CryptoPP::BIG_ENDIAN_ORDER) at integer.cpp:3015
block = <optimized out>
...
``` | Exception when using InitializeInteger with std::call_once | https://api.github.com/repos/weidai11/cryptopp/issues/707/comments | 1 | 2018-08-21T05:50:26Z | 2018-08-21T16:55:28Z | https://github.com/weidai11/cryptopp/issues/707 | 352,394,265 | 707 |
[
"weidai11",
"cryptopp"
] | Download PEM pack from [wiki](https://www.cryptopp.com/wiki/Pem_pack).
but it is missing support for PKCS#8 private key, which begin with `-----BEGIN PRIVATE KEY-----`.
I looked the source then found:
```
PEM_Type PEM_GetType(const SecByteBlock& sb)
{
SecByteBlock::const_iterator it;
it = Search(sb, SBB_PUBLIC_BEGIN);
if(it != sb.end())
return PEM_PUBLIC_KEY;
/* missing branch of SBB_PRIVATE_BEGIN here */
// RSA key types
it = Search(sb, SBB_RSA_PUBLIC_BEGIN);
if(it != sb.end())
return PEM_RSA_PUBLIC_KEY;
......
``` | PEM Pack missing support for PKCS#8 Private Key | https://api.github.com/repos/weidai11/cryptopp/issues/706/comments | 5 | 2018-08-20T01:26:47Z | 2018-08-30T08:39:21Z | https://github.com/weidai11/cryptopp/issues/706 | 351,955,751 | 706 |
[
"weidai11",
"cryptopp"
] | Two identical warnings in VS 2017 while compiling the library.
```
Severity Code Description Project File Line
Warning C4456 declaration of 'block' hides previous local declaration cryptlib cryptopp\aria.cpp 151
Warning C4456 declaration of 'block' hides previous local declaration cryptlib cryptopp\aria.cpp 156
```
For a fix, renaming `block` in lines 141 and 142 might be slightly cheaper compared to changing in two diagnosed location (4 lines to change). | Redefinition wanings in aria.cpp | https://api.github.com/repos/weidai11/cryptopp/issues/702/comments | 1 | 2018-08-16T11:10:05Z | 2018-08-17T00:29:14Z | https://github.com/weidai11/cryptopp/issues/702 | 351,158,952 | 702 |
[
"weidai11",
"cryptopp"
] | Any plans about Shabal implementation? | Will be Shabal hash function available? | https://api.github.com/repos/weidai11/cryptopp/issues/701/comments | 2 | 2018-08-15T11:37:41Z | 2018-08-17T04:16:56Z | https://github.com/weidai11/cryptopp/issues/701 | 350,778,141 | 701 |
[
"weidai11",
"cryptopp"
] | Plain text is ugly.
Markdown is aesthetics. | Could you convert Readme to markdown? | https://api.github.com/repos/weidai11/cryptopp/issues/700/comments | 1 | 2018-08-11T21:36:18Z | 2018-08-18T12:26:24Z | https://github.com/weidai11/cryptopp/issues/700 | 349,765,424 | 700 |
[
"weidai11",
"cryptopp"
] | Currently, ECDSA output is a concatenation of (r, s) integers padded to the length of the underlying field, as per P1363 / FIPS 186-4, however ANSI x9.62 specifies the ASN.1 encoding of the ECDSA signature as:
```
ECDSA-Sig-Value ::= SEQUENCE {
r INTEGER,
s INTEGER
}
```
It would be nice if there was a way to get ECDSA signatures in this format(its DER encoding) from Crypto++, as it is common in many libraries:
- OpenSSL
- BouncyCastle
- Botan
- LibTomCrypt
| Support DER ECDSA signature output as per ANSI X9.62 | https://api.github.com/repos/weidai11/cryptopp/issues/699/comments | 2 | 2018-08-10T15:50:31Z | 2018-08-12T00:54:16Z | https://github.com/weidai11/cryptopp/issues/699 | 349,567,684 | 699 |
[
"weidai11",
"cryptopp"
] | Power8 provides carryless multiplies using `vpmsum`. This issue will track the addition of GCM mode for Power8.
The cut-in is occurring in stages. We beefed up the validation tests to cover Altivec loads, stores, shifts and rotates. We beefed up the runtime feature testing using probes.
We rough cut-in the mode but left it disabled at the moment. `GCM_SetKeyWithoutResync_VMULL`, `GCM_Multiply_VMULL` and `GCM_Reduce_VMULL` work as expected on Linux (ppc64-le) and AIX (ppc64-be). Next is `GCM_AuthenticateBlocks_VMULL`, which is the final programmatic piece. Finally GCC and XLC benchmarks are required. | Add Power8 GCM mode | https://api.github.com/repos/weidai11/cryptopp/issues/698/comments | 1 | 2018-08-09T12:06:06Z | 2018-08-11T03:31:16Z | https://github.com/weidai11/cryptopp/issues/698 | 349,098,983 | 698 |
[
"weidai11",
"cryptopp"
] | Thanks for your hard work on this library!
ChaCha20-Poly1305 is a modern, high-performance cipher working in AEAD mode.
I've noticed that cryptopp has support for original chacha20 only.
Would you implement the original ChaCha20-Poly1305([link])?
[link]: https://download.libsodium.org/doc/secret-key_cryptography/original_chacha20-poly1305_construction.html | ChaCha20-Poly1305 support | https://api.github.com/repos/weidai11/cryptopp/issues/697/comments | 1 | 2018-08-07T03:33:07Z | 2018-08-18T08:53:53Z | https://github.com/weidai11/cryptopp/issues/697 | 348,154,265 | 697 |
[
"weidai11",
"cryptopp"
] | It saddens me to see this:
```
$ CXX=xlC make rijndael-simd.o
xlC -DNDEBUG -g2 -O3 -qrtti -qpic -qarch=pwr8 -qaltivec -c rijndael-simd.cpp
In file included from rijndael-simd.cpp:29:
./ppc-simd.h:443:16: error: use of undeclared identifier
'__builtin_crypto_vcipher'; did you mean '__builtin_vec_vcipher'?
return (T1)__builtin_crypto_vcipher((uint64x2_p)state, (uint64x2_p)key);
```
IBM XL C/C++ is avoiding the code guarded with `defined(__xlc__) || defined(__xlC__)`, and falling into code guarded with `defined(__GNUC__)`:
```
template <class T1, class T2>
inline T1 VectorEncrypt(const T1& state, const T2& key)
{
#if defined(__xlc__) || defined(__xlC__)
return (T1)__vcipher((uint8x16_p)state, (uint8x16_p)key);
#elif defined(__GNUC__)
return (T1)__builtin_crypto_vcipher((uint64x2_p)state, (uint64x2_p)key);
#else
_ASSERT(0);
#endif
}
```
It reeks of LLVM stupidity and tricks, and sure enough:
```
[noloader@gcc2-power8 cryptopp]$ cp adhoc.cpp.proto adhoc.cpp
[noloader@gcc2-power8 cryptopp]$ xlc -qshowmacros -qarch=pwr8 -qaltivec -E adhoc.cpp | egrep -i -E 'xlc|clang|llvm|gnuc'
#define __GNUC_GNU_INLINE__ 1
#define __GNUC_MINOR__ 2
#define __GNUC_PATCHLEVEL__ 1
#define __GNUC_VA_LIST 1
#define __GNUC__ 4
#define __XLC_BUILTIN_VAARG__ 1
#define __clang__ 1
#define __clang_major__ 4
#define __clang_minor__ 0
#define __clang_patchlevel__ 1
#define __clang_version__ "4.0.1 (tags/RELEASE_401/final)"
#define __llvm__ 1
```
LLVM has screwed us on every major platform we support except AIX and Solaris. About all I can say is, fuck LLVM and their stupid tricks. | Linux POWER8/ppc64-le compile failures on GCC112 | https://api.github.com/repos/weidai11/cryptopp/issues/695/comments | 1 | 2018-07-31T02:00:17Z | 2018-08-01T15:59:26Z | https://github.com/weidai11/cryptopp/issues/695 | 346,007,086 | 695 |
[
"weidai11",
"cryptopp"
] | Sun Studio 12.1 though 12.4 (SunCC 5.10 through 5.13) fail its self tests. Sun Studio 12.5 and 12.6 appear OK.
The problem appears to be related to the code generated for AES using intrinsics.
The library will disable AES-NI intrinsics for the affected versions. | Solaris, SunCC and failed AES self tests | https://api.github.com/repos/weidai11/cryptopp/issues/694/comments | 1 | 2018-07-28T00:49:59Z | 2018-07-28T00:52:04Z | https://github.com/weidai11/cryptopp/issues/694 | 345,402,819 | 694 |
[
"weidai11",
"cryptopp"
] | https://github.com/weidai11/cryptopp/blob/5ea410c1d33e4201c24e52b343110b90a3d9f85e/sha.cpp#L1189
| 'D': unreferenced local variable (VS 2017) | https://api.github.com/repos/weidai11/cryptopp/issues/693/comments | 1 | 2018-07-27T07:37:16Z | 2018-07-29T03:46:01Z | https://github.com/weidai11/cryptopp/issues/693 | 345,122,432 | 693 |
[
"weidai11",
"cryptopp"
] | Not sure I'd really call this a direct issue. However with the NuGet version stuck on 5.6.5.4 stable, I think it's safe to say that other issue corrections and enhancements between then and the current version are not there. ( Two NuGet links: One credited to Scott Lee (cryptopp), and one by Dmitry Katkevich (cryptopp.v140.windesktop.dyn.rt-static). Both link here for License, Project URL, and Report Abuse links.)
To be honest this may not even belong here. (if not please forward to the right people and go ahead and close this ticket.) | NuGet: Package is out of date. Current newest available version is 5.6.5.4 | https://api.github.com/repos/weidai11/cryptopp/issues/692/comments | 2 | 2018-07-26T14:45:44Z | 2018-09-05T23:08:20Z | https://github.com/weidai11/cryptopp/issues/692 | 344,875,666 | 692 |
[
"weidai11",
"cryptopp"
] | We recently received access to the [OpenCSW compile farm](https://www.opencsw.org/extend-it/signup/to-upstream-maintainers/). The farm provides access to Solaris 9 through 11 on x86 and Sparc hardware. The machines make both GCC and SunCC available.
The `cryptest.exe` test program experienced a string of SIGBUS crashes. We kind of expected some trouble due to [Issue 403](https://github.com/weidai11/cryptopp/issues/403). First it was SHA-384 ([Issue 689](https://github.com/weidai11/cryptopp/issues/689)), and then it was Tiger ([Issue 690](https://github.com/weidai11/cryptopp/issues/690)). Once Tiger was cleared VMAC crashed with a SIGBUS. It became obvious these were not one-offs.
We added code at [Commit 0c0b68a4a28b](https://github.com/weidai11/cryptopp/commit/0c0b68a4a28b) to align the buffers in `IteratedHashBase::HashMultipleBlocks()` which should have avoided the SIGBUS:
```
if (noReverse)
{
if (IsAligned<HashWordType>(input))
{
// Sparc bus error with non-aligned input.
this->HashEndianCorrectedBlock(input);
}
else
{
std::memcpy(dataBuf, input, blockSize);
this->HashEndianCorrectedBlock(dataBuf);
}
}
else
{
if (IsAligned<HashWordType>(input))
{
// Sparc bus error with non-aligned input.
ByteReverse(dataBuf, input, blockSize);
this->HashEndianCorrectedBlock(dataBuf);
}
else
{
std::memcpy(dataBuf, input, blockSize);
ByteReverse(dataBuf, dataBuf, blockSize);
this->HashEndianCorrectedBlock(dataBuf);
}
}
```
We were still catching SIGBUSes after the change. Eventually the issue was tracked back to `IsAligned<HashWordType>()`, which uses `GetAlignmentOf()`. Notice there is no path for the SunCC compiler.
```
template <class T>
inline unsigned int GetAlignmentOf()
{
#if defined(CRYPTOPP_CXX11_ALIGNOF)
return alignof(T);
#elif (_MSC_VER >= 1300)
return __alignof(T);
#elif defined(__GNUC__)
return __alignof__(T);
#elif CRYPTOPP_BOOL_SLOW_WORD64
return UnsignedMin(4U, sizeof(T));
#else
# if __BIGGEST_ALIGNMENT__
if (__BIGGEST_ALIGNMENT__ < sizeof(T))
return __BIGGEST_ALIGNMENT__;
else
# endif
return sizeof(T);
#endif
}
```
With SunCC we landed in the `UnsignedMin(4U, sizeof(T))` code path. Things worked fine with `-xmemalign=4i` but failed without it because alignment requirements of `word64` is 8 *without* `-xmemalign`. Lack of `-xmemalign` is a good thing and means SunCC will generate a super-fast `ldx` machine instruction to load a 64-bit word (but it requires a 8-byte aligned load address).
The fix was simple. Add another code path for SunCC. The addition below was tested on the compile farm back to SunCC 5.8 on Solaris 9:
```
#elif defined(__GNUC__)
return __alignof__(T);
#elif defined(__SUNPRO_CC)
return __alignof__(T);
``` | GetAlignmentOf returns 4 on Sparc when T=word64 | https://api.github.com/repos/weidai11/cryptopp/issues/691/comments | 1 | 2018-07-21T11:53:51Z | 2020-05-05T19:30:51Z | https://github.com/weidai11/cryptopp/issues/691 | 343,321,392 | 691 |
[
"weidai11",
"cryptopp"
] | Compiling with Sun Studio 12.3 is leading to a crash on Solaris 11 on Sparc:
```
$ CXX=/opt/solarisstudio12.3/bin/CC CXXFLAGS="-DNDEBUG -g -O2" make -j 8
...
$ ./cryptest.exe
...
Tiger validation suite running...
passed 3293ac630c13f0245f92bbb1766e16167a4e58492dde73f3 ""
passed 2aab1484e8c158f2bfb8c5ff41b57a525129131c957b5f93 "abc"
passed dd00230799f5009fec6debc838bb6a27df2b9d6f110c7937 "Tiger"
passed f71c8583902afb879edfe610f82c0d4786a3a534504486b5 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-"
Bus Error (core dumped)
```
Building everything with `-xmemalign-4i` and the program is OK. `rm tiger.o` followed by a `tiger.cpp` rebuild without the flag is OK. A `rm iterhash.o tiger.o` followed by a rebuild without the flag is *bad*.
It seems `iterhash.cpp` is [incorrectly] handling unaligned data. It is also worth mention Tiger uses `word64`.
Now, the problem is, `gdb` does not really work so we have not been able to run it under the debugger and learn something useful. Sigh... I guess we have to try the native `dbx` debugger next.
-----
And here we have it:
```
(dbx) run v
...
Tiger validation suite running...
passed 3293ac630c13f0245f92bbb1766e16167a4e58492dde73f3 ""
passed 2aab1484e8c158f2bfb8c5ff41b57a525129131c957b5f93 "abc"
passed dd00230799f5009fec6debc838bb6a27df2b9d6f110c7937 "Tiger"
passed f71c8583902afb879edfe610f82c0d4786a3a534504486b5 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-"
signal BUS (invalid address alignment) in CryptoPP::ByteReverse<unsigned long> at line 2074 in file "misc.h"
2074 out[i] = ByteReverse(in[i]);^M
(dbx)
``` | Solaris 11 and Sparc crash in Tiger | https://api.github.com/repos/weidai11/cryptopp/issues/690/comments | 1 | 2018-07-20T23:45:32Z | 2018-07-21T00:24:28Z | https://github.com/weidai11/cryptopp/issues/690 | 343,276,451 | 690 |
[
"weidai11",
"cryptopp"
] | [OpenCSW](https://www.opencsw.org/extend-it/signup/to-upstream-maintainers/) provided access to their compile farm. OpenCSW is to Solaris like MacPorts and Brew are to OS X.
On the Solaris 11/Sparc machine we are catching a crash in SHA384. I believe Andrew Marlow first reported it. At the time we could not get our hands on hardware to fully test things. Instead we were using `-xmemalign=4i` option as a band-aide to avoid running afoul of the Sparc instruction that moves 64-bits of data in one shot.
Also see [Issue 403](http://github.com/weidai11/cryptopp/issues/403). | Solaris 11 and Sparc crash in SHA384 | https://api.github.com/repos/weidai11/cryptopp/issues/689/comments | 1 | 2018-07-20T17:01:24Z | 2018-07-21T14:32:21Z | https://github.com/weidai11/cryptopp/issues/689 | 343,180,479 | 689 |
[
"weidai11",
"cryptopp"
] | windows 10
Crypto++ 5.6.5 is success, Crypto++ 7.0.0 fail
cmake
use staic lib
1. create rsa pri pub key(use file mode or buffer mode) success.
2. load from file is success, load from buffer is error(is copy the file content to string it will be success).
3. m_priDecode.AccessMaterial().Load(filter); must be error in check version(asn.cpp:574)
asnTag is not 0x2(asn.cpp:497)
code like follow:
void CSCBasicRSA::GenerateRSAKey(unsigned int keyLength, string& strPub, string& strPri){
CryptoPP::RSAES_OAEP_SHA_Decryptor priv(m_rng, keyLength);
CryptoPP::HexEncoder privFile(new CryptoPP::StringSink(strPri));
priv.AccessMaterial().Save(privFile);
privFile.MessageEnd();
CryptoPP::RSAES_OAEP_SHA_Encryptor pub(priv);
CryptoPP::HexEncoder pubFile(new CryptoPP::StringSink(strPub));
pub.AccessMaterial().Save(pubFile);
pubFile.MessageEnd();
}
void CSCBasicRSA::SetPrivateFileName(const char* pPrivateFileName){
CryptoPP::FileSource source(pPrivateFileName, true, new CryptoPP::HexDecoder);
CryptoPP::Filter& filter = source;
m_priDecode.AccessMaterial().Load(filter);
}
| create rsa key in buffer load not success(5.6.5 is success use DERDecode) | https://api.github.com/repos/weidai11/cryptopp/issues/688/comments | 1 | 2018-07-20T10:01:00Z | 2018-07-20T10:07:37Z | https://github.com/weidai11/cryptopp/issues/688 | 343,047,542 | 688 |
[
"weidai11",
"cryptopp"
] | https://github.com/weidai11/cryptopp/blob/28e20d6e5f920e48688c71456f9392a4a5f78135/sha.cpp#L963
```
#if CRYPTOPP_SSE2_ASM_AVAILABLE && (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32)
CRYPTOPP_NAKED void CRYPTOPP_FASTCALL SHA512_HashBlock_SSE2(word64 *state, const word64 *data)
```
looks like it's mostly for 32-bit mode, but it's also used for x86-64 x32.
`push rbx` is not safe in 64-bit mode: you clobber the red-zone without telling the compiler, potentially breaking things if this inlines into a function with any locals, or even without optimization if this functions spills its args. (https://stackoverflow.com/questions/34520013/using-base-pointer-register-in-c-inline-asm)
Better to simply declare a clobber on ebx and ask for the input you want in `"b"` instead of `"a"`, and avoid a useless `mov`. (gcc4.9 and earlier don't support EBX as an operand with `-m32 -fPIC`, but gcc5 has no problem: https://godbolt.org/g/Ddzp1o).
--------
`AS2( lea ebx, SHA512_K)` This line only runs for MSVC 32-bit mode, so it can't use RIP-relative addressing. LEA is pointless, use `mov ebx, OFFSET SHA512_K` to save a byte.
Inside `#if CRYPTOPP_BOOL_X32`, you should use RSP instead of ESP. RSP is always correctly zero-extended, so you can save the address-size prefix. You could probably hack around that with a `#define` for ESP, and maybe another like EDI_PTR or something that expands to EDI for 32-bit mode, or RDI for 64-bit mode. x32 is unpopular enough that you can kind of justify emitting worse machine code for it just to gain some source convenience, though, when it's just 1 extra byte in a few places with no performance penalty other than code-size.
More importantly, MMX looks pointless here. x32 has 64-bit integer registers, and plenty of them. It also has 16 XMM registers.
MMX `paddq` will hurt a lot on Bulldozer-family vs. integer `add` (because each pair of cores shares one SIMD unit), and maybe hurt slightly on most Intel where `add` runs on more ports. The extra `movq2dq` instructions don't help either.
```
AS2( movdq2q mm0, xmm0)
AS2( movhlps xmm1, xmm0)
AS2( paddq mm0, [ebx+eax*8])
AS2( movlps [esi], xmm0)
AS2( movlps [esi+8], xmm1)
AS2( movlps [esi+8*16], xmm0)
AS2( movlps [esi+8*17], xmm1)
```
This is weird; is it optimized to avoid 16-byte unaligned stores or something? On modern HW, `movups` will be better. On Nehalem and newer, `movhps [esi+8], xmm0` is a single uop (but a single `movups` is probably still better even on a cache-line split, on CPUs where its single-uop).
`movhps`-stores are 2 uops (including a shuffle) on Core2, Bulldozer-family, and Ryzen, though. So probably just `movups` unless you *really* care about Core2 / K8 where that's slower even if the address is aligned.
----
As I [commented on the recent commit](https://github.com/weidai11/cryptopp/commit/28e20d6e5f92#commitcomment-29709347), don't define a function inside another function. Define it separately, e.g. with an `asm()` statement at global scope. | SHA512_HashBlock_SSE2 inefficient (and potentially buggy) asm for x32. MMX is unnecessary. | https://api.github.com/repos/weidai11/cryptopp/issues/686/comments | 5 | 2018-07-14T13:47:44Z | 2018-08-19T23:09:12Z | https://github.com/weidai11/cryptopp/issues/686 | 341,237,747 | 686 |
[
"weidai11",
"cryptopp"
] | ARMv8.4 adds cpu support for SHA512, SHA3, SM3 and SM4. This ticket will track the changes to the CPU gear to support ARMv8.4. SHA512, SHA3, SM3 and SM4 will be added under different tickets. | Add ARMv8.4 cpu feature detection support | https://api.github.com/repos/weidai11/cryptopp/issues/685/comments | 0 | 2018-07-14T12:12:24Z | 2018-07-14T12:12:24Z | https://github.com/weidai11/cryptopp/issues/685 | 341,232,124 | 685 |
[
"weidai11",
"cryptopp"
] | This cropped up recently after Ubuntu updates or a dist-upgrade. I am only seeing it on 32-bit machines, however:
```
$ make
...
g++ -DNDEBUG -g2 -O3 -pthread -pipe -c sha.cpp
sha.cpp: Assembler messages:
sha.cpp:1155: Error: symbol `SHA512_Round' is already defined
sha.cpp:1155: Error: symbol `SHA512_Round' is already defined
```
-----
```
$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.10) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.4 LTS
Release: 16.04
Codename: xenial
``` | GCC 5.4 and "Error: symbol SHA512_Round is already defined" | https://api.github.com/repos/weidai11/cryptopp/issues/684/comments | 1 | 2018-07-13T21:02:38Z | 2018-07-13T21:24:35Z | https://github.com/weidai11/cryptopp/issues/684 | 341,158,833 | 684 |
[
"weidai11",
"cryptopp"
] | Add ARM AES asm implementation from Cryptogams.
Cryptogams is Andy Polyakov's project used to create high speed crypto algorithms and share them with other developers. Cryptogams has a dual license. First is the OpenSSL license because Andy contributes to OpenSSL. Second is a BSD license for those who want a more permissive license.
The integration instructions are documented at [Cryptogams AES](https://wiki.openssl.org/index.php/Cryptogams_AES) on the OpenSSL wiki. | Add ARM AES asm implementation from Cryptogams | https://api.github.com/repos/weidai11/cryptopp/issues/683/comments | 2 | 2018-07-11T10:56:58Z | 2022-02-14T16:05:59Z | https://github.com/weidai11/cryptopp/issues/683 | 340,192,114 | 683 |
[
"weidai11",
"cryptopp"
] | The library is carrying around vestiges for `CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS`. It is an option in `config.h`. The option was used when the library focused on x86, and before GCC got aggressive about optimizations and vectorizations.
Modern compilers, alignment requirements and punning rules have mostly killed-off the patterns involved with unaligned data access. For example, the pattern below will usually run fine on x86_64 but sporadically fail on other platforms (it also fails on x86_64, but most (all?) of them have been cleared).
```
void Xor(byte* x, const byte* y)
{
*(word64*)x ^= *(word64*)y;
}
```
Unaligned data accesses have been disabled for the last several releases without incident. The problems occur when `CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS` is in effect.
Also see [Crash on Cygwin i386 with -O3](https://groups.google.com/d/msg/cryptopp-users/AUKPXDduHww/lk0AE9fAVKcJ) on the Crypto++ mailing list. | Remove CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS support | https://api.github.com/repos/weidai11/cryptopp/issues/682/comments | 1 | 2018-07-09T08:36:11Z | 2018-10-09T06:57:35Z | https://github.com/weidai11/cryptopp/issues/682 | 339,354,422 | 682 |
[
"weidai11",
"cryptopp"
] | Add HC-256 stream cipher. | Add HC-256 stream cipher | https://api.github.com/repos/weidai11/cryptopp/issues/680/comments | 1 | 2018-07-05T10:11:22Z | 2018-07-05T10:59:30Z | https://github.com/weidai11/cryptopp/issues/680 | 338,510,779 | 680 |
[
"weidai11",
"cryptopp"
] | Add HC-128 stream cipher | Add HC-128 stream cipher | https://api.github.com/repos/weidai11/cryptopp/issues/679/comments | 1 | 2018-07-05T04:26:40Z | 2018-07-05T04:47:57Z | https://github.com/weidai11/cryptopp/issues/679 | 338,423,505 | 679 |
[
"weidai11",
"cryptopp"
] | Add Rabbit stream cipher. | Add Rabbit stream cipher | https://api.github.com/repos/weidai11/cryptopp/issues/678/comments | 1 | 2018-07-04T07:00:14Z | 2018-07-05T12:42:55Z | https://github.com/weidai11/cryptopp/issues/678 | 338,152,232 | 678 |
[
"weidai11",
"cryptopp"
] | We are experiencing a failed self test using Clang 5.0/6.0 for CHAM-64/ECB at -O1 on Intel platforms. The Intel platforms engage SSSE3 instructions. Clang at other optimization levels is OK. Other compilers are OK.
Here is how to reproduce with the library. We have not been able to reduce it to a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) for Clang. We attempted to clear it two times with no joy. First, [Commit 1be58db82868](https://github.com/weidai11/cryptopp/commit/1be58db82868), which avoids some casts that are typically present in SSE code. Second, [Commit 810f5c185991](https://github.com/weidai11/cryptopp/commit/810f5c185991), which avoids casting among types.
In the output below, notice the *"incorrectly decrypted"*. That means the encryptor worked fine because encryption is the first test performed on the data. The problem is in the decryptor.
```
$ make distclean
$ CXX=clang++ CXXFLAGS="-g2 -O1" make -j 5
$ ./cryptest.exe tv cham
Using seed: 1530401073
Testing SymmetricCipher algorithm CHAM-64/ECB.
incorrectly decrypted: C73FEFF35B67E0A8
AlgorithmType: SymmetricCipher
Ciphertext: 453c 63bc dcfa bf4e
Comment: CHAM-64/ECB, 128-bit key
Key: 0100 0302 0504 0706 0908 0b0a 0d0c 0f0e
Name: CHAM-64/ECB
Plaintext: 1100 3322 5544 7766
Source: CHAM paper, Appendix A, test vector 1
Test: Encrypt
Test FAILED.
Skipping to next test.
incorrectly decrypted: 9D4DB8AF2B142E2C
AlgorithmType: SymmetricCipher
Ciphertext: ceda d4dc 00e3 800d
Comment: CHAM-64/ECB, 128-bit key
Key: 0277 0a9e a270 1fed 460c c269 9163 e519
Name: CHAM-64/ECB
Plaintext: 704a 4e91 eb9b 688d
Source: CHAM reference implementation
Test: Encrypt
Test FAILED.
Skipping to next test.
incorrectly decrypted: 91D64CC6A4EB2057
AlgorithmType: SymmetricCipher
Ciphertext: e1af b96f 3079 4233
Comment: CHAM-64/ECB, 128-bit key
Key: 24cd a3e2 c167 92f3 40b6 0017 cabc 07c4
Name: CHAM-64/ECB
Plaintext: 115a 31e5 ee65 87f7
Source: CHAM reference implementation
Test: Encrypt
Test FAILED.
Skipping to next test.
incorrectly decrypted: A51E08D673F6BE9D
AlgorithmType: SymmetricCipher
Ciphertext: 280d 763b 931b da81
Comment: CHAM-64/ECB, 128-bit key
Key: 0914 eef6 827c 21b9 c697 05ce b28b 7dd5
Name: CHAM-64/ECB
Plaintext: e722 2e2b 0f2c ee49
Source: CHAM reference implementation
Test: Encrypt
Test FAILED.
Skipping to next test.
incorrectly decrypted: 72C550E28939BDC9
AlgorithmType: SymmetricCipher
Ciphertext: 0277 8604 1b15 8cb9
Comment: CHAM-64/ECB, 128-bit key
Key: 2fa2 fb02 1cd5 9124 ee27 1ec9 7307 6a13
Name: CHAM-64/ECB
Plaintext: 9fc0 8c64 f9f9 8163
Source: CHAM reference implementation
Test: Encrypt
Test FAILED.
Skipping to next test.
incorrectly decrypted: 37D7158F62253EAC
AlgorithmType: SymmetricCipher
Ciphertext: 5684 2bf7 606d 67f8
Comment: CHAM-64/ECB, 128-bit key
Key: 6035 af8d 6d97 6a47 1bc9 cb88 1a4a f2aa
Name: CHAM-64/ECB
Plaintext: 657b 5980 aad8 468b
Source: CHAM reference implementation
Test: Encrypt
Test FAILED.
Skipping to next test.
incorrectly decrypted: 18B8306992E639F3
AlgorithmType: SymmetricCipher
Ciphertext: 9263 2bf9 9819 783a
Comment: CHAM-64/ECB, 128-bit key
Key: be3a cf23 eda6 9014 023e 098b 37c3 9b9e
Name: CHAM-64/ECB
Plaintext: ff83 911e 2f35 84a5
Source: CHAM reference implementation
Test: Encrypt
Test FAILED.
Skipping to next test.
incorrectly decrypted: 64DDFAC57B359503
AlgorithmType: SymmetricCipher
Ciphertext: f810 fad0 80f0 19bd
Comment: CHAM-64/ECB, 128-bit key
Key: ffde 8a15 21c5 fb5e b6b1 1ec9 05aa c629
Name: CHAM-64/ECB
Plaintext: 7802 c7a5 d52f 1868
Source: CHAM reference implementation
Test: Encrypt
Test FAILED.
Skipping to next test.
incorrectly decrypted: 4245EF2E6E891989
AlgorithmType: SymmetricCipher
Ciphertext: e733 fd94 c357 d36c
Comment: CHAM-64/ECB, 128-bit key
Key: fc25 b83f 5058 9cb6 fe7a 5d6c 1635 5cfd
Name: CHAM-64/ECB
Plaintext: 1ab2 1791 a5d3 05aa
Source: CHAM reference implementation
Test: Encrypt
Test FAILED.
Skipping to next test.
incorrectly decrypted: E99358A91FB913D3
AlgorithmType: SymmetricCipher
Ciphertext: 5bc2 2475 f93f 6cc8
Comment: CHAM-64/ECB, 128-bit key
Key: fae3 5e23 e357 3e33 4468 c725 80e5 4a6e
Name: CHAM-64/ECB
Plaintext: 5dc5 c55f 6b8d 31e2
Source: CHAM reference implementation
Test: Encrypt
Test FAILED.
Skipping to next test.
Testing SymmetricCipher algorithm CHAM-128/ECB.
....................
Testing SymmetricCipher algorithm CHAM-64/CTR.
..........
Testing SymmetricCipher algorithm CHAM-128/CTR.
....................
Tests complete. Total tests = 60. Failed tests = 10.
SOME TESTS FAILED!
```
| Clang 5.0/6.0, CHAM-64/ECB and failed self test at -O1 | https://api.github.com/repos/weidai11/cryptopp/issues/677/comments | 1 | 2018-06-30T23:23:37Z | 2018-07-01T15:34:53Z | https://github.com/weidai11/cryptopp/issues/677 | 337,250,079 | 677 |
[
"weidai11",
"cryptopp"
] | Add Simeck lightweight block cipher | Add Simeck lightweight block cipher | https://api.github.com/repos/weidai11/cryptopp/issues/675/comments | 1 | 2018-06-30T06:41:29Z | 2018-06-30T06:51:59Z | https://github.com/weidai11/cryptopp/issues/675 | 337,192,213 | 675 |
[
"weidai11",
"cryptopp"
] | ### Crypto++ Issue Report
I noticed that SHA256 hashing is much *slower* in 7.0.0 than 5.6.5.
Overview of performance difference when hashing 512 MB block of memory with Intel Core i7-5820K Haswell-E with **SHA256 algorithm**:
lib version | elapsed time | throughput
------------|------------|-----------
cryptlib.lib 5.6.5 x64 | 2.0 seconds | 290 MB/sec
cryptlib.lib 7.0.0 x64 | 2.7 seconds | 215 MB/sec
cryptlib.lib 5.6.5 x86 | 2.0 seconds | 290 MB/sec
cryptlib.lib 7.0.0 x86 | 2.0 seconds | 290 MB/sec
The 32-bit (x86) build of 7.0.0 runs quickly (2.0 seconds & 290 MB/sec). It's the **64-bit x64** 7.0.0 library that is slower.
I suspect the performance drop was introduced with library version 6.0.0 that has the SIMD rewrite in `"sha-simd.cpp"`. It looks like the older 5.6.5 used sha256 assembly code in `"x64dll.asm"`.
The output executable sizes compiled by MS VS2017 and shows the test file linked with v7.0.0 is about half the size:
hash_benchmark565_x64.exe 423,424 bytes
hash_benchmark700_x64.exe 219,648 bytes
GCC executable file sizes:
-rwxrwxr-x. 1 johndoe johndoe 11624294 Jun 28 14:56 hash_bench_cryptopp565
-rwxrwxr-x. 1 johndoe johndoe 13022276 Jun 28 14:57 hash_bench_cryptopp700
This performance difference appears to be a Windows specific issue. I also tried GCC on Linux 64-bit (CentOS) and the performance looks the same for both 5.6.5 and 7.0.0. The GCC output executables for 5.6.5 and 7.0.0 are roughly the same -- and in fact -- the v7.0.0 is *larger* instead of smaller. Therefore, maybe there's a missing/errant C++ preprocessor conditional compile that's affecting the x64 MSVC compilation in v7.0.0.
###### test code
```cpp
// x64 compiler: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\Hostx64\x64\cl.exe
// cl hash_benchmark.cpp cryptlib.lib /Fehash_benchmark565_x64 /O2 /GL /MT /INCREMENTAL:NO /I Y:\cryptopp565_VS2017 /link /LIBPATH:"Y:\cryptopp565_VS2017\x64\Output\Release"
// cl hash_benchmark.cpp cryptlib.lib /Fehash_benchmark700_x64 /O2 /GL /MT /INCREMENTAL:NO /I Y:\cryptopp700_VS2017 /link /LIBPATH:"Y:\cryptopp700_VS2017\x64\Output\Release"
// x86 compiler: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.14.26428\bin\Hostx86\x86\cl.exe
// cl hash_benchmark.cpp cryptlib.lib /Fehash_benchmark700_w32 /O2 /GL /MT /INCREMENTAL:NO /I Y:\cryptopp700_VS2017 /link /LIBPATH:"Y:\cryptopp700_VS2017\win32\Output\Release"
// cl hash_benchmark.cpp cryptlib.lib /Fehash_benchmark565_w32 /O2 /GL /MT /INCREMENTAL:NO /I Y:\cryptopp565_VS2017 /link /LIBPATH:"Y:\cryptopp565_VS2017\win32\Output\Release"
// GCC 64-bit compile and did not use CFLAGS -m32 to build a 32-bit binaries
// g++ -std=c++11 hash_benchmark.cpp -I ~/cryptopp700 -L ~/cryptopp700 -l cryptopp -o hash_bench_cryptopp700
#include <iostream>
#include "sha.h"
typedef unsigned char BYTE;
void Testgroup(const BYTE *BufInput, const int iBuffersize, const char* szDesc = NULL)
{
BYTE pbOutputBuffer[CryptoPP::SHA256::DIGESTSIZE];
CryptoPP::SHA256 hash;
hash.Restart();
hash.Update(BufInput, iBuffersize);
hash.Final(pbOutputBuffer);
}
int main(int argc, char* argv[])
{
const size_t iBuffersize = (1048576L * 512L);
auto *BufInput = new BYTE[iBuffersize];
Testgroup(BufInput, iBuffersize, "test sha256");
delete[] BufInput;
}
```
| SHA256 x64 code is 25% slower in version 7.0.0 than 5.6.5 built with MS VS2017/VS2015 Windows | https://api.github.com/repos/weidai11/cryptopp/issues/674/comments | 2 | 2018-06-30T00:40:46Z | 2018-06-30T12:04:00Z | https://github.com/weidai11/cryptopp/issues/674 | 337,171,858 | 674 |
[
"weidai11",
"cryptopp"
] | ```
#include <cryptopp/eccrypto.h>
#include <cryptopp/ecp.h>
#include <cryptopp/oids.h>
#include <cryptopp/osrng.h>
#include <cryptopp/sha.h>
#include <iostream>
int main()
{
auto secp256k1 = CryptoPP::ASN1::secp256k1();
CryptoPP::DL_GroupParameters_EC<CryptoPP::ECP> params(secp256k1);
CryptoPP::ECDSA<CryptoPP::ECP, CryptoPP::SHA256>::PrivateKey private_key;
CryptoPP::ECDSA<CryptoPP::ECP, CryptoPP::SHA256>::PublicKey public_key, public_key_i;
CryptoPP::AutoSeededRandomPool arng;
private_key.Initialize(arng, params);
private_key.MakePublicKey(public_key);
std::cout<<std::hex<<private_key.GetPrivateExponent()<<std::endl;
std::cout<<std::hex<<
public_key.GetPublicElement().x << " " <<
public_key.GetPublicElement().y << " " <<
public_key.Validate(arng, 3) << std::endl;
CryptoPP::ECP::Point P;
P.x = public_key.GetPublicElement().x;
P.y = public_key.GetPublicElement().y;
public_key_i.Initialize(params, P);
std::cout<<std::hex<<
public_key_i.GetPublicElement().x << " " <<
public_key_i.GetPublicElement().y << " " <<
public_key_i.Validate(arng, 3) << std::endl;
return 0;
}
```
output
```
c748e3b4ceef7a3870eef4b2a970b798c9a498edbeb96d54f5bb820678c7392fh
cfb359c5999dbd5be906185e16671a93289c1c866140b6d683575a5282a2da7h 8f241d96fc082e4c266baedae559d504a22aefe1162206702b53bcc6089c40d1h 1
cfb359c5999dbd5be906185e16671a93289c1c866140b6d683575a5282a2da7h 8f241d96fc082e4c266baedae559d504a22aefe1162206702b53bcc6089c40d1h 0
```
Linux mint 4.15.18-041518-generic #201804190330 SMP Thu Apr 19 07:34:21 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Is it okay that public_key_i is not passing validation?
| Public key is not passing validation | https://api.github.com/repos/weidai11/cryptopp/issues/673/comments | 1 | 2018-06-27T20:13:49Z | 2018-06-28T05:30:02Z | https://github.com/weidai11/cryptopp/issues/673 | 336,371,120 | 673 |
[
"weidai11",
"cryptopp"
] | Add HIGHT lightweight block cipher | Add HIGHT lightweight block cipher | https://api.github.com/repos/weidai11/cryptopp/issues/672/comments | 1 | 2018-06-24T04:43:27Z | 2018-06-24T04:56:01Z | https://github.com/weidai11/cryptopp/issues/672 | 335,150,637 | 672 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.