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 AVX and AVX2 detection. | Add AVX and AVX2 detection | https://api.github.com/repos/weidai11/cryptopp/issues/671/comments | 1 | 2018-06-18T22:19:04Z | 2018-06-18T22:50:16Z | https://github.com/weidai11/cryptopp/issues/671 | 333,454,918 | 671 |
[
"weidai11",
"cryptopp"
] | Add LEA lightweight block cipher | Add LEA lightweight block cipher | https://api.github.com/repos/weidai11/cryptopp/issues/669/comments | 1 | 2018-06-18T02:30:20Z | 2018-06-18T02:44:45Z | https://github.com/weidai11/cryptopp/issues/669 | 333,116,655 | 669 |
[
"weidai11",
"cryptopp"
] | I am using Crypto++ 7.0.0. If I decryptAES with the same key used as encryptAES, the result is as expected. However, if I use a different/wrong key, the exception is thrown:
throw InvalidCiphertext("StreamTransformationFilter: invalid PKCS #7 block padding found");
I would appreciate if anyone can help. The code is below:
```
string AESCryptoPP::encryptAES(const string& plainText, const string& keystr)
{
string sKey;
if (CryptoPP::AES::DEFAULT_KEYLENGTH < keystr.size())
sKey = keystr.substr(0, CryptoPP::AES::DEFAULT_KEYLENGTH); // chop if too long
else if (CryptoPP::AES::DEFAULT_KEYLENGTH > keystr.size())
sKey = keystr + std::string(CryptoPP::AES::DEFAULT_KEYLENGTH - keystr.size(), '*'); // pad
byte key[CryptoPP::AES::DEFAULT_KEYLENGTH];
memcpy(key, sKey.c_str(), CryptoPP::AES::DEFAULT_KEYLENGTH);
byte iv[CryptoPP::AES::BLOCKSIZE];
memset(iv, 0x00, CryptoPP::AES::BLOCKSIZE);
string ciphertext;
CryptoPP::AES::Encryption aesEncryption(key, CryptoPP::AES::DEFAULT_KEYLENGTH);
CryptoPP::CBC_Mode_ExternalCipher::Encryption cbcEncryption(aesEncryption, iv);
CryptoPP::StreamTransformationFilter stfEncryptor(cbcEncryption, new CryptoPP::StringSink(ciphertext));
stfEncryptor.Put(reinterpret_cast<const unsigned char*>(plainText.c_str()), plainText.length());
stfEncryptor.MessageEnd();
std::string result;
StringSource(ciphertext, true, new Base64Encoder(new StringSink(result)));
return result;
}
string AESCryptoPP::decryptAES(const string& ciphertext, const string& keystr)
{
string sKey;
if (CryptoPP::AES::DEFAULT_KEYLENGTH < keystr.size())
sKey = keystr.substr(0, CryptoPP::AES::DEFAULT_KEYLENGTH); // chop if too long
else if (CryptoPP::AES::DEFAULT_KEYLENGTH > keystr.size())
sKey = keystr + std::string(CryptoPP::AES::DEFAULT_KEYLENGTH - keystr.size(), '*'); // pad
byte key[CryptoPP::AES::DEFAULT_KEYLENGTH];
memcpy(key, sKey.c_str(), CryptoPP::AES::DEFAULT_KEYLENGTH);
byte iv[CryptoPP::AES::BLOCKSIZE];
memset(iv, 0x00, CryptoPP::AES::BLOCKSIZE);
string decryptedtext;
CryptoPP::AES::Decryption aesDecryption(key, CryptoPP::AES::DEFAULT_KEYLENGTH);
CryptoPP::CBC_Mode_ExternalCipher::Decryption cbcDecryption(aesDecryption, iv);
std::string ciphertextDecoded64;
StringSource(ciphertext, true, new Base64Decoder(new StringSink(ciphertextDecoded64)));
int size = ciphertextDecoded64.size();
CryptoPP::StreamTransformationFilter stfDecryptor(cbcDecryption, new CryptoPP::StringSink(decryptedtext));
stfDecryptor.Put(reinterpret_cast<const unsigned char*>(ciphertextDecoded64.c_str()), ciphertextDecoded64.size());
stfDecryptor.MessageEnd(); // !!!! throws the exception
return decryptedtext;
}
``` | decryptAES with the incorrect key throws InvalidCiphertext("StreamTransformationFilter: invalid PKCS #7 block padding found"); | https://api.github.com/repos/weidai11/cryptopp/issues/667/comments | 1 | 2018-06-08T03:03:46Z | 2018-06-08T03:51:14Z | https://github.com/weidai11/cryptopp/issues/667 | 330,503,459 | 667 |
[
"weidai11",
"cryptopp"
] | ### Crypto++ Issue with pump + aes and zip or without zip
While using pump the output file is not the same as the input file after decryption. MD5 check of both files fails.
I've tried many possible ways to go around this but it still always fails while setting false to
`CryptoPP::FileSource file(inf, false/**Setting false causes failure*/, new CryptoPP::Gzip(encryptor, 9));`
Infact both encryption and decryption cannot work when using pump function
* Operating system Windows 10
* Crypto++ tested also on latest 6.0
* Built with visual studio msbuild
```
void EncryptFile(std::string password, std::string inputFileName, std::string outputFileName)
{
std::cout << "Starting Encryption of:" + inputFileName << std::endl;
CryptoPP::byte pass[CryptoPP::AES::MAX_KEYLENGTH]; // digest of password
CryptoPP::byte iv[CryptoPP::AES::BLOCKSIZE]; // Initial Vector (IV), misused
// by original author
CryptoPP::byte true_iv[CryptoPP::AES::BLOCKSIZE]; // real IV used - set to zero
CryptoPP::AutoSeededRandomPool rng;
try {
// digest password
CryptoPP::StringSource(password, true,
new CryptoPP::HashFilter(*(new CryptoPP::SHA256),
new CryptoPP::ArraySink(pass, CryptoPP::AES::MAX_KEYLENGTH)));
// random Initial Vector
rng.GenerateBlock(iv, CryptoPP::AES::BLOCKSIZE);
memset(true_iv, 0, CryptoPP::AES::BLOCKSIZE);
// create object for encrypting
CryptoPP::AES::Encryption aesEncryption(pass, CryptoPP::AES::DEFAULT_KEYLENGTH);
CryptoPP::CBC_Mode_ExternalCipher::Encryption cbcEncryption(aesEncryption, true_iv);
CryptoPP::StreamTransformationFilter* encryptor;
encryptor = new CryptoPP::StreamTransformationFilter(
cbcEncryption,
new CryptoPP::FileSink(outputFileName.c_str()));
encryptor->Put(iv, CryptoPP::AES::BLOCKSIZE); // this prefixes the file with random block (not IV)
// Cryptographically it is equivalent to IV, so just as good
// "bind" a file and encrypt one
std::ifstream inf(inputFileName, std::ios::binary);
CryptoPP::FileSource file(inf, true, new CryptoPP::Gzip(encryptor, 9));
//file->zip->encrypt
int file_size = FileSize(file);
int buffe = 10000;
int buf_size = 0;
int readed = file_size;
while (!EndOfFile(file) && !file.SourceExhausted()) {
file.Pump(buffe);
int buf_size = inf.tellg();
//progress_func(nullptr, 0, 0, (double)file_size, (double)buf_size);
}
inf.close(); // to be nice
std::cout << "Finished Encryption of:" + inputFileName << std::endl;
} catch (CryptoPP::Exception e) {
std::cout << "Caught exception !:" << e.what() << std::endl;
}
}
void DecryptFile(std::string password, std::string inputFileName, std::string outputFileName)
{
std::cout << "Begining Decryption of:" + inputFileName << std::endl;
CryptoPP::byte pass[CryptoPP::AES::MAX_KEYLENGTH];
CryptoPP::byte iv[CryptoPP::AES::BLOCKSIZE]; // here's 1st problem: AES IV is CryptoPP::AES::BLOCKSIZE bytes
CryptoPP::byte head_file[CryptoPP::AES::BLOCKSIZE]; // so must skip CryptoPP::AES::BLOCKSIZE bytes, not 8.
memset(iv, 0, CryptoPP::AES::BLOCKSIZE); // very correct - in fact the encryptor prefixes file
// with a random block, so no need to pass the IV explicitly.
try {
CryptoPP::StringSource(password, true, new CryptoPP::HashFilter(*(new CryptoPP::SHA256), new CryptoPP::ArraySink(pass, CryptoPP::AES::MAX_KEYLENGTH)));
CryptoPP::AES::Decryption aesDecryption(pass,
CryptoPP::AES::DEFAULT_KEYLENGTH);
CryptoPP::CBC_Mode_ExternalCipher::Decryption cbcDecryption(aesDecryption, iv);
CryptoPP::StreamTransformationFilter* decryptor;
decryptor = new CryptoPP::StreamTransformationFilter(cbcDecryption, new CryptoPP::Gunzip(new CryptoPP::FileSink(outputFileName.c_str())));
//file->zip->encrypt
// decryptor->Get(head_file, CryptoPP::AES::BLOCKSIZE); // does not do anything useful, wrong here
// We must somehow decrypt 1st block of the input file, without sending the
// result into the output file.
char garbage[CryptoPP::AES::BLOCKSIZE], iv_garbage[CryptoPP::AES::BLOCKSIZE]; // place for IV stuff
std::ifstream inf(inputFileName, std::ios::binary);
inf.read(iv_garbage, CryptoPP::AES::BLOCKSIZE); // absorb random prefix
// Decrypt random prefix (with zero IV) to some dummy buffer to get
// (a) decryptor state adjusted to IV, and
// (b) file position pointer advanced to the past-IV spot.
cbcDecryption.ProcessData((CryptoPP::byte*)garbage, (const CryptoPP::byte*)iv_garbage, CryptoPP::AES::BLOCKSIZE);
// NOW can run the decryption engine in "automatic" mode
CryptoPP::FileSource file(inf,false, decryptor);
int file_size = FileSize(file);
int buffe = 10000;
int buf_size = 0;
int readed = file_size;
while (!EndOfFile(file) && !file.SourceExhausted()) {
file.Pump(buffe);
int buf_size = inf.tellg();
// progress_func(nullptr, 0, 0, (double)file_size, (double)buf_size);
}
inf.close(); // to be nice
std::cout << "Finished Decryption of:" + outputFileName << std::endl;
} catch (CryptoPP::Exception& e) {
std::cout << "Caught exception during decryption!:" << std::string(e.what()) << std::endl;
return;
}
}
```
I've also tested without gzip and the same failure occurs.
No exception occurs btw
The functions filesize and endofile are the ones from https://www.cryptopp.com/wiki/Pumping_Data | Pump() causing data corruption ? | https://api.github.com/repos/weidai11/cryptopp/issues/666/comments | 2 | 2018-06-05T10:53:08Z | 2018-06-08T08:04:35Z | https://github.com/weidai11/cryptopp/issues/666 | 329,403,052 | 666 |
[
"weidai11",
"cryptopp"
] | #issue #663 point another trouble than only size, it's the class derived by Threefish512 and Threefish1024. It should derive from `Threefish_Info` instead of `Threefish_Base` else `Threefish512::BLOCKSIZE` and `Threefish1024::BLOCKSIZE` are not accessible.
```
line 72: class CRYPTOPP_NO_VTABLE Threefish256 : public Threefish_Info<32>
line 116: class CRYPTOPP_NO_VTABLE Threefish512 : public Threefish_Base<64>
line 160: class CRYPTOPP_NO_VTABLE Threefish1024 : public Threefish_Base<128>
```
| Threefish512::BLOCKSIZE and Threefish1024::BLOCKSIZE are not accessible | https://api.github.com/repos/weidai11/cryptopp/issues/664/comments | 1 | 2018-06-03T07:27:37Z | 2018-06-04T00:10:46Z | https://github.com/weidai11/cryptopp/issues/664 | 328,806,552 | 664 |
[
"weidai11",
"cryptopp"
] | ```
line 116 class CRYPTOPP_NO_VTABLE Threefish512 : public Threefish_Base<32>
line 160 class CRYPTOPP_NO_VTABLE Threefish1024 : public Threefish_Base<32>
```
looking at declaration of Threefish256
```
line 72 class CRYPTOPP_NO_VTABLE Threefish256 : public Threefish_Info<32>
```
it seems Threefish512 and Threefish1024 should be derivated of Threefish_Info instead of Threefish_Base
May declaration should be
class CRYPTOPP_NO_VTABLE Threefish512 : public Threefish_Info<64>
and
class CRYPTOPP_NO_VTABLE Threefish1024 : public Threefish_Info<128>
| Crypto++ 7 threefish.h Threefish512 and Threefish1024 potential trouble on declaration | https://api.github.com/repos/weidai11/cryptopp/issues/663/comments | 1 | 2018-05-30T18:36:58Z | 2018-06-02T20:30:41Z | https://github.com/weidai11/cryptopp/issues/663 | 327,850,703 | 663 |
[
"weidai11",
"cryptopp"
] | line 166 there is missing "public" for Kalyna512_Info access
class Kalyna512 : Kalyna512_Info --> class Kalyna512 : public Kalyna512_Info | kalyna.h missing public access to Kalyna512_Info | https://api.github.com/repos/weidai11/cryptopp/issues/662/comments | 1 | 2018-05-30T18:29:16Z | 2018-06-02T20:54:08Z | https://github.com/weidai11/cryptopp/issues/662 | 327,848,138 | 662 |
[
"weidai11",
"cryptopp"
] | Linux / gcc 4.5.2 / x64. Crypto++ 7.0.0 build with -O3 -fPIC -msse4 -maes -mpclmul --param inline-unit-growth=200.
To reproduce this bug, run code:
```
CryptoPP::SHA512* p = new CryptoPP::SHA512
p->Restart(); // SIGSEGV here. The "state" argument of SHA512::InitState is 0x10 (wild pointer)!
```
If I build it as a static library, then everything is fine. If we rollback to the old 5.6.5 version, then the dynamic library the static library both working fine too.
I've been fight with it for a while, if I find more clues, I will append them here.
PS: SHA384 has the same problem, I guess all SHA2 family algorithms both have this issue. Other Hash algorithms such as MD5, WHIRLPOOL and RIPEMD just works fine.
| Memory access violation (SIGSEGV) when try to call SHA512::Restart with dynamic linked library | https://api.github.com/repos/weidai11/cryptopp/issues/661/comments | 6 | 2018-05-23T19:08:38Z | 2018-07-20T17:17:41Z | https://github.com/weidai11/cryptopp/issues/661 | 325,836,260 | 661 |
[
"weidai11",
"cryptopp"
] | `Deflator::IsolatedInitialize` is not called in the `Gzip::IsolatedInitialize` method. It should be called, otherwise the data is broken when we called the `Initialize` method and try to begin to compress another chunk of data.
You can fix this bug by:
```
void Gzip::IsolatedInitialize(const NameValuePairs ¶meters)
{
Deflator::IsolatedInitialize(parameters); // <--- Add this line of code
ConstByteArrayParameter v;
if (parameters.GetValue(Name::FileName(), v))
m_filename.assign(reinterpret_cast<const char*>(v.begin()), v.size());
if (parameters.GetValue(Name::Comment(), v))
m_comment.assign(reinterpret_cast<const char*>(v.begin()), v.size());
m_filetime = parameters.GetIntValueWithDefault(Name::FileTime(), 0);
}
``` | Gzip::IsolatedInitialize not propagate to its base class | https://api.github.com/repos/weidai11/cryptopp/issues/660/comments | 2 | 2018-05-22T21:45:42Z | 2018-07-11T21:11:32Z | https://github.com/weidai11/cryptopp/issues/660 | 325,474,793 | 660 |
[
"weidai11",
"cryptopp"
] |
Hi, cryptopp devels,
Could you please consider cryptopp.pro for qmake build in attach?
Highly appreciate for any comments or help.
[cryptopp.pro.txt](https://github.com/weidai11/cryptopp/files/2005719/cryptopp.pro.txt)
| qt build | https://api.github.com/repos/weidai11/cryptopp/issues/659/comments | 4 | 2018-05-15T15:58:31Z | 2018-06-02T20:54:41Z | https://github.com/weidai11/cryptopp/issues/659 | 323,281,964 | 659 |
[
"weidai11",
"cryptopp"
] | I cannot use your library without compilation errors when using mingw. I am compiling this sample sample
```
#include "sha.h"
#include "filters.h"
#include "base64.h"
std::string SHA256HashString(std::string aString){
std::string digest;
CryptoPP::SHA256 hash;
/*CryptoPP::StringSource foo(aString, true,
new CryptoPP::HashFilter(hash,
new CryptoPP::Base64Encoder (
new CryptoPP::StringSink(digest))));*/
return digest;
}
```
I compiled the library before in msys.
using gcc version 7.1.0 (x86_64-win32-seh-rev2, Built by MinGW-W64 project)
```
$ g++ -v
Using built-in specs.
COLLECT_GCC=D:\upp-mingw-11873\upp\bin\mingw64\64\bin\g++.exe
COLLECT_LTO_WRAPPER=D:/upp-mingw-11873/upp/bin/mingw64/64/bin/../libexec/gcc/x86_64-w64-mingw.1.0/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-7.1.0/configure --host=x86_64-w64-mingw32 --build=x86_64-w6ngw32 --target=x86_64-w64-mingw32 --prefix=/mingw64 --with-sysroot=/c/mingw710/x86_64-710-wineh-rt_v5-rev2/mingw64 --enable-shared --enable-static --disable-multilib --enable-languages=c,fortran,lto --enable-libstdcxx-time=yes --enable-threads=win32 --enable-libgomp --enable-libic --enable-lto --enable-graphite --enable-checking=release --enable-fully-dynamic-string --ee-version-specific-runtime-libs --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch sable-libstdcxx-debug --enable-bootstrap --disable-rpath --disable-win32-registry --disable-n-disable-werror --disable-symvers --with-gnu-as --with-gnu-ld --with-arch=nocona --with-tune=2 --with-libiconv --with-system-zlib --with-gmp=/c/mingw710/prerequisites/x86_64-w64-mingw32-ic --with-mpfr=/c/mingw710/prerequisites/x86_64-w64-mingw32-static --with-mpc=/c/mingw710/preisites/x86_64-w64-mingw32-static --with-isl=/c/mingw710/prerequisites/x86_64-w64-mingw32-stat-with-pkgversion='x86_64-win32-seh-rev2, Built by MinGW-W64 project' --with-bugurl=https://soforge.net/projects/mingw-w64 CFLAGS='-O2 -pipe -fno-ident -I/c/mingw710/x86_64-710-win32-seh-5-rev2/mingw64/opt/include -I/c/mingw710/prerequisites/x86_64-zlib-static/include -I/c/mingw7rerequisites/x86_64-w64-mingw32-static/include' CXXFLAGS='-O2 -pipe -fno-ident -I/c/mingw710/64-710-win32-seh-rt_v5-rev2/mingw64/opt/include -I/c/mingw710/prerequisites/x86_64-zlib-staticlude -I/c/mingw710/prerequisites/x86_64-w64-mingw32-static/include' CPPFLAGS=' -I/c/mingw710_64-710-win32-seh-rt_v5-rev2/mingw64/opt/include -I/c/mingw710/prerequisites/x86_64-zlib-statnclude -I/c/mingw710/prerequisites/x86_64-w64-mingw32-static/include' LDFLAGS='-pipe -fno-ideL/c/mingw710/x86_64-710-win32-seh-rt_v5-rev2/mingw64/opt/lib -L/c/mingw710/prerequisites/x86_lib-static/lib -L/c/mingw710/prerequisites/x86_64-w64-mingw32-static/lib '
Thread model: win32
gcc version 7.1.0 (x86_64-win32-seh-rev2, Built by MinGW-W64 project)
```
````
ar: creating libcryptopp.a
````
I created the library.. Then linkedit with my example project
Linking...
```
c++ -static -mwindows -mthreads -mconsole -o "D:\upp-mingw-11873\upp\out\MyApps\MINGW.Debug.Debug_Full.Noblitz\cryptopp_test.exe" -Wl,-Map,"D:\upp-mingw-11
873\upp\out\MyApps\MINGW.Debug.Debug_Full.Noblitz\cryptopp_test.map" -ggdb -L"D:\upp-mingw-11873\upp\bin/mingw64/32/i686-w64-mingw32/lib" -L"D:\upp-min
gw-11873\upp\bin/mingw64/32/opt/lib" -Wl,-O,2 -L"d:/libs/cryptopp" "D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblit
z\cryptopp_test.o" -Wl,--start-group "D:/upp-mingw-11873/upp/out/MyApps/Core/MINGW.Debug.Debug_Full.Noblitz\Core.a" "D:/upp-mingw-11873/upp/out/MyApps
/plugin/z/MINGW.Debug.Debug_Full.Noblitz\z.a" -ladvapi32 -lshell32 -lwinmm -lmpr -lole32 -loleaut32 -luuid -lws2_32 -lcryptopp -Wl,--end-group
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o: In function `ZN8CryptoPP18HashTransformationD2Ev':
d:/libs/cryptopp/cryptlib.h:1068: undefined reference to `vtable for CryptoPP::HashTransformation'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o: In function `ZN8CryptoPP6SHA256C1Ev':
d:/libs/cryptopp/sha.h:62: undefined reference to `vtable for CryptoPP::SHA256'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o: In function `ZN8CryptoPP18HashTransformationC2Ev':
d:/libs/cryptopp/cryptlib.h:1065: undefined reference to `CryptoPP::Algorithm::Algorithm(bool)'
d:/libs/cryptopp/cryptlib.h:1065: undefined reference to `vtable for CryptoPP::HashTransformation'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o: In function `ZN8CryptoPP31IteratedHashWithStaticTransf
ormIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ELj32ENS_6SHA256ELj32ELb1EE4InitEv':
d:/libs/cryptopp/iterhash.h:176: undefined reference to `CryptoPP::SHA256::InitState(unsigned int*)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP31IteratedHashW
ithStaticTransformIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ELj32ENS_6SHA256ELj32ELb1EEE[__ZTVN8CryptoPP31IteratedHashWithStaticTransformIjNS_10EnumToT
ypeINS_9ByteOrderELi1EEELj64ELj32ENS_6SHA256ELj32ELb1EEE]+0x18): undefined reference to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransfo
rmation>::Update(unsigned char const*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP31IteratedHashW
ithStaticTransformIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ELj32ENS_6SHA256ELj32ELb1EEE[__ZTVN8CryptoPP31IteratedHashWithStaticTransformIjNS_10EnumToT
ypeINS_9ByteOrderELi1EEELj64ELj32ENS_6SHA256ELj32ELb1EEE]+0x1c): undefined reference to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransfo
rmation>::CreateUpdateSpace(unsigned int&)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP31IteratedHashW
ithStaticTransformIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ELj32ENS_6SHA256ELj32ELb1EEE[__ZTVN8CryptoPP31IteratedHashWithStaticTransformIjNS_10EnumToT
ypeINS_9ByteOrderELi1EEELj64ELj32ENS_6SHA256ELj32ELb1EEE]+0x24): undefined reference to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransfo
rmation>::Restart()'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP31IteratedHashW
ithStaticTransformIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ELj32ENS_6SHA256ELj32ELb1EEE[__ZTVN8CryptoPP31IteratedHashWithStaticTransformIjNS_10EnumToT
ypeINS_9ByteOrderELi1EEELj64ELj32ENS_6SHA256ELj32ELb1EEE]+0x44): undefined reference to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransfo
rmation>::TruncatedFinal(unsigned char*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP31IteratedHashW
ithStaticTransformIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ELj32ENS_6SHA256ELj32ELb1EEE[__ZTVN8CryptoPP31IteratedHashWithStaticTransformIjNS_10EnumToT
ypeINS_9ByteOrderELi1EEELj64ELj32ENS_6SHA256ELj32ELb1EEE]+0x4c): undefined reference to `CryptoPP::HashTransformation::TruncatedVerify(unsigned char co
nst*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP31IteratedHashW
ithStaticTransformIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ELj32ENS_6SHA256ELj32ELb1EEE[__ZTVN8CryptoPP31IteratedHashWithStaticTransformIjNS_10EnumToT
ypeINS_9ByteOrderELi1EEELj64ELj32ENS_6SHA256ELj32ELb1EEE]+0x60): undefined reference to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransfo
rmation>::HashMultipleBlocks(unsigned int const*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP12ClonableImplI
NS_6SHA256ENS_13AlgorithmImplINS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEES1_EEEE[__ZTVN8CryptoPP12ClonableIm
plINS_6SHA256ENS_13AlgorithmImplINS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEES1_EEEE]+0x18): undefined refere
nce to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransformation>::Update(unsigned char const*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP12ClonableImplI
NS_6SHA256ENS_13AlgorithmImplINS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEES1_EEEE[__ZTVN8CryptoPP12ClonableIm
plINS_6SHA256ENS_13AlgorithmImplINS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEES1_EEEE]+0x1c): undefined refere
nce to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransformation>::CreateUpdateSpace(unsigned int&)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP12ClonableImplI
NS_6SHA256ENS_13AlgorithmImplINS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEES1_EEEE[__ZTVN8CryptoPP12ClonableIm
plINS_6SHA256ENS_13AlgorithmImplINS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEES1_EEEE]+0x24): undefined refere
nce to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransformation>::Restart()'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP12ClonableImplI
NS_6SHA256ENS_13AlgorithmImplINS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEES1_EEEE[__ZTVN8CryptoPP12ClonableIm
plINS_6SHA256ENS_13AlgorithmImplINS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEES1_EEEE]+0x44): undefined refere
nce to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransformation>::TruncatedFinal(unsigned char*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP12ClonableImplI
NS_6SHA256ENS_13AlgorithmImplINS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEES1_EEEE[__ZTVN8CryptoPP12ClonableIm
plINS_6SHA256ENS_13AlgorithmImplINS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEES1_EEEE]+0x4c): undefined refere
nce to `CryptoPP::HashTransformation::TruncatedVerify(unsigned char const*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP12ClonableImplI
NS_6SHA256ENS_13AlgorithmImplINS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEES1_EEEE[__ZTVN8CryptoPP12ClonableIm
plINS_6SHA256ENS_13AlgorithmImplINS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEES1_EEEE]+0x60): undefined refere
nce to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransformation>::HashMultipleBlocks(unsigned int const*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP13AlgorithmImpl
INS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEENS_6SHA256EEE[__ZTVN8CryptoPP13AlgorithmImplINS_12IteratedHashIj
NS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEENS_6SHA256EEE]+0x18): undefined reference to `CryptoPP::IteratedHashBase<unsigned in
t, CryptoPP::HashTransformation>::Update(unsigned char const*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP13AlgorithmImpl
INS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEENS_6SHA256EEE[__ZTVN8CryptoPP13AlgorithmImplINS_12IteratedHashIj
NS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEENS_6SHA256EEE]+0x1c): undefined reference to `CryptoPP::IteratedHashBase<unsigned in
t, CryptoPP::HashTransformation>::CreateUpdateSpace(unsigned int&)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP13AlgorithmImpl
INS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEENS_6SHA256EEE[__ZTVN8CryptoPP13AlgorithmImplINS_12IteratedHashIj
NS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEENS_6SHA256EEE]+0x24): undefined reference to `CryptoPP::IteratedHashBase<unsigned in
t, CryptoPP::HashTransformation>::Restart()'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP13AlgorithmImpl
INS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEENS_6SHA256EEE[__ZTVN8CryptoPP13AlgorithmImplINS_12IteratedHashIj
NS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEENS_6SHA256EEE]+0x44): undefined reference to `CryptoPP::IteratedHashBase<unsigned in
t, CryptoPP::HashTransformation>::TruncatedFinal(unsigned char*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP13AlgorithmImpl
INS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEENS_6SHA256EEE[__ZTVN8CryptoPP13AlgorithmImplINS_12IteratedHashIj
NS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEENS_6SHA256EEE]+0x4c): undefined reference to `CryptoPP::HashTransformation::Truncate
dVerify(unsigned char const*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP13AlgorithmImpl
INS_12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEENS_6SHA256EEE[__ZTVN8CryptoPP13AlgorithmImplINS_12IteratedHashIj
NS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEENS_6SHA256EEE]+0x60): undefined reference to `CryptoPP::IteratedHashBase<unsigned in
t, CryptoPP::HashTransformation>::HashMultipleBlocks(unsigned int const*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP12IteratedHashI
jNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEE[__ZTVN8CryptoPP12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashT
ransformationEEE]+0x18): undefined reference to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransformation>::Update(unsigned char const*, u
nsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP12IteratedHashI
jNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEE[__ZTVN8CryptoPP12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashT
ransformationEEE]+0x1c): undefined reference to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransformation>::CreateUpdateSpace(unsigned int
&)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP12IteratedHashI
jNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEE[__ZTVN8CryptoPP12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashT
ransformationEEE]+0x24): undefined reference to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransformation>::Restart()'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP12IteratedHashI
jNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEE[__ZTVN8CryptoPP12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashT
ransformationEEE]+0x44): undefined reference to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransformation>::TruncatedFinal(unsigned char*,
unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP12IteratedHashI
jNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEE[__ZTVN8CryptoPP12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashT
ransformationEEE]+0x4c): undefined reference to `CryptoPP::HashTransformation::TruncatedVerify(unsigned char const*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP12IteratedHashI
jNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashTransformationEEE[__ZTVN8CryptoPP12IteratedHashIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ENS_18HashT
ransformationEEE]+0x60): undefined reference to `CryptoPP::IteratedHashBase<unsigned int, CryptoPP::HashTransformation>::HashMultipleBlocks(unsigned in
t const*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP16IteratedHashB
aseIjNS_18HashTransformationEEE[__ZTVN8CryptoPP16IteratedHashBaseIjNS_18HashTransformationEEE]+0x18): undefined reference to `CryptoPP::IteratedHashBas
e<unsigned int, CryptoPP::HashTransformation>::Update(unsigned char const*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP16IteratedHashB
aseIjNS_18HashTransformationEEE[__ZTVN8CryptoPP16IteratedHashBaseIjNS_18HashTransformationEEE]+0x1c): undefined reference to `CryptoPP::IteratedHashBas
e<unsigned int, CryptoPP::HashTransformation>::CreateUpdateSpace(unsigned int&)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP16IteratedHashB
aseIjNS_18HashTransformationEEE[__ZTVN8CryptoPP16IteratedHashBaseIjNS_18HashTransformationEEE]+0x24): undefined reference to `CryptoPP::IteratedHashBas
e<unsigned int, CryptoPP::HashTransformation>::Restart()'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP16IteratedHashB
aseIjNS_18HashTransformationEEE[__ZTVN8CryptoPP16IteratedHashBaseIjNS_18HashTransformationEEE]+0x44): undefined reference to `CryptoPP::IteratedHashBas
e<unsigned int, CryptoPP::HashTransformation>::TruncatedFinal(unsigned char*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP16IteratedHashB
aseIjNS_18HashTransformationEEE[__ZTVN8CryptoPP16IteratedHashBaseIjNS_18HashTransformationEEE]+0x4c): undefined reference to `CryptoPP::HashTransformat
ion::TruncatedVerify(unsigned char const*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o:cryptopp_test.cpp:(.rdata$_ZTVN8CryptoPP16IteratedHashB
aseIjNS_18HashTransformationEEE[__ZTVN8CryptoPP16IteratedHashBaseIjNS_18HashTransformationEEE]+0x60): undefined reference to `CryptoPP::IteratedHashBas
e<unsigned int, CryptoPP::HashTransformation>::HashMultipleBlocks(unsigned int const*, unsigned int)'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o: In function `ZN8CryptoPP6SHA256D1Ev':
d:/libs/cryptopp/sha.h:62: undefined reference to `vtable for CryptoPP::SHA256'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o: In function `ZN8CryptoPP18HashTransformationC2ERKS0_':
d:/libs/cryptopp/cryptlib.h:1065: undefined reference to `vtable for CryptoPP::HashTransformation'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o: In function `ZN8CryptoPP6SHA256C1ERKS0_':
d:/libs/cryptopp/sha.h:62: undefined reference to `vtable for CryptoPP::SHA256'
D:/upp-mingw-11873/upp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o: In function `ZN8CryptoPP31IteratedHashWithStaticTransf
ormIjNS_10EnumToTypeINS_9ByteOrderELi1EEELj64ELj32ENS_6SHA256ELj32ELb1EE24HashEndianCorrectedBlockEPKj':
d:/libs/cryptopp/iterhash.h:175: undefined reference to `CryptoPP::SHA256::Transform(unsigned int*, unsigned int const*)'
collect2.exe: error: ld returned 1 exit status
D:\upp-mingw-11873\upp\bin/mingw64/32/bin\c++.exe -static -mwindows -mthreads -mconsole -o "D:\upp-mingw-11873\upp\out\MyApps\MINGW.Debug.Debug_Full.Noblit
z\cryptopp_test.exe" -Wl,-Map,"D:\upp-mingw-11873\upp\out\MyApps\MINGW.Debug.Debug_Full.Noblitz\cryptopp_test.map" -ggdb -L"D:\upp-mingw-11873\upp\bin/
mingw64/32/i686-w64-mingw32/lib" -L"D:\upp-mingw-11873\upp\bin/mingw64/32/opt/lib" -Wl,-O,2 -L"d:/libs/cryptopp" "D:/upp-mingw-11873/upp/out/MyApps/cr
yptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o" -Wl,--start-group "D:/upp-mingw-11873/upp/out/MyApps/Core/MINGW.Debug.Debug_Full.Nobl
itz\Core.a" "D:/upp-mingw-11873/upp/out/MyApps/plugin/z/MINGW.Debug.Debug_Full.Noblitz\z.a" -ladvapi32 -lshell32 -lwinmm -lmpr -lole32 -loleaut32 -luui
d -lws2_32 -lcryptopp -Wl,--end-group
Error executing D:\upp-mingw-11873\upp\bin/mingw64/32/bin\c++.exe -static -mwindows -mthreads -mconsole -o "D:\upp-mingw-11873\upp\out\MyApps\MINGW.Debug.D
ebug_Full.Noblitz\cryptopp_test.exe" -Wl,-Map,"D:\upp-mingw-11873\upp\out\MyApps\MINGW.Debug.Debug_Full.Noblitz\cryptopp_test.map" -ggdb -L"D:\upp-ming
w-11873\upp\bin/mingw64/32/i686-w64-mingw32/lib" -L"D:\upp-mingw-11873\upp\bin/mingw64/32/opt/lib" -Wl,-O,2 -L"d:/libs/cryptopp" "D:/upp-mingw-11873/u
pp/out/MyApps/cryptopp_test/MINGW.Debug.Debug_Full.Main.Noblitz\cryptopp_test.o" -Wl,--start-group "D:/upp-mingw-11873/upp/out/MyApps/Core/MINGW.Debug
.Debug_Full.Noblitz\Core.a" "D:/upp-mingw-11873/upp/out/MyApps/plugin/z/MINGW.Debug.Debug_Full.Noblitz\z.a" -ladvapi32 -lshell32 -lwinmm -lmpr -lole32
-loleaut32 -luuid -lws2_32 -lcryptopp -Wl,--end-group
```
| cannot link cryptopp without linking errors for very simple project | https://api.github.com/repos/weidai11/cryptopp/issues/658/comments | 2 | 2018-05-13T18:21:44Z | 2020-07-20T21:17:33Z | https://github.com/weidai11/cryptopp/issues/658 | 322,615,926 | 658 |
[
"weidai11",
"cryptopp"
] | I found two issues compiling Cryptopp 7.0.0 with gcc 8.1.0. Maybe I did not choose the right compilation options?
The first one is in `rdrand.cpp`, there are two sections like this that 8.1.0 does not like:
```
#elif defined(GCC_RDRAND_ASM_AVAILABLE) && (CRYPTOPP_GCC_VERSION >= 40700)
__asm__ __volatile__
(
INTEL_NOPREFIX
ASL(1)
AS1(rdrand rax)
ASJ(jnc, 1, b)
ATT_NOPREFIX
: "=a" (*reinterpret_cast<word64*>(output))
: : "cc"
);
```
I commented them out to fall back on the old code for gcc, and compilation is fine.
The second issue is in pwdbased.h, which is not self contained any longer. It uses `ConstByteArrayParameter`, which is defined in `algparam.h`. `algparam.h` is not included in `pwdbased.h`.
| Mac OS X and Crypto++ 7.0.0 and gcc 8.1.0 compile issues | https://api.github.com/repos/weidai11/cryptopp/issues/657/comments | 7 | 2018-05-13T10:48:03Z | 2018-05-13T15:09:52Z | https://github.com/weidai11/cryptopp/issues/657 | 322,583,470 | 657 |
[
"weidai11",
"cryptopp"
] | I started the build with make -j3, which goes on for a while but errors out at:
> g++ -DNDEBUG -g2 -O3 -fPIC -pthread -pipe -c ppc-simd.cpp
> In file included from ppc-simd.h:23:0,
> from ppc-simd.cpp:28:
> /usr/lib/gcc/powerpc64-unknown-linux-gnu/7.3.0/include/altivec.h:34:2: Fehler: #error Use the "-maltivec" flag to enable PowerPC AltiVec support
> #error Use the "-maltivec" flag to enable PowerPC AltiVec support
> ^~~~~
> In file included from ppc-simd.cpp:28:0:
> ppc-simd.h:33:9: Fehler: »__vector« bezeichnet keinen Typ; meinten Sie »__nextup«?
> typedef __vector unsigned char uint8x16_p;
> ^~~~~~~~
> __nextup
> ppc-simd.h:34:9: Fehler: »__vector« bezeichnet keinen Typ; meinten Sie »__nextup«?
> typedef __vector unsigned short uint16x8_p;
> ^~~~~~~~
> __nextup
> [...]
See build.log for details.
Machine is a PowerMac G5 11,2 running Gentoo Linux 2.4.1 (ppc64), gcc 7.3.0, glibc 2.25, binutils 2.29.
Here is the build log: [build.log](https://github.com/weidai11/cryptopp/files/1995650/build.log). | Building Crypto++ 7.0.0 fails on POWER4 ( PowerMac G5, Gentoo Linux 2.4.1, gcc 7.3.0) | https://api.github.com/repos/weidai11/cryptopp/issues/656/comments | 17 | 2018-05-11T14:26:33Z | 2018-12-06T07:26:20Z | https://github.com/weidai11/cryptopp/issues/656 | 322,316,793 | 656 |
[
"weidai11",
"cryptopp"
] | Hi,
Can you please add conditional to the build system to avoid installing the test program and the test data?
The use case should be:
1. build
2. test
3. install (optional test prog/data)
4. test (if test prog/data is available)
In most cases downstream runs the check during build and these files are not required at root filesystem.
Thanks! | Recipe to not install test program and test data | https://api.github.com/repos/weidai11/cryptopp/issues/653/comments | 11 | 2018-05-03T12:11:02Z | 2018-05-06T04:43:24Z | https://github.com/weidai11/cryptopp/issues/653 | 319,894,347 | 653 |
[
"weidai11",
"cryptopp"
] | ### Keccak256 and SHA3 not working as intended
* State the operating system and version (Ubutnu 17 x86_64, Windows 7 Professional x64, etc)
Mac OS
* State the version of the Crypto++ library (Crypto++ 5.6.5, Master, etc)
Crypto++ 7.0.0
* State how you built the library (Makefile, Cmake, distro, etc)
Bazel
* Show a typical command line (the output of the compiler for cryptlib.cpp)
* Show the link command (the output of the linker for libcryptopp.so or cryptest.exe)
* Show the exact error message you are receiving (copy and paste it); or
```
Assertion failed: external/cryptopp/keccak.cpp(255): Update
Trace/BPT trap: 5
```
```
Assertion failed: external/cryptopp/sha3.cpp(254): Update
Trace/BPT trap: 5
```
* Clearly state the undesired behavior (and state the expected behavior)
Both SHA3 and Keccak256 have valid test vectors with 0-length input as follows:
SHA3("") = A7FFC6F8BF1ED76651C14756A061D662F580FF4DE43B49FA82D80A4B80F8434A
Keccak256("") = C5D2460186F7233C927E7DB2DCC703C0E500B653CA82273B7BFAD8045D85A470
Please note that when compiled in release test vectors succeed, however in debug the assert added due to some vulnerability is changing the behavior of these two functions.
Looking at the history I see that the asserts were added due to some vulnerability listed here:
https://github.com/weidai11/cryptopp/commit/399a1546de71f41598c15edada28e7f0d616f541
Commit was made by @noloader
| Keccak256 and SHA3 crash when input is 0 length | https://api.github.com/repos/weidai11/cryptopp/issues/652/comments | 12 | 2018-05-03T08:52:14Z | 2018-05-06T09:30:21Z | https://github.com/weidai11/cryptopp/issues/652 | 319,835,710 | 652 |
[
"weidai11",
"cryptopp"
] | As the title says, everything failing to build. I have this code (below), and I'm not able to build it (logs below the code). I use CMake to create the Visual Studio solution file. I also tried version 6.1.0 and 6.0.0, same problem occurs.
**Steps to build CryptoPP:** download CryptoPP source code (from website) -> open cryptest.sln -> Retarget solution (to use my version of Windows SDK - 10.0.16299.0) -> Ok -> Batch Build -> tick cryptlib - Release|Win32 -> Build
cryptopp-test.cpp:
```
#include <iostream>
#include <cryptopp/hex.h>
#include <cryptopp/sha.h>
#include <cryptopp/filters.h>
int main() {
std::string in, out;
in = "test";
CryptoPP::SHA256 hashFilter;
CryptoPP::StringSource(in, true, new CryptoPP::HashFilter(hashFilter, new CryptoPP::HexEncoder(new CryptoPP::StringSink(out))));
std::cout << out << "\n";
return 0;
}
```
CMakeLists.txt:
```
cmake_minimum_required (VERSION 3.10.0)
project(cryptopp-test)
add_executable(cryptopp-test cryptopp-test.cpp)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}")
set(CRYPTOPP_ROOT_DIR "C:\\libs\\cryptopp700")
set(CRYPTOPP_LIBRARY "C:\\libs\\cryptopp700")
set(CRYPTOPP_INCLUDE_DIR "C:\\libs\\cryptopp700")
find_package(CryptoPP REQUIRED)
if(CRYPTOPP_FOUND)
include_directories(${CRYPTOPP_INCLUDE_DIRS})
target_link_libraries(cryptopp-test ${CRYPTOPP_LIBRARIES})
endif()
```
```
E:\projects\cpp-utils\cryptopp-test\build>cmake ..
-- Building for: Visual Studio 15 2017
-- The C compiler identification is MSVC 19.13.26129.0
-- The CXX compiler identification is MSVC 19.13.26129.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.13.26128/bin/Hostx86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found CryptoPP: C:\libs\cryptopp700 (found version "7.0.0")
-- Configuring done
WARNING: Target "cryptopp-test" requests linking to directory "C:\libs\cryptopp700". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "cryptopp-test" requests linking to directory "C:\libs\cryptopp700". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "cryptopp-test" requests linking to directory "C:\libs\cryptopp700". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "cryptopp-test" requests linking to directory "C:\libs\cryptopp700". Targets may link only to libraries. CMake is dropping the item.
-- Generating done
-- Build files have been written to: E:/projects/cpp-utils/cryptopp-test/build
```
```
E:\projects\cpp-utils\cryptopp-test\build>msbuild cryptopp-test.sln
Microsoft (R) Build Engine version 15.6.82.30579 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
Build started 5/1/2018 1:22:05 PM.
Project "E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.sln" on node 1 (default targets).
ValidateSolutionConfiguration:
Building solution configuration "Debug|Win32".
ValidateProjects:
The project "ALL_BUILD" is not selected for building in solution configuration "Debug|Win32".
Project "E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.sln" (1) is building "E:\projects\cpp-utils\cryptopp-t
est\build\ZERO_CHECK.vcxproj" (2) on node 1 (default targets).
PrepareForBuild:
Creating directory "Win32\Debug\ZERO_CHECK\".
Creating directory "E:\projects\cpp-utils\cryptopp-test\build\Debug\".
Creating directory "Win32\Debug\ZERO_CHECK\ZERO_CHECK.tlog\".
InitializeBuildStatus:
Creating "Win32\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
Checking Build System
CMake does not need to re-run because E:/projects/cpp-utils/cryptopp-test/build/CMakeFiles/generate.stamp is up-to-da
te.
FinalizeBuildStatus:
Deleting file "Win32\Debug\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild".
Touching "Win32\Debug\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate".
Done Building Project "E:\projects\cpp-utils\cryptopp-test\build\ZERO_CHECK.vcxproj" (default targets).
Project "E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.sln" (1) is building "E:\projects\cpp-utils\cryptopp-t
est\build\cryptopp-test.vcxproj.metaproj" (3) on node 1 (default targets).
Project "E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj.metaproj" (3) is building "E:\projects\cpp-uti
ls\cryptopp-test\build\cryptopp-test.vcxproj" (4) on node 1 (default targets).
PrepareForBuild:
Creating directory "cryptopp-test.dir\Debug\".
Creating directory "cryptopp-test.dir\Debug\cryptopp-test.tlog\".
InitializeBuildStatus:
Creating "cryptopp-test.dir\Debug\cryptopp-test.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
CustomBuild:
Building Custom Rule E:/projects/cpp-utils/cryptopp-test/CMakeLists.txt
CMake does not need to re-run because E:/projects/cpp-utils/cryptopp-test/build/CMakeFiles/generate.stamp is up-to-da
te.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX86\x86\CL.exe /c /IC
:\libs\cryptopp700 /Zi /nologo /W3 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"De
bug\"" /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cryptopp-test.dir\D
ebug\\" /Fd"cryptopp-test.dir\Debug\vc141.pdb" /Gd /TP /analyze- /FC /errorReport:queue "E:\projects\cpp-utils\crypto
pp-test\cryptopp-test.cpp"
cryptopp-test.cpp
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128\bin\HostX86\x86\link.exe /ERR
ORREPORT:QUEUE /OUT:"E:\projects\cpp-utils\cryptopp-test\build\Debug\cryptopp-test.exe" /INCREMENTAL /NOLOGO kernel32
.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFES
T /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"E:/projects/cpp-utils/cryptopp-test/
build/Debug/cryptopp-test.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"E:/projects/cpp-utils/cryp
topp-test/build/Debug/cryptopp-test.lib" /MACHINE:X86 /SAFESEH /machine:X86 "cryptopp-test.dir\Debug\cryptopp-test.o
bj"
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: __thiscall CryptoPP::Algorithm::Algorithm(bool)"
(??0Algorithm@CryptoPP@@QAE@_N@Z) referenced in function "public: __thiscall CryptoPP::BufferedTransformation::Buffere
dTransformation(void)" (??0BufferedTransformation@CryptoPP@@QAE@XZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp
-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::HashTransforma
tion::TruncatedVerify(unsigned char const *,unsigned int)" (?TruncatedVerify@HashTransformation@CryptoPP@@UAE_NPBEI@Z)
[E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buffer
edTransformation::GetMaxWaitObjectCount(void)const " (?GetMaxWaitObjectCount@BufferedTransformation@CryptoPP@@UBEIXZ) [
E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::BufferedTransf
ormation::GetWaitObjects(class CryptoPP::WaitObjectContainer &,class CryptoPP::CallStack const &)" (?GetWaitObjects@Buf
feredTransformation@CryptoPP@@UAEXAAVWaitObjectContainer@2@ABVCallStack@2@@Z) [E:\projects\cpp-utils\cryptopp-test\buil
d\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::BufferedTransf
ormation::Initialize(class CryptoPP::NameValuePairs const &,int)" (?Initialize@BufferedTransformation@CryptoPP@@UAEXABV
NameValuePairs@2@H@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::BufferedTransf
ormation::Flush(bool,int,bool)" (?Flush@BufferedTransformation@CryptoPP@@UAE_N_NH0@Z) [E:\projects\cpp-utils\cryptopp-t
est\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::BufferedTransf
ormation::MessageSeriesEnd(int,bool)" (?MessageSeriesEnd@BufferedTransformation@CryptoPP@@UAE_NH_N@Z) [E:\projects\cpp-
utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned __int64 __thiscall CryptoPP::Bu
fferedTransformation::MaxRetrievable(void)const " (?MaxRetrievable@BufferedTransformation@CryptoPP@@UBE_KXZ) [E:\projec
ts\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::BufferedTransf
ormation::AnyRetrievable(void)const " (?AnyRetrievable@BufferedTransformation@CryptoPP@@UBE_NXZ) [E:\projects\cpp-utils
\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buffer
edTransformation::Get(unsigned char &)" (?Get@BufferedTransformation@CryptoPP@@UAEIAAE@Z) [E:\projects\cpp-utils\crypto
pp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buffer
edTransformation::Get(unsigned char *,unsigned int)" (?Get@BufferedTransformation@CryptoPP@@UAEIPAEI@Z) [E:\projects\cp
p-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buffer
edTransformation::Peek(unsigned char &)const " (?Peek@BufferedTransformation@CryptoPP@@UBEIAAE@Z) [E:\projects\cpp-util
s\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buffer
edTransformation::Peek(unsigned char *,unsigned int)const " (?Peek@BufferedTransformation@CryptoPP@@UBEIPAEI@Z) [E:\pro
jects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned __int64 __thiscall CryptoPP::Bu
fferedTransformation::Skip(unsigned __int64)" (?Skip@BufferedTransformation@CryptoPP@@UAE_K_K@Z) [E:\projects\cpp-utils
\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned __int64 __thiscall CryptoPP::Bu
fferedTransformation::TotalBytesRetrievable(void)const " (?TotalBytesRetrievable@BufferedTransformation@CryptoPP@@UBE_K
XZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buffer
edTransformation::NumberOfMessages(void)const " (?NumberOfMessages@BufferedTransformation@CryptoPP@@UBEIXZ) [E:\project
s\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::BufferedTransf
ormation::AnyMessages(void)const " (?AnyMessages@BufferedTransformation@CryptoPP@@UBE_NXZ) [E:\projects\cpp-utils\crypt
opp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::BufferedTransf
ormation::GetNextMessage(void)" (?GetNextMessage@BufferedTransformation@CryptoPP@@UAE_NXZ) [E:\projects\cpp-utils\crypt
opp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buffer
edTransformation::SkipMessages(unsigned int)" (?SkipMessages@BufferedTransformation@CryptoPP@@UAEII@Z) [E:\projects\cpp
-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::BufferedTransf
ormation::SkipAll(void)" (?SkipAll@BufferedTransformation@CryptoPP@@UAEXXZ) [E:\projects\cpp-utils\cryptopp-test\build\
cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall CryptoPP::BufferedTransf
ormation::TransferMessagesTo2(class CryptoPP::BufferedTransformation &,unsigned int &,class std::basic_string<char,stru
ct std::char_traits<char>,class std::allocator<char> > const &,bool)" (?TransferMessagesTo2@BufferedTransformation@Cryp
toPP@@QAEIAAV12@AAIABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) referenced in function "public
: virtual unsigned int __thiscall CryptoPP::SourceTemplate<class CryptoPP::StringStore>::PumpMessages2(unsigned int &,b
ool)" (?PumpMessages2@?$SourceTemplate@VStringStore@CryptoPP@@@CryptoPP@@UAEIAAI_N@Z) [E:\projects\cpp-utils\cryptopp-t
est\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall CryptoPP::BufferedTransf
ormation::TransferAllTo2(class CryptoPP::BufferedTransformation &,class std::basic_string<char,struct std::char_traits<
char>,class std::allocator<char> > const &,bool)" (?TransferAllTo2@BufferedTransformation@CryptoPP@@QAEIAAV12@ABV?$basi
c_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) referenced in function "public: virtual unsigned int __thi
scall CryptoPP::SourceTemplate<class CryptoPP::StringStore>::PumpAll2(bool)" (?PumpAll2@?$SourceTemplate@VStringStore@C
ryptoPP@@@CryptoPP@@UAEI_N@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned char * __thiscall CryptoPP::Buf
feredTransformation::ChannelCreatePutSpace(class std::basic_string<char,struct std::char_traits<char>,class std::alloca
tor<char> > const &,unsigned int &)" (?ChannelCreatePutSpace@BufferedTransformation@CryptoPP@@UAEPAEABV?$basic_string@D
U?$char_traits@D@std@@V?$allocator@D@2@@std@@AAI@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buffer
edTransformation::ChannelPut2(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > c
onst &,unsigned char const *,unsigned int,int,bool)" (?ChannelPut2@BufferedTransformation@CryptoPP@@UAEIABV?$basic_stri
ng@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBEIH_N@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vc
xproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buffer
edTransformation::ChannelPutModifiable2(class std::basic_string<char,struct std::char_traits<char>,class std::allocator
<char> > const &,unsigned char *,unsigned int,int,bool)" (?ChannelPutModifiable2@BufferedTransformation@CryptoPP@@UAEIA
BV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAEIH_N@Z) [E:\projects\cpp-utils\cryptopp-test\build\cr
yptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::BufferedTransf
ormation::ChannelFlush(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,
bool,int,bool)" (?ChannelFlush@BufferedTransformation@CryptoPP@@UAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$alloca
tor@D@2@@std@@_NH1@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::BufferedTransf
ormation::ChannelMessageSeriesEnd(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>
> const &,int,bool)" (?ChannelMessageSeriesEnd@BufferedTransformation@CryptoPP@@UAE_NABV?$basic_string@DU?$char_traits
@D@std@@V?$allocator@D@2@@std@@H_N@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::BufferedTransf
ormation::SetRetrievalChannel(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > c
onst &)" (?SetRetrievalChannel@BufferedTransformation@CryptoPP@@UAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocat
or@D@2@@std@@@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::BufferedTransf
ormation::Attach(class CryptoPP::BufferedTransformation *)" (?Attach@BufferedTransformation@CryptoPP@@UAEXPAV12@@Z) [E:
\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "void * __cdecl CryptoPP::AlignedAllocate(unsigned int)"
(?AlignedAllocate@CryptoPP@@YAPAXI@Z) referenced in function "public: unsigned char * __thiscall CryptoPP::AllocatorWit
hCleanup<unsigned char,0>::allocate(unsigned int,void const *)" (?allocate@?$AllocatorWithCleanup@E$0A@@CryptoPP@@QAEPA
EIPBX@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "void __cdecl CryptoPP::AlignedDeallocate(void *)" (?Alig
nedDeallocate@CryptoPP@@YAXPAX@Z) referenced in function "public: void __thiscall CryptoPP::AllocatorWithCleanup<unsign
ed char,0>::deallocate(void *,unsigned int)" (?deallocate@?$AllocatorWithCleanup@E$0A@@CryptoPP@@QAEXPAXI@Z) [E:\projec
ts\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "void * __cdecl CryptoPP::UnalignedAllocate(unsigned int)
" (?UnalignedAllocate@CryptoPP@@YAPAXI@Z) referenced in function "public: unsigned char * __thiscall CryptoPP::Allocato
rWithCleanup<unsigned char,0>::allocate(unsigned int,void const *)" (?allocate@?$AllocatorWithCleanup@E$0A@@CryptoPP@@Q
AEPAEIPBX@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "void __cdecl CryptoPP::UnalignedDeallocate(void *)" (?Un
alignedDeallocate@CryptoPP@@YAXPAX@Z) referenced in function "public: void __thiscall CryptoPP::AllocatorWithCleanup<un
signed char,0>::deallocate(void *,unsigned int)" (?deallocate@?$AllocatorWithCleanup@E$0A@@CryptoPP@@QAEXPAXI@Z) [E:\pr
ojects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::Store::GetNext
Message(void)" (?GetNextMessage@Store@CryptoPP@@UAE_NXZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxpr
oj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "bool __cdecl CryptoPP::AssignIntToInteger(class type_inf
o const &,void *,void const *)" (?AssignIntToInteger@CryptoPP@@YA_NABVtype_info@@PAXPBX@Z) referenced in function "publ
ic: virtual void __thiscall CryptoPP::AlgorithmParametersTemplate<int>::AssignValue(char const *,class type_info const
&,void *)const " (?AssignValue@?$AlgorithmParametersTemplate@H@CryptoPP@@UBEXPBDABVtype_info@@PAX@Z) [E:\projects\cpp-u
tils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: __thiscall CryptoPP::AlgorithmParameters::Algori
thmParameters(void)" (??0AlgorithmParameters@CryptoPP@@QAE@XZ) referenced in function "class CryptoPP::AlgorithmParamet
ers __cdecl CryptoPP::MakeParameters<class CryptoPP::ConstByteArrayParameter>(char const *,class CryptoPP::ConstByteArr
ayParameter const &,bool)" (??$MakeParameters@VConstByteArrayParameter@CryptoPP@@@CryptoPP@@YA?AVAlgorithmParameters@0@
PBDABVConstByteArrayParameter@0@_N@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: __thiscall CryptoPP::AlgorithmParameters::Algori
thmParameters(class CryptoPP::AlgorithmParameters const &)" (??0AlgorithmParameters@CryptoPP@@QAE@ABV01@@Z) referenced
in function "class CryptoPP::AlgorithmParameters __cdecl CryptoPP::MakeParameters<class CryptoPP::ConstByteArrayParamet
er>(char const *,class CryptoPP::ConstByteArrayParameter const &,bool)" (??$MakeParameters@VConstByteArrayParameter@Cry
ptoPP@@@CryptoPP@@YA?AVAlgorithmParameters@0@PBDABVConstByteArrayParameter@0@_N@Z) [E:\projects\cpp-utils\cryptopp-test
\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: __thiscall CryptoPP::Filter::Filter(class Crypto
PP::BufferedTransformation *)" (??0Filter@CryptoPP@@QAE@PAVBufferedTransformation@1@@Z) referenced in function "public:
__thiscall CryptoPP::Bufferless<class CryptoPP::Filter>::Bufferless<class CryptoPP::Filter>(void)" (??0?$Bufferless@VF
ilter@CryptoPP@@@CryptoPP@@QAE@XZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual class CryptoPP::BufferedTransformation *
__thiscall CryptoPP::Filter::AttachedTransformation(void)" (?AttachedTransformation@Filter@CryptoPP@@UAEPAVBufferedTra
nsformation@2@XZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual class CryptoPP::BufferedTransformation c
onst * __thiscall CryptoPP::Filter::AttachedTransformation(void)const " (?AttachedTransformation@Filter@CryptoPP@@UBEPB
VBufferedTransformation@2@XZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall CryptoPP::Filter::Detach
(class CryptoPP::BufferedTransformation *)" (?Detach@Filter@CryptoPP@@UAEXPAVBufferedTransformation@2@@Z) referenced in
function "public: __thiscall CryptoPP::BaseN_Encoder::BaseN_Encoder(class CryptoPP::BufferedTransformation *)" (??0Bas
eN_Encoder@CryptoPP@@QAE@PAVBufferedTransformation@1@@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxpr
oj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Filter
::TransferTo2(class CryptoPP::BufferedTransformation &,unsigned __int64 &,class std::basic_string<char,struct std::char
_traits<char>,class std::allocator<char> > const &,bool)" (?TransferTo2@Filter@CryptoPP@@UAEIAAVBufferedTransformation@
2@AA_KABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) [E:\projects\cpp-utils\cryptopp-test\build\
cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Filter
::CopyRangeTo2(class CryptoPP::BufferedTransformation &,unsigned __int64 &,unsigned __int64,class std::basic_string<cha
r,struct std::char_traits<char>,class std::allocator<char> > const &,bool)const " (?CopyRangeTo2@Filter@CryptoPP@@UBEIA
AVBufferedTransformation@2@AA_K_KABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) [E:\projects\cpp
-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::Filter::Initia
lize(class CryptoPP::NameValuePairs const &,int)" (?Initialize@Filter@CryptoPP@@UAEXABVNameValuePairs@2@H@Z) [E:\projec
ts\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::Filter::Flush(
bool,int,bool)" (?Flush@Filter@CryptoPP@@UAE_N_NH0@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::Filter::Messag
eSeriesEnd(int,bool)" (?MessageSeriesEnd@Filter@CryptoPP@@UAE_NH_N@Z) [E:\projects\cpp-utils\cryptopp-test\build\crypto
pp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "protected: virtual class CryptoPP::BufferedTransformatio
n * __thiscall CryptoPP::Filter::NewDefaultAttachment(void)const " (?NewDefaultAttachment@Filter@CryptoPP@@MBEPAVBuffer
edTransformation@2@XZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::FilterWithBuff
eredInput::IsolatedInitialize(class CryptoPP::NameValuePairs const &)" (?IsolatedInitialize@FilterWithBufferedInput@Cry
ptoPP@@UAEXABVNameValuePairs@2@@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::FilterWithBuff
eredInput::IsolatedFlush(bool,bool)" (?IsolatedFlush@FilterWithBufferedInput@CryptoPP@@UAE_N_N0@Z) [E:\projects\cpp-uti
ls\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CryptoPP::FilterWithB
ufferedInput::NextPutMultiple(unsigned char const *,unsigned int)" (?NextPutMultiple@FilterWithBufferedInput@CryptoPP@@
MAEXPBEI@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "protected: unsigned int __thiscall CryptoPP::FilterWithB
ufferedInput::PutMaybeModifiable(unsigned char *,unsigned int,int,bool,bool)" (?PutMaybeModifiable@FilterWithBufferedIn
put@CryptoPP@@IAEIPAEIH_N1@Z) referenced in function "public: virtual unsigned int __thiscall CryptoPP::FilterWithBuffe
redInput::Put2(unsigned char const *,unsigned int,int,bool)" (?Put2@FilterWithBufferedInput@CryptoPP@@UAEIPBEIH_N@Z) [E
:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: __thiscall CryptoPP::HashFilter::HashFilter(clas
s CryptoPP::HashTransformation &,class CryptoPP::BufferedTransformation *,bool,int,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,
class std::allocator<char> > const &)" (??0HashFilter@CryptoPP@@QAE@AAVHashTransformation@1@PAVBufferedTransformation@1
@_NHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@3@Z) referenced in function _main [E:\projects\cpp-
utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: __thiscall CryptoPP::ProxyFilter::ProxyFilter(cl
ass CryptoPP::BufferedTransformation *,unsigned int,unsigned int,class CryptoPP::BufferedTransformation *)" (??0ProxyFi
lter@CryptoPP@@QAE@PAVBufferedTransformation@1@II0@Z) referenced in function "public: __thiscall CryptoPP::SimpleProxyF
ilter::SimpleProxyFilter(class CryptoPP::BufferedTransformation *,class CryptoPP::BufferedTransformation *)" (??0Simple
ProxyFilter@CryptoPP@@QAE@PAVBufferedTransformation@1@0@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcx
proj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::ProxyFilter::I
solatedFlush(bool,bool)" (?IsolatedFlush@ProxyFilter@CryptoPP@@UAE_N_N0@Z) [E:\projects\cpp-utils\cryptopp-test\build\c
ryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::ProxyFilter::N
extPutMultiple(unsigned char const *,unsigned int)" (?NextPutMultiple@ProxyFilter@CryptoPP@@UAEXPBEI@Z) [E:\projects\cp
p-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::ProxyFilter::N
extPutModifiable(unsigned char *,unsigned int)" (?NextPutModifiable@ProxyFilter@CryptoPP@@UAEXPAEI@Z) [E:\projects\cpp-
utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::String
Store::TransferTo2(class CryptoPP::BufferedTransformation &,unsigned __int64 &,class std::basic_string<char,struct std:
:char_traits<char>,class std::allocator<char> > const &,bool)" (?TransferTo2@StringStore@CryptoPP@@UAEIAAVBufferedTrans
formation@2@AA_KABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) [E:\projects\cpp-utils\cryptopp-t
est\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::String
Store::CopyRangeTo2(class CryptoPP::BufferedTransformation &,unsigned __int64 &,unsigned __int64,class std::basic_strin
g<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)const " (?CopyRangeTo2@StringStore@Crypt
oPP@@UBEIAAVBufferedTransformation@2@AA_K_KABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) [E:\pr
ojects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "private: virtual void __thiscall CryptoPP::StringStore::
StoreInitialize(class CryptoPP::NameValuePairs const &)" (?StoreInitialize@StringStore@CryptoPP@@EAEXABVNameValuePairs@
2@@Z) referenced in function "public: __thiscall CryptoPP::StringStore::StringStore(char const *)" (??0StringStore@Cryp
toPP@@QAE@PBD@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::BaseN_Encoder:
:IsolatedInitialize(class CryptoPP::NameValuePairs const &)" (?IsolatedInitialize@BaseN_Encoder@CryptoPP@@UAEXABVNameVa
luePairs@2@@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::BaseN_
Encoder::Put2(unsigned char const *,unsigned int,int,bool)" (?Put2@BaseN_Encoder@CryptoPP@@UAEIPBEIH_N@Z) [E:\projects\
cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::Grouper::Isola
tedInitialize(class CryptoPP::NameValuePairs const &)" (?IsolatedInitialize@Grouper@CryptoPP@@UAEXABVNameValuePairs@2@@
Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Groupe
r::Put2(unsigned char const *,unsigned int,int,bool)" (?Put2@Grouper@CryptoPP@@UAEIPBEIH_N@Z) [E:\projects\cpp-utils\cr
yptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall CryptoPP::HexEncoder::Is
olatedInitialize(class CryptoPP::NameValuePairs const &)" (?IsolatedInitialize@HexEncoder@CryptoPP@@UAEXABVNameValuePai
rs@2@@Z) referenced in function "public: __thiscall CryptoPP::HexEncoder::HexEncoder(class CryptoPP::BufferedTransforma
tion *,bool,int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class s
td::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0HexEncoder@CryptoPP@@QAE
@PAVBufferedTransformation@1@_NHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2@Z) [E:\projects\cpp-u
tils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::IteratedHashBa
se<unsigned int,class CryptoPP::HashTransformation>::Update(unsigned char const *,unsigned int)" (?Update@?$IteratedHas
hBase@IVHashTransformation@CryptoPP@@@CryptoPP@@UAEXPBEI@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vc
xproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned char * __thiscall CryptoPP::Ite
ratedHashBase<unsigned int,class CryptoPP::HashTransformation>::CreateUpdateSpace(unsigned int &)" (?CreateUpdateSpace@
?$IteratedHashBase@IVHashTransformation@CryptoPP@@@CryptoPP@@UAEPAEAAI@Z) [E:\projects\cpp-utils\cryptopp-test\build\cr
yptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::IteratedHashBa
se<unsigned int,class CryptoPP::HashTransformation>::Restart(void)" (?Restart@?$IteratedHashBase@IVHashTransformation@C
ryptoPP@@@CryptoPP@@UAEXXZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::IteratedHashBa
se<unsigned int,class CryptoPP::HashTransformation>::TruncatedFinal(unsigned char *,unsigned int)" (?TruncatedFinal@?$I
teratedHashBase@IVHashTransformation@CryptoPP@@@CryptoPP@@UAEXPAEI@Z) [E:\projects\cpp-utils\cryptopp-test\build\crypto
pp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: static void __cdecl CryptoPP::SHA256::InitState(
unsigned int *)" (?InitState@SHA256@CryptoPP@@SAXPAI@Z) referenced in function "protected: virtual void __thiscall Cryp
toPP::IteratedHashWithStaticTransform<unsigned int,struct CryptoPP::EnumToType<enum CryptoPP::ByteOrder,1>,64,32,class
CryptoPP::SHA256,32,1>::Init(void)" (?Init@?$IteratedHashWithStaticTransform@IU?$EnumToType@W4ByteOrder@CryptoPP@@$00@C
ryptoPP@@$0EA@$0CA@VSHA256@2@$0CA@$00@CryptoPP@@MAEXXZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxpro
j]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: static void __cdecl CryptoPP::SHA256::Transform(
unsigned int *,unsigned int const *)" (?Transform@SHA256@CryptoPP@@SAXPAIPBI@Z) referenced in function "protected: virt
ual void __thiscall CryptoPP::IteratedHashWithStaticTransform<unsigned int,struct CryptoPP::EnumToType<enum CryptoPP::B
yteOrder,1>,64,32,class CryptoPP::SHA256,32,1>::HashEndianCorrectedBlock(unsigned int const *)" (?HashEndianCorrectedBl
ock@?$IteratedHashWithStaticTransform@IU?$EnumToType@W4ByteOrder@CryptoPP@@$00@CryptoPP@@$0EA@$0CA@VSHA256@2@$0CA@$00@C
ryptoPP@@MAEXPBI@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "protected: virtual unsigned int __thiscall CryptoPP::SHA
256::HashMultipleBlocks(unsigned int const *,unsigned int)" (?HashMultipleBlocks@SHA256@CryptoPP@@MAEIPBII@Z) [E:\proje
cts\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
E:\projects\cpp-utils\cryptopp-test\build\Debug\cryptopp-test.exe : fatal error LNK1120: 71 unresolved externals [E:\pr
ojects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
Done Building Project "E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj" (default targets) -- FAILED.
Done Building Project "E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj.metaproj" (default targets) -- F
AILED.
Done Building Project "E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.sln" (default targets) -- FAILED.
Build FAILED.
"E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.sln" (default target) (1) ->
"E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj.metaproj" (default target) (3) ->
"E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj" (default target) (4) ->
(Link target) ->
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: __thiscall CryptoPP::Algorithm::Algorithm(bool
)" (??0Algorithm@CryptoPP@@QAE@_N@Z) referenced in function "public: __thiscall CryptoPP::BufferedTransformation::Buffe
redTransformation(void)" (??0BufferedTransformation@CryptoPP@@QAE@XZ) [E:\projects\cpp-utils\cryptopp-test\build\crypto
pp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::HashTransfor
mation::TruncatedVerify(unsigned char const *,unsigned int)" (?TruncatedVerify@HashTransformation@CryptoPP@@UAE_NPBEI@Z
) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buff
eredTransformation::GetMaxWaitObjectCount(void)const " (?GetMaxWaitObjectCount@BufferedTransformation@CryptoPP@@UBEIXZ)
[E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::BufferedTran
sformation::GetWaitObjects(class CryptoPP::WaitObjectContainer &,class CryptoPP::CallStack const &)" (?GetWaitObjects@B
ufferedTransformation@CryptoPP@@UAEXAAVWaitObjectContainer@2@ABVCallStack@2@@Z) [E:\projects\cpp-utils\cryptopp-test\bu
ild\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::BufferedTran
sformation::Initialize(class CryptoPP::NameValuePairs const &,int)" (?Initialize@BufferedTransformation@CryptoPP@@UAEXA
BVNameValuePairs@2@H@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::BufferedTran
sformation::Flush(bool,int,bool)" (?Flush@BufferedTransformation@CryptoPP@@UAE_N_NH0@Z) [E:\projects\cpp-utils\cryptopp
-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::BufferedTran
sformation::MessageSeriesEnd(int,bool)" (?MessageSeriesEnd@BufferedTransformation@CryptoPP@@UAE_NH_N@Z) [E:\projects\cp
p-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned __int64 __thiscall CryptoPP::
BufferedTransformation::MaxRetrievable(void)const " (?MaxRetrievable@BufferedTransformation@CryptoPP@@UBE_KXZ) [E:\proj
ects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::BufferedTran
sformation::AnyRetrievable(void)const " (?AnyRetrievable@BufferedTransformation@CryptoPP@@UBE_NXZ) [E:\projects\cpp-uti
ls\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buff
eredTransformation::Get(unsigned char &)" (?Get@BufferedTransformation@CryptoPP@@UAEIAAE@Z) [E:\projects\cpp-utils\cryp
topp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buff
eredTransformation::Get(unsigned char *,unsigned int)" (?Get@BufferedTransformation@CryptoPP@@UAEIPAEI@Z) [E:\projects\
cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buff
eredTransformation::Peek(unsigned char &)const " (?Peek@BufferedTransformation@CryptoPP@@UBEIAAE@Z) [E:\projects\cpp-ut
ils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buff
eredTransformation::Peek(unsigned char *,unsigned int)const " (?Peek@BufferedTransformation@CryptoPP@@UBEIPAEI@Z) [E:\p
rojects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned __int64 __thiscall CryptoPP::
BufferedTransformation::Skip(unsigned __int64)" (?Skip@BufferedTransformation@CryptoPP@@UAE_K_K@Z) [E:\projects\cpp-uti
ls\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned __int64 __thiscall CryptoPP::
BufferedTransformation::TotalBytesRetrievable(void)const " (?TotalBytesRetrievable@BufferedTransformation@CryptoPP@@UBE
_KXZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buff
eredTransformation::NumberOfMessages(void)const " (?NumberOfMessages@BufferedTransformation@CryptoPP@@UBEIXZ) [E:\proje
cts\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::BufferedTran
sformation::AnyMessages(void)const " (?AnyMessages@BufferedTransformation@CryptoPP@@UBE_NXZ) [E:\projects\cpp-utils\cry
ptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::BufferedTran
sformation::GetNextMessage(void)" (?GetNextMessage@BufferedTransformation@CryptoPP@@UAE_NXZ) [E:\projects\cpp-utils\cry
ptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buff
eredTransformation::SkipMessages(unsigned int)" (?SkipMessages@BufferedTransformation@CryptoPP@@UAEII@Z) [E:\projects\c
pp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::BufferedTran
sformation::SkipAll(void)" (?SkipAll@BufferedTransformation@CryptoPP@@UAEXXZ) [E:\projects\cpp-utils\cryptopp-test\buil
d\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall CryptoPP::BufferedTran
sformation::TransferMessagesTo2(class CryptoPP::BufferedTransformation &,unsigned int &,class std::basic_string<char,st
ruct std::char_traits<char>,class std::allocator<char> > const &,bool)" (?TransferMessagesTo2@BufferedTransformation@Cr
yptoPP@@QAEIAAV12@AAIABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) referenced in function "publ
ic: virtual unsigned int __thiscall CryptoPP::SourceTemplate<class CryptoPP::StringStore>::PumpMessages2(unsigned int &
,bool)" (?PumpMessages2@?$SourceTemplate@VStringStore@CryptoPP@@@CryptoPP@@UAEIAAI_N@Z) [E:\projects\cpp-utils\cryptopp
-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: unsigned int __thiscall CryptoPP::BufferedTran
sformation::TransferAllTo2(class CryptoPP::BufferedTransformation &,class std::basic_string<char,struct std::char_trait
s<char>,class std::allocator<char> > const &,bool)" (?TransferAllTo2@BufferedTransformation@CryptoPP@@QAEIAAV12@ABV?$ba
sic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) referenced in function "public: virtual unsigned int __t
hiscall CryptoPP::SourceTemplate<class CryptoPP::StringStore>::PumpAll2(bool)" (?PumpAll2@?$SourceTemplate@VStringStore
@CryptoPP@@@CryptoPP@@UAEI_N@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned char * __thiscall CryptoPP::B
ufferedTransformation::ChannelCreatePutSpace(class std::basic_string<char,struct std::char_traits<char>,class std::allo
cator<char> > const &,unsigned int &)" (?ChannelCreatePutSpace@BufferedTransformation@CryptoPP@@UAEPAEABV?$basic_string
@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AAI@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buff
eredTransformation::ChannelPut2(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >
const &,unsigned char const *,unsigned int,int,bool)" (?ChannelPut2@BufferedTransformation@CryptoPP@@UAEIABV?$basic_st
ring@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBEIH_N@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.
vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Buff
eredTransformation::ChannelPutModifiable2(class std::basic_string<char,struct std::char_traits<char>,class std::allocat
or<char> > const &,unsigned char *,unsigned int,int,bool)" (?ChannelPutModifiable2@BufferedTransformation@CryptoPP@@UAE
IABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PAEIH_N@Z) [E:\projects\cpp-utils\cryptopp-test\build\
cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::BufferedTran
sformation::ChannelFlush(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const
&,bool,int,bool)" (?ChannelFlush@BufferedTransformation@CryptoPP@@UAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allo
cator@D@2@@std@@_NH1@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::BufferedTran
sformation::ChannelMessageSeriesEnd(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<cha
r> > const &,int,bool)" (?ChannelMessageSeriesEnd@BufferedTransformation@CryptoPP@@UAE_NABV?$basic_string@DU?$char_trai
ts@D@std@@V?$allocator@D@2@@std@@H_N@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::BufferedTran
sformation::SetRetrievalChannel(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >
const &)" (?SetRetrievalChannel@BufferedTransformation@CryptoPP@@UAEXABV?$basic_string@DU?$char_traits@D@std@@V?$alloc
ator@D@2@@std@@@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::BufferedTran
sformation::Attach(class CryptoPP::BufferedTransformation *)" (?Attach@BufferedTransformation@CryptoPP@@UAEXPAV12@@Z) [
E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "void * __cdecl CryptoPP::AlignedAllocate(unsigned int)
" (?AlignedAllocate@CryptoPP@@YAPAXI@Z) referenced in function "public: unsigned char * __thiscall CryptoPP::AllocatorW
ithCleanup<unsigned char,0>::allocate(unsigned int,void const *)" (?allocate@?$AllocatorWithCleanup@E$0A@@CryptoPP@@QAE
PAEIPBX@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "void __cdecl CryptoPP::AlignedDeallocate(void *)" (?Al
ignedDeallocate@CryptoPP@@YAXPAX@Z) referenced in function "public: void __thiscall CryptoPP::AllocatorWithCleanup<unsi
gned char,0>::deallocate(void *,unsigned int)" (?deallocate@?$AllocatorWithCleanup@E$0A@@CryptoPP@@QAEXPAXI@Z) [E:\proj
ects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "void * __cdecl CryptoPP::UnalignedAllocate(unsigned in
t)" (?UnalignedAllocate@CryptoPP@@YAPAXI@Z) referenced in function "public: unsigned char * __thiscall CryptoPP::Alloca
torWithCleanup<unsigned char,0>::allocate(unsigned int,void const *)" (?allocate@?$AllocatorWithCleanup@E$0A@@CryptoPP@
@QAEPAEIPBX@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "void __cdecl CryptoPP::UnalignedDeallocate(void *)" (?
UnalignedDeallocate@CryptoPP@@YAXPAX@Z) referenced in function "public: void __thiscall CryptoPP::AllocatorWithCleanup<
unsigned char,0>::deallocate(void *,unsigned int)" (?deallocate@?$AllocatorWithCleanup@E$0A@@CryptoPP@@QAEXPAXI@Z) [E:\
projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::Store::GetNe
xtMessage(void)" (?GetNextMessage@Store@CryptoPP@@UAE_NXZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcx
proj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "bool __cdecl CryptoPP::AssignIntToInteger(class type_i
nfo const &,void *,void const *)" (?AssignIntToInteger@CryptoPP@@YA_NABVtype_info@@PAXPBX@Z) referenced in function "pu
blic: virtual void __thiscall CryptoPP::AlgorithmParametersTemplate<int>::AssignValue(char const *,class type_info cons
t &,void *)const " (?AssignValue@?$AlgorithmParametersTemplate@H@CryptoPP@@UBEXPBDABVtype_info@@PAX@Z) [E:\projects\cpp
-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: __thiscall CryptoPP::AlgorithmParameters::Algo
rithmParameters(void)" (??0AlgorithmParameters@CryptoPP@@QAE@XZ) referenced in function "class CryptoPP::AlgorithmParam
eters __cdecl CryptoPP::MakeParameters<class CryptoPP::ConstByteArrayParameter>(char const *,class CryptoPP::ConstByteA
rrayParameter const &,bool)" (??$MakeParameters@VConstByteArrayParameter@CryptoPP@@@CryptoPP@@YA?AVAlgorithmParameters@
0@PBDABVConstByteArrayParameter@0@_N@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: __thiscall CryptoPP::AlgorithmParameters::Algo
rithmParameters(class CryptoPP::AlgorithmParameters const &)" (??0AlgorithmParameters@CryptoPP@@QAE@ABV01@@Z) reference
d in function "class CryptoPP::AlgorithmParameters __cdecl CryptoPP::MakeParameters<class CryptoPP::ConstByteArrayParam
eter>(char const *,class CryptoPP::ConstByteArrayParameter const &,bool)" (??$MakeParameters@VConstByteArrayParameter@C
ryptoPP@@@CryptoPP@@YA?AVAlgorithmParameters@0@PBDABVConstByteArrayParameter@0@_N@Z) [E:\projects\cpp-utils\cryptopp-te
st\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: __thiscall CryptoPP::Filter::Filter(class Cryp
toPP::BufferedTransformation *)" (??0Filter@CryptoPP@@QAE@PAVBufferedTransformation@1@@Z) referenced in function "publi
c: __thiscall CryptoPP::Bufferless<class CryptoPP::Filter>::Bufferless<class CryptoPP::Filter>(void)" (??0?$Bufferless@
VFilter@CryptoPP@@@CryptoPP@@QAE@XZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual class CryptoPP::BufferedTransformation
* __thiscall CryptoPP::Filter::AttachedTransformation(void)" (?AttachedTransformation@Filter@CryptoPP@@UAEPAVBufferedT
ransformation@2@XZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual class CryptoPP::BufferedTransformation
const * __thiscall CryptoPP::Filter::AttachedTransformation(void)const " (?AttachedTransformation@Filter@CryptoPP@@UBE
PBVBufferedTransformation@2@XZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall CryptoPP::Filter::Deta
ch(class CryptoPP::BufferedTransformation *)" (?Detach@Filter@CryptoPP@@UAEXPAVBufferedTransformation@2@@Z) referenced
in function "public: __thiscall CryptoPP::BaseN_Encoder::BaseN_Encoder(class CryptoPP::BufferedTransformation *)" (??0B
aseN_Encoder@CryptoPP@@QAE@PAVBufferedTransformation@1@@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcx
proj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Filt
er::TransferTo2(class CryptoPP::BufferedTransformation &,unsigned __int64 &,class std::basic_string<char,struct std::ch
ar_traits<char>,class std::allocator<char> > const &,bool)" (?TransferTo2@Filter@CryptoPP@@UAEIAAVBufferedTransformatio
n@2@AA_KABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) [E:\projects\cpp-utils\cryptopp-test\buil
d\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Filt
er::CopyRangeTo2(class CryptoPP::BufferedTransformation &,unsigned __int64 &,unsigned __int64,class std::basic_string<c
har,struct std::char_traits<char>,class std::allocator<char> > const &,bool)const " (?CopyRangeTo2@Filter@CryptoPP@@UBE
IAAVBufferedTransformation@2@AA_K_KABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) [E:\projects\c
pp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::Filter::Init
ialize(class CryptoPP::NameValuePairs const &,int)" (?Initialize@Filter@CryptoPP@@UAEXABVNameValuePairs@2@H@Z) [E:\proj
ects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::Filter::Flus
h(bool,int,bool)" (?Flush@Filter@CryptoPP@@UAE_N_NH0@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxpro
j]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::Filter::Mess
ageSeriesEnd(int,bool)" (?MessageSeriesEnd@Filter@CryptoPP@@UAE_NH_N@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryp
topp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "protected: virtual class CryptoPP::BufferedTransformat
ion * __thiscall CryptoPP::Filter::NewDefaultAttachment(void)const " (?NewDefaultAttachment@Filter@CryptoPP@@MBEPAVBuff
eredTransformation@2@XZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::FilterWithBu
fferedInput::IsolatedInitialize(class CryptoPP::NameValuePairs const &)" (?IsolatedInitialize@FilterWithBufferedInput@C
ryptoPP@@UAEXABVNameValuePairs@2@@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::FilterWithBu
fferedInput::IsolatedFlush(bool,bool)" (?IsolatedFlush@FilterWithBufferedInput@CryptoPP@@UAE_N_N0@Z) [E:\projects\cpp-u
tils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall CryptoPP::FilterWit
hBufferedInput::NextPutMultiple(unsigned char const *,unsigned int)" (?NextPutMultiple@FilterWithBufferedInput@CryptoPP
@@MAEXPBEI@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "protected: unsigned int __thiscall CryptoPP::FilterWit
hBufferedInput::PutMaybeModifiable(unsigned char *,unsigned int,int,bool,bool)" (?PutMaybeModifiable@FilterWithBuffered
Input@CryptoPP@@IAEIPAEIH_N1@Z) referenced in function "public: virtual unsigned int __thiscall CryptoPP::FilterWithBuf
feredInput::Put2(unsigned char const *,unsigned int,int,bool)" (?Put2@FilterWithBufferedInput@CryptoPP@@UAEIPBEIH_N@Z)
[E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: __thiscall CryptoPP::HashFilter::HashFilter(cl
ass CryptoPP::HashTransformation &,class CryptoPP::BufferedTransformation *,bool,int,class std::basic_string<char,struc
t std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char
>,class std::allocator<char> > const &)" (??0HashFilter@CryptoPP@@QAE@AAVHashTransformation@1@PAVBufferedTransformation
@1@_NHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@3@Z) referenced in function _main [E:\projects\cp
p-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: __thiscall CryptoPP::ProxyFilter::ProxyFilter(
class CryptoPP::BufferedTransformation *,unsigned int,unsigned int,class CryptoPP::BufferedTransformation *)" (??0Proxy
Filter@CryptoPP@@QAE@PAVBufferedTransformation@1@II0@Z) referenced in function "public: __thiscall CryptoPP::SimpleProx
yFilter::SimpleProxyFilter(class CryptoPP::BufferedTransformation *,class CryptoPP::BufferedTransformation *)" (??0Simp
leProxyFilter@CryptoPP@@QAE@PAVBufferedTransformation@1@0@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.v
cxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall CryptoPP::ProxyFilter:
:IsolatedFlush(bool,bool)" (?IsolatedFlush@ProxyFilter@CryptoPP@@UAE_N_N0@Z) [E:\projects\cpp-utils\cryptopp-test\build
\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::ProxyFilter:
:NextPutMultiple(unsigned char const *,unsigned int)" (?NextPutMultiple@ProxyFilter@CryptoPP@@UAEXPBEI@Z) [E:\projects\
cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::ProxyFilter:
:NextPutModifiable(unsigned char *,unsigned int)" (?NextPutModifiable@ProxyFilter@CryptoPP@@UAEXPAEI@Z) [E:\projects\cp
p-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Stri
ngStore::TransferTo2(class CryptoPP::BufferedTransformation &,unsigned __int64 &,class std::basic_string<char,struct st
d::char_traits<char>,class std::allocator<char> > const &,bool)" (?TransferTo2@StringStore@CryptoPP@@UAEIAAVBufferedTra
nsformation@2@AA_KABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) [E:\projects\cpp-utils\cryptopp
-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Stri
ngStore::CopyRangeTo2(class CryptoPP::BufferedTransformation &,unsigned __int64 &,unsigned __int64,class std::basic_str
ing<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)const " (?CopyRangeTo2@StringStore@Cry
ptoPP@@UBEIAAVBufferedTransformation@2@AA_K_KABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_N@Z) [E:\
projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "private: virtual void __thiscall CryptoPP::StringStore
::StoreInitialize(class CryptoPP::NameValuePairs const &)" (?StoreInitialize@StringStore@CryptoPP@@EAEXABVNameValuePair
s@2@@Z) referenced in function "public: __thiscall CryptoPP::StringStore::StringStore(char const *)" (??0StringStore@Cr
yptoPP@@QAE@PBD@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::BaseN_Encode
r::IsolatedInitialize(class CryptoPP::NameValuePairs const &)" (?IsolatedInitialize@BaseN_Encoder@CryptoPP@@UAEXABVName
ValuePairs@2@@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Base
N_Encoder::Put2(unsigned char const *,unsigned int,int,bool)" (?Put2@BaseN_Encoder@CryptoPP@@UAEIPBEIH_N@Z) [E:\project
s\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::Grouper::Iso
latedInitialize(class CryptoPP::NameValuePairs const &)" (?IsolatedInitialize@Grouper@CryptoPP@@UAEXABVNameValuePairs@2
@@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall CryptoPP::Grou
per::Put2(unsigned char const *,unsigned int,int,bool)" (?Put2@Grouper@CryptoPP@@UAEIPBEIH_N@Z) [E:\projects\cpp-utils\
cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: virtual void __thiscall CryptoPP::HexEncoder::
IsolatedInitialize(class CryptoPP::NameValuePairs const &)" (?IsolatedInitialize@HexEncoder@CryptoPP@@UAEXABVNameValueP
airs@2@@Z) referenced in function "public: __thiscall CryptoPP::HexEncoder::HexEncoder(class CryptoPP::BufferedTransfor
mation *,bool,int,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class
std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (??0HexEncoder@CryptoPP@@Q
AE@PAVBufferedTransformation@1@_NHABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2@Z) [E:\projects\cpp
-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::IteratedHash
Base<unsigned int,class CryptoPP::HashTransformation>::Update(unsigned char const *,unsigned int)" (?Update@?$IteratedH
ashBase@IVHashTransformation@CryptoPP@@@CryptoPP@@UAEXPBEI@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.
vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual unsigned char * __thiscall CryptoPP::I
teratedHashBase<unsigned int,class CryptoPP::HashTransformation>::CreateUpdateSpace(unsigned int &)" (?CreateUpdateSpac
e@?$IteratedHashBase@IVHashTransformation@CryptoPP@@@CryptoPP@@UAEPAEAAI@Z) [E:\projects\cpp-utils\cryptopp-test\build\
cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::IteratedHash
Base<unsigned int,class CryptoPP::HashTransformation>::Restart(void)" (?Restart@?$IteratedHashBase@IVHashTransformation
@CryptoPP@@@CryptoPP@@UAEXXZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall CryptoPP::IteratedHash
Base<unsigned int,class CryptoPP::HashTransformation>::TruncatedFinal(unsigned char *,unsigned int)" (?TruncatedFinal@?
$IteratedHashBase@IVHashTransformation@CryptoPP@@@CryptoPP@@UAEXPAEI@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryp
topp-test.vcxproj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: static void __cdecl CryptoPP::SHA256::InitStat
e(unsigned int *)" (?InitState@SHA256@CryptoPP@@SAXPAI@Z) referenced in function "protected: virtual void __thiscall Cr
yptoPP::IteratedHashWithStaticTransform<unsigned int,struct CryptoPP::EnumToType<enum CryptoPP::ByteOrder,1>,64,32,clas
s CryptoPP::SHA256,32,1>::Init(void)" (?Init@?$IteratedHashWithStaticTransform@IU?$EnumToType@W4ByteOrder@CryptoPP@@$00
@CryptoPP@@$0EA@$0CA@VSHA256@2@$0CA@$00@CryptoPP@@MAEXXZ) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxp
roj]
cryptopp-test.obj : error LNK2019: unresolved external symbol "public: static void __cdecl CryptoPP::SHA256::Transfor
m(unsigned int *,unsigned int const *)" (?Transform@SHA256@CryptoPP@@SAXPAIPBI@Z) referenced in function "protected: vi
rtual void __thiscall CryptoPP::IteratedHashWithStaticTransform<unsigned int,struct CryptoPP::EnumToType<enum CryptoPP:
:ByteOrder,1>,64,32,class CryptoPP::SHA256,32,1>::HashEndianCorrectedBlock(unsigned int const *)" (?HashEndianCorrected
Block@?$IteratedHashWithStaticTransform@IU?$EnumToType@W4ByteOrder@CryptoPP@@$00@CryptoPP@@$0EA@$0CA@VSHA256@2@$0CA@$00
@CryptoPP@@MAEXPBI@Z) [E:\projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
cryptopp-test.obj : error LNK2001: unresolved external symbol "protected: virtual unsigned int __thiscall CryptoPP::S
HA256::HashMultipleBlocks(unsigned int const *,unsigned int)" (?HashMultipleBlocks@SHA256@CryptoPP@@MAEIPBII@Z) [E:\pro
jects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
E:\projects\cpp-utils\cryptopp-test\build\Debug\cryptopp-test.exe : fatal error LNK1120: 71 unresolved externals [E:\
projects\cpp-utils\cryptopp-test\build\cryptopp-test.vcxproj]
0 Warning(s)
72 Error(s)
Time Elapsed 00:00:02.82
```
However if I'll try to build this code (below) using the same steps (and CMakeList.txt) as above, everything is fine.
```
#include <iostream>
#include <cryptopp/aes.h>
int main() {
std::cout << "key length: " << CryptoPP::AES::DEFAULT_KEYLENGTH << std::endl;
std::cout << "key length (min): " << CryptoPP::AES::MIN_KEYLENGTH << std::endl;
std::cout << "key length (max): " << CryptoPP::AES::MAX_KEYLENGTH << std::endl;
std::cout << "block size: " << CryptoPP::AES::BLOCKSIZE << std::endl;
return 0;
}
```
I'm really confused. Did I build the CryptoPP wrong (if so, then why I'm able to print the key lenghts?)?
| Hashing, encrypting, basically everything failing to build, except AES::DEFAULT_KEYLENGTH print to the console | https://api.github.com/repos/weidai11/cryptopp/issues/651/comments | 2 | 2018-05-01T11:31:48Z | 2018-05-01T17:27:51Z | https://github.com/weidai11/cryptopp/issues/651 | 319,176,568 | 651 |
[
"weidai11",
"cryptopp"
] | Crypto++ 7.0.0, twice in gcm-simd.cpp:
ANONYMOUS_NAMESPACE_BEGIN
CRYPTOPP_ALIGN_DATA(16)
const word64 s_clmulConstants64[] = {
W64LIT(0xe100000000000000), W64LIT(0xc200000000000000), // Used for ARM and x86; polynomial coefficients
W64LIT(0x08090a0b0c0d0e0f), W64LIT(0x0001020304050607), // Unused for ARM; used for x86 _mm_shuffle_epi8
W64LIT(0x0001020304050607), W64LIT(0x08090a0b0c0d0e0f) // Unused for ARM; used for x86 _mm_shuffle_epi8
};
const uint64x2_t *s_clmulConstants = (const uint64x2_t *)s_clmulConstants64;
const unsigned int s_clmulTableSizeInBlocks = 8;
ANONYMOUS_NAMESPACE_END
`s_clmulConstants` ought to be declared `const` here, by adding a second `const` after the `*`. This would also obviate the need for the anonymous namespace, because `const` non-`volatile` variables are implicitly `static` in C++. | s_clmulConstants should be declared "const" | https://api.github.com/repos/weidai11/cryptopp/issues/650/comments | 2 | 2018-04-30T19:32:23Z | 2018-05-08T01:23:34Z | https://github.com/weidai11/cryptopp/issues/650 | 319,007,742 | 650 |
[
"weidai11",
"cryptopp"
] | ### Crypto++ Issue Report
Windows 7 - Windows 10 latest x64
Crypto++ 7.0.0
Compiled with Visual Studio 2017 latest version as of this writing (15.6.7) via cryptest.sln
(Building everything exactly the same with Visual Studio 2013 version 12.0.40629.00 Update 5 or Visual Studio 2015 Update 3, this bug does not happen)
After building either the dll or static library in Release x64 mode (Debug mode is fine, as are both Win32 builds), running dlltest.exe/cryptest.exe on a CPU with AES-NI instructions passes the AES tests, but when run on a CPU without AES-NI instructions the AES test fails (due to completely wrong output bytes). This can also be simulated on AES-NI CPUs by just setting g_AESNI = false; in DetectX86Features instead of reading it from CPUID.
| Windows and incorrect results for AES when used on CPUs without AES-NI | https://api.github.com/repos/weidai11/cryptopp/issues/649/comments | 14 | 2018-04-30T16:19:22Z | 2018-11-06T04:47:52Z | https://github.com/weidai11/cryptopp/issues/649 | 318,949,346 | 649 |
[
"weidai11",
"cryptopp"
] | https://github.com/weidai11/cryptopp/blob/55071c49c1dfdbc0b85a1c604bcd2298f92fa61d/misc.h#L290
https://github.com/weidai11/cryptopp/blob/55071c49c1dfdbc0b85a1c604bcd2298f92fa61d/misc.h#L311
https://github.com/weidai11/cryptopp/blob/55071c49c1dfdbc0b85a1c604bcd2298f92fa61d/misc.h#L312
The third parameter `instance` is never used in the library and could be removed.
Compilation and test run were successful. | Unused parameter in Singleton | https://api.github.com/repos/weidai11/cryptopp/issues/648/comments | 3 | 2018-04-28T22:20:26Z | 2018-05-06T04:37:34Z | https://github.com/weidai11/cryptopp/issues/648 | 318,672,833 | 648 |
[
"weidai11",
"cryptopp"
] | With the WebAssembly (http://webassembly.org/) standard now officially released and support in all major browsers, it would be really awesome if we could officially compile cryptopp with the emscripten SDK to create wasm binaries.
Im no expert on the matter, but it should not be any more complicated that supporting any new compiler - leave out any architecture optimizations and it (should) work?
| Feature: WASM/emscripten support | https://api.github.com/repos/weidai11/cryptopp/issues/647/comments | 4 | 2018-04-26T08:39:15Z | 2018-06-10T17:45:57Z | https://github.com/weidai11/cryptopp/issues/647 | 317,930,122 | 647 |
[
"weidai11",
"cryptopp"
] | I follow the guide of cross-compiling Crypto++ on the command line for Android. https://www.cryptopp.com/wiki/Android_(Command_Line), But I couldn't build successfully.
Here's the errors.
```
In file included from /opt/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/postypes.h:40:0,
from /opt/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/char_traits.h:40,
from /opt/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/string:40,
from stdcpp.h:14,
from cryptlib.h:103,
from cryptlib.cpp:18:
/opt/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/include/cwchar:44:19: fatal error: wchar.h: No such file or directory
#include <wchar.h>
```
System (Centos 7 x64)
Version (6.1.0)
| Build failure on Android | https://api.github.com/repos/weidai11/cryptopp/issues/645/comments | 3 | 2018-04-23T06:23:03Z | 2018-04-26T11:11:31Z | https://github.com/weidai11/cryptopp/issues/645 | 316,677,113 | 645 |
[
"weidai11",
"cryptopp"
] | OS: Win 8.1 Pro 64-bit
Crypto++ Version: 7.0 / current master
The issue I see is in the block cipher algorithms SIMON and SPECK.
Here are 'ProcessAndXorBlock' and 'AdvancedProcessBlocks' inside the protected modifier of the class.
IMO this should be public instead like in the class 'BlockTransformation'. | Access modifier in SIMON and SPECK | https://api.github.com/repos/weidai11/cryptopp/issues/643/comments | 1 | 2018-04-19T07:47:38Z | 2018-04-21T00:55:18Z | https://github.com/weidai11/cryptopp/issues/643 | 315,763,360 | 643 |
[
"weidai11",
"cryptopp"
] | * Windows 8.1 x64, Windows Server 2016
* Crypto++ library - Master
* Visual Studio 2017
* Running _crypttest_ after building the provided solution, `Debug|Win32` configuration
After executing the first block in `ValidateRSA()` (lines 292-324) heap profiler showed 2 heap allocations still not freed.
Another application also warned about a memory leak when exiting (using CRT heap debug),
Block allocation number suggested that the problem could originate in pubkey.cpp, lines 98, 114:
`const MessageEncodingInterface &encoding = GetMessageEncodingInterface();`
The object created with this call would never be deleted. | Memory leak in ValidateRSA() | https://api.github.com/repos/weidai11/cryptopp/issues/642/comments | 8 | 2018-04-16T12:33:55Z | 2018-04-29T09:35:05Z | https://github.com/weidai11/cryptopp/issues/642 | 314,630,507 | 642 |
[
"weidai11",
"cryptopp"
] | First of all, thank you very much for your great work. I found a performance issue in your scrypt implementation. If you run with multiple threads but set `parallelization` to 1 (parallelization < threads), OpenMP will allocate unnecessary memory. The problem is that you spawn x threads with `#pragma omp parallel ` and use only `parallel` (variable) many threads for work. That means you have `(blockSize * 256U + blockSize * cost * 128U) * max{0, threads - parallelization}` unnecessary memory allocated.
**Source:**
https://github.com/weidai11/cryptopp/blob/bdd0f02867ff843be25c284258d3256a48e41cb1/scrypt.cpp#L249
#### Example
```
$ OMP_NUM_THREADS=1 ./scrypt_bench -i 20 -m 8 -p 1
Scrypt::DeriveKey
Enter omp parallel
Enter omp for
2.610s
$ OMP_NUM_THREADS=8 ./scrypt_bench -i 20 -m 8 -p 1
Scrypt::DeriveKey
Enter omp parallel
Enter omp parallel
Enter omp parallel
Enter omp parallel
Enter omp parallel
Enter omp parallel
Enter omp parallel
Enter omp parallel
Enter omp for
3.664s
```
### Information
- Fedora 27 x64
- g++ 7 with OpenMP v4.5
- Crypto++ v7.1 (master)
| scrypt: unnecessary memory allocation | https://api.github.com/repos/weidai11/cryptopp/issues/641/comments | 6 | 2018-04-14T09:43:32Z | 2018-05-20T19:04:31Z | https://github.com/weidai11/cryptopp/issues/641 | 314,315,342 | 641 |
[
"weidai11",
"cryptopp"
] | Lets assume, we want to test vector nr 5 given in https://www.cryptopp.com/w/images/3/3a/GCM-AEAD-Test.zip
>KEY 404142434445464748494a4b4c4d4e4f505152535455565758595a5b5c5d5e5f
>IV 101112131415161718191a1b
>HDR 000102030405060708090a0b0c0d0e0f10111213
> PTX 202122232425262728292a2b2c2d2e2f3031323334353637
> CTX 591b1ff272b43204868ffc7bc7d521993526b6fa32247c3c
> TAG 7de12a5670e570d8cae624a16df09c08
How to modify the "driver.cpp" file, to just DECODE the CTX and (possibly) test against given PTX?
I just entered Key and IV as "byte" and AAD, Cipher, GHASH as "string"
```
byte key[ 32] = {
0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50,
0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f
};
byte iv[ 12] = {
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b
};
//*/
string adata = "000102030405060708090a0b0c0d0e0f10111213";
//Problem: This are 40 letters ~ 40 Bytes, not 20 Bytes, as suggested.
string enc = "591b1ff272b43204868ffc7bc7d521993526b6fa32247c3c";
string mac = "7de12a5670e570d8cae624a16df09c08"; // 32 Byte, instead of 16
```
But this encurages alot of errors.
**Edit**
If someone needs to split those hex-strings, here is a small Sagemath snippet
```
string = "7de12a5670e570d8cae624a16df09c08"
out=""
for i in range(len(string)/2):
if(i!=0):
out += ", "
out += "0x" + string[2*i] + string[2*i+1]
print out + "\n"
print len(string)
``` | AES-256-GCM: How to fill in other Test-Examples | https://api.github.com/repos/weidai11/cryptopp/issues/639/comments | 1 | 2018-04-12T12:39:41Z | 2018-04-12T18:08:40Z | https://github.com/weidai11/cryptopp/issues/639 | 313,709,188 | 639 |
[
"weidai11",
"cryptopp"
] | I'm trying to compile this test:
https://www.cryptopp.com/w/images/3/3a/GCM-AEAD-Test.zip
**Information for my directory**
C(dir)
---cryptopp_include(dir)
------ all *.h from version 7.0
------gcm_test(dir)
--------- stdatfx.h and targetver.h
---lib(dir)
------- libcryptopp.a (buildwith gcc 5.6 on Ubuntu 16.0.4 LTS)
makefile
aes.cc
**Build with**
> g++ -W -O3 aes.cc -o"aes.exe" -L./lib/ -lcryptopp
(aes.cc contains the "driver" decryption stuff.
**Questions**
Problem 1: Compilation through MinGW doesnt work.
Problem 2: Can't modify "AAD" or the Ciphertext.
**Edit: (partly)Solution for Problem 1**
Compiling through Ubuntu in VM. We need to erase the call for "windows.h" and "tchar.h" (since it is windows only..) with a further typedef of byte (which is missing). (typedef unsigned char byte;)
Compiling will be done through g++ from paket "build_essential" from source "install". (sudo apt-get install build_essential).
**Edit2: Problem2 is open**
It is compilable, as I described before. But, if I enter an 16-Byte hex string (32 letters) it fails. So I need a "how to" for filling in data different from 0. How about the vector 4?
>VEC 0004
>KEY fb7615b23d80891dd470980bc79584c8b2fb64ce60978f4d17fce45a49e830b7
>IV dbd1a3636024b7b402da7d6f
>PTX a845348ec8c5b5f126f50e76fefd1b1e
>CTX 5df5d1fabcbbdd051538252444178704
>TAG 4c43cce5a574d8a88b43d4353bd60f9f | Compilation through g++ form MinGW and editing data for AEAD AES-256-GCM. | https://api.github.com/repos/weidai11/cryptopp/issues/638/comments | 1 | 2018-04-12T09:56:28Z | 2018-04-12T18:48:42Z | https://github.com/weidai11/cryptopp/issues/638 | 313,656,169 | 638 |
[
"weidai11",
"cryptopp"
] | Clang is now the default NDK compiler for Android. Support for GCC has stopped.
Looking at [Android (Command Line)](https://www.cryptopp.com/wiki/Android_(Command_Line)), it looks like there is no support to compile Crypto++ for Android using Clang. `setenv-android.sh` should support compiling with Clang.
Also see [Android NDK, Revision 16b (December 2017)](https://developer.android.com/ndk/downloads/revision_history.html). | CLang support for android | https://api.github.com/repos/weidai11/cryptopp/issues/637/comments | 10 | 2018-04-12T06:39:32Z | 2019-02-09T12:50:47Z | https://github.com/weidai11/cryptopp/issues/637 | 313,595,128 | 637 |
[
"weidai11",
"cryptopp"
] | `c++ -c sha.cpp -arch i386` is failing to build with the following error:
```
sha.cpp:1005:5: error: invalid operand for instruction
ASJ( jnz, 0, b)
^
./cpu.h:623:23: note: expanded from macro 'ASJ'
#define ASJ(x, y, z) GNU_ASJ(x, y, z)
^
./cpu.h:617:27: note: expanded from macro 'GNU_ASJ'
#define GNU_ASJ(x, y, z) #x " " #y #z ";" NEW_LINE
^
<scratch space>:105:2: note: expanded from here
"jnz"
^
<inline asm>:80:1: note: instantiated into assembly here
jnz 0b;
^
```
64-bit builds work. The clang version is:
`Apple LLVM version 9.1.0 (clang-902.0.39.1)`
vmac.cpp fails with the same error.
I presume this is a bug with clang? | OS X compile failures with Clang from Xcode 9.3 for 32-bit | https://api.github.com/repos/weidai11/cryptopp/issues/636/comments | 13 | 2018-04-10T14:17:38Z | 2018-05-15T17:32:30Z | https://github.com/weidai11/cryptopp/issues/636 | 312,943,607 | 636 |
[
"weidai11",
"cryptopp"
] | When trying to build CryptoPP 6.1.0 as part of a static library in Xcode 9.3 I get the error message: `Invalid operand for instruction`. ( `sha.cpp`, lines 1005, 1008, 1039, 1050 )
This happens when building for the Simulator with release configuration and deployment target set to iOS 10.0 or below.
I'm running macOS 10.13.4
Please see attached test case
[CryptoppTest.zip](https://github.com/weidai11/cryptopp/files/1879331/CryptoppTest.zip)
| Unable to build CrypoPP in release in Xcode 9.3 | https://api.github.com/repos/weidai11/cryptopp/issues/635/comments | 3 | 2018-04-05T09:19:07Z | 2018-04-05T19:21:44Z | https://github.com/weidai11/cryptopp/issues/635 | 311,532,811 | 635 |
[
"weidai11",
"cryptopp"
] | `cryptlib.h` puts the following in an anonymous namespace:
const NullNameValuePairs s_nullNameValuePairs;
We should not use anonymous namespaces in header files.
This is labelled as an enhancement only because we have not gotten a warning from a tool. We sidestepped trouble because of the header guard. The symbol only appeared once in a translation unit. | Don't use anonymous namespace for s_nullNameValuePairs | https://api.github.com/repos/weidai11/cryptopp/issues/631/comments | 0 | 2018-04-02T07:09:37Z | 2018-04-02T09:24:59Z | https://github.com/weidai11/cryptopp/issues/631 | 310,413,980 | 631 |
[
"weidai11",
"cryptopp"
] | Several algorithms, like CryptoBox and Scrpyt, require access to the core Salsa20 transform. The current Crypto++ code does not lend itself to disgorging the Salsa20 cipher from the Salsa20 core transformation.
We have two options. First we need a function that uses `Salsa20::Encryption` that is *also* a firend so it can manipulate the full state array. Second, we provide a freestanding `Salsa20_Core` with customary accelerations.
Salsa20 is kind of messy with its inline assembly. I'm opt'ing for a freestanding function. | Add Salsa20_Core transform | https://api.github.com/repos/weidai11/cryptopp/issues/630/comments | 0 | 2018-04-02T06:57:51Z | 2018-04-02T07:55:05Z | https://github.com/weidai11/cryptopp/issues/630 | 310,411,911 | 630 |
[
"weidai11",
"cryptopp"
] | Add scrypt key derivation function | Add scrypt key derivation function | https://api.github.com/repos/weidai11/cryptopp/issues/613/comments | 1 | 2018-03-31T05:53:58Z | 2018-04-01T10:55:15Z | https://github.com/weidai11/cryptopp/issues/613 | 310,215,446 | 613 |
[
"weidai11",
"cryptopp"
] | This has been a long time coming... We have not really moved forward into the newer password hashing algorithms because we lacked the infrastructure to do so. In the old days we only needed to manage salts and iteration counts. Nowadays we have several additional parameters, like hardness factors.
The additional parameters beg for a `KeyDerivationFunction` interface that accepts a `NameValuepairs` to pass arbitrary parameters in an extensible way. While not readily apparent, a `KeyDerivationFunction` interface also provides unified testing of the algorithms using test vectors. The base interface allows us to provide factory methods to create a KDF without the need of knowing a particular constructor. The KDF is then configured using `NameValuepairs`.
This ticket will track the addition of the `KeyDerivationFunction` interface and the associated changes for existing KDF's and PBKDF's. | Add KeyDerivationFunction interface | https://api.github.com/repos/weidai11/cryptopp/issues/610/comments | 9 | 2018-03-28T19:15:49Z | 2018-03-30T18:12:45Z | https://github.com/weidai11/cryptopp/issues/610 | 309,495,501 | 610 |
[
"weidai11",
"cryptopp"
] | The NaCl gear uses signed words in some places to help with const-time-ness. The types include `int32_t` and `int64_t`. This presents a small problem because we don't have typedefs set up for `signed word32` and `signed word64`.
Usually we can just include `<stdint.h>` to `<cstdint>` and get the types. However, Microsoft does not supply the header we need until about VS2012. There are reports they are available with VS2010 but testing shows it may require an SDK, and not VS2010. And we are completely out of luck for VS2008.
This ticket will track the additions of `sbyte`, `sword16`, `sword32` and `sword64`.
The other option is to typedef `int32_t` and `int64_t` when needed. That risks breaking a compile when we typedef a `int32_t` or `int64_t` to one type, and another program or library uses a different type. | Add typedefs for int32_t and int64_t types | https://api.github.com/repos/weidai11/cryptopp/issues/609/comments | 1 | 2018-03-28T00:17:57Z | 2018-03-28T02:56:31Z | https://github.com/weidai11/cryptopp/issues/609 | 309,177,791 | 609 |
[
"weidai11",
"cryptopp"
] | Based on [cryptopp610 compilation issue in Visual Studio 2010](https://groups.google.com/d/msg/cryptopp-users/2adounqeh-E/5iN3ti8MBQAJ) from the mailing list. Windows 7, Visual Studio 2010:
```
> nmake /f cryptest.nmake
cl.exe /nologo /W4 /wd4511 /wd4156 /D_MBCS /Zi /TP /GR /EHsc /DNDEBUG /D
_NDEBUG /Oi /Oy /O2 /MT /FI sdkddkver.h /c aria.cpp
...
aria.cpp(224) : error C2065: 'uint32_t' : undeclared identifier
aria.cpp(224) : error C2059: syntax error : ')'
NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio 10.0\VC\BI
N\cl.exe"' : return code '0x2'
Stop.
``` | Windows 7, Visual Studio 2010, and "error C2065: uint32_t: undeclared identifier" | https://api.github.com/repos/weidai11/cryptopp/issues/608/comments | 1 | 2018-03-27T23:08:56Z | 2018-03-28T18:49:50Z | https://github.com/weidai11/cryptopp/issues/608 | 309,165,153 | 608 |
[
"weidai11",
"cryptopp"
] | Windows 10 Pro 64-bit; vcpkg; version 5.6.5-1; VS2015
I've just updated my vcpkg libraries and when I link to Cryptopp I'm getting this linker error:
```
2>cryptopp-static.lib(integer.obj) : error LNK2019: unresolved external symbol ___std_reverse_trivially_swappable_1 referenced in function
"public: __thiscall CryptoPP::Integer::Integer(class CryptoPP::BufferedTransformation &,unsigned int,
enum CryptoPP::Integer::Signedness,enum CryptoPP::ByteOrder)" (??0Integer@CryptoPP@@QAE@AAVBufferedTransformation@1@IW4Signedness@01@
W4ByteOrder@1@@Z) in module cryptopp-static.lib(integer.obj)
```
I think it's probably a setting somewhere but I can't see anything obvious so any suggestions would be welcome. | Linker error under vcpkg | https://api.github.com/repos/weidai11/cryptopp/issues/606/comments | 8 | 2018-03-26T10:03:00Z | 2018-10-29T15:28:09Z | https://github.com/weidai11/cryptopp/issues/606 | 308,507,526 | 606 |
[
"weidai11",
"cryptopp"
] | This issue was privately reported in an email:
```
$ cat test.cxx
#include "integer.h"
#include <iostream>
int main(int argc, char* argv[])
{
using namespace CryptoPP;
Integer x = 0;
Integer y = 1;
Integer z = a_exp_b_mod_c(y, y, x);
std::cout << x << std::endl;
return 0;
}
```
The problem is, `a_exp_b_mod_c` does not throw to signify the ultimate division by 0 due to the 0 modulus. `a_times_b_mod_c` does throw so it is OK. | Incorrect result when using a_exp_b_mod_c | https://api.github.com/repos/weidai11/cryptopp/issues/604/comments | 1 | 2018-03-25T23:15:33Z | 2018-03-25T23:57:55Z | https://github.com/weidai11/cryptopp/issues/604 | 308,395,641 | 604 |
[
"weidai11",
"cryptopp"
] | This issue was privately reported in an email:
```
$ cat test.cxx
#include "integer.h"
#include "nbtheory.h"
#include <iostream>
int main(int argc, char* argv[])
{
using namespace CryptoPP;
Integer a("0x2F0500010000018000000000001C1C000000000000000A000B0000000000000000000000000000FDFFFFFF00000000");
Integer b("0x3D2F050001");
Integer x = a.InverseMod(b);
std::cout << std::hex << x << std::endl;
return 0;
}
```
Crypto++ result:
```
$ ./test.exe
342188107fh
```
Botan and OpenSSL result:
```
0x3529E4FEBC
```
-----
Here is [Integer::InverseMod](https://github.com/weidai11/cryptopp/blob/master/integer.cpp#L4378):
```
Integer Integer::InverseMod(const Integer &m) const
{
if (IsNegative())
return Modulo(m).InverseMod(m);
if (m.IsEven())
{
if (!m || IsEven())
return Zero(); // no inverse
if (*this == One())
return One();
Integer u = m.Modulo(*this).InverseMod(*this);
return !u ? Zero() : (m*(*this-u)+1)/(*this);
}
SecBlock<word> T(m.reg.size() * 4);
Integer r((word)0, m.reg.size());
unsigned k = AlmostInverse(r.reg, T, reg, reg.size(), m.reg, m.reg.size());
DivideByPower2Mod(r.reg, r.reg, k, m.reg, m.reg.size());
return r;
}
```
| Incorrect result when using Integer::ModInverse | https://api.github.com/repos/weidai11/cryptopp/issues/602/comments | 6 | 2018-03-24T11:55:03Z | 2018-05-02T16:07:17Z | https://github.com/weidai11/cryptopp/issues/602 | 308,255,259 | 602 |
[
"weidai11",
"cryptopp"
] | Can i recommand a new Blockcipher and my code? | Can i recommand a new Blockcipher and my code? | https://api.github.com/repos/weidai11/cryptopp/issues/601/comments | 1 | 2018-03-21T06:42:26Z | 2018-03-22T06:57:17Z | https://github.com/weidai11/cryptopp/issues/601 | 307,134,006 | 601 |
[
"weidai11",
"cryptopp"
] | I'm trying to include Crypto++ headers to my static lib project, but as soon as I include any of them I get an error during compiling.
> Error C7510 'forward': use of dependent type name must be prefixed with 'typename' in file secblock.h line 82.
I've downloaded Crypto++ 6.1 and use Visual Studio 2017 on Windows 10 x64. | Error: 'forward': use of dependent type name must be prefixed with 'typename' | https://api.github.com/repos/weidai11/cryptopp/issues/599/comments | 18 | 2018-03-14T10:57:52Z | 2018-03-16T14:43:18Z | https://github.com/weidai11/cryptopp/issues/599 | 305,110,770 | 599 |
[
"weidai11",
"cryptopp"
] | Testing on GCC202:
```
$ ./cryptest.exe tv aria
Using seed: 1520538558
Testing SymmetricCipher algorithm ARIA/ECB.
......
Testing SymmetricCipher algorithm ARIA/CBC.
...
Testing SymmetricCipher algorithm ARIA/CTR.
Bus error
``` | Bus Error when running ARIA/CTR on Sparc64 | https://api.github.com/repos/weidai11/cryptopp/issues/597/comments | 1 | 2018-03-08T19:50:11Z | 2018-03-09T01:16:08Z | https://github.com/weidai11/cryptopp/issues/597 | 303,608,581 | 597 |
[
"weidai11",
"cryptopp"
] | msvc 15, 17 and gcc 5.4 64bit compilers
crypto versions 5.6.5 and 6.1
built via cmake on gcc 5.6.5
and vs projects on 5.6.5 and 6.1 - though changing runtime library to /MD
Please see attached project for example code to induce failure on windows.
The failure may not occur on the first run, but running the application several times an exception is thrown in the decompression "Adler32 check error"
The example code uses openmp to parallelize, however it can also be replicated using tbb
[test.zip](https://github.com/weidai11/cryptopp/files/1788987/test.zip)
| Calling multiple ZlibDecompressor in parallel causes adler32 checksum failure | https://api.github.com/repos/weidai11/cryptopp/issues/596/comments | 21 | 2018-03-07T11:43:52Z | 2018-03-25T00:32:04Z | https://github.com/weidai11/cryptopp/issues/596 | 303,066,545 | 596 |
[
"weidai11",
"cryptopp"
] | I'm cross-compiling `CRYPTOPP_6_1_0` tarball on mingw-w64. Everything compiled successfully. But when I try lauching cryptest.exe, it just give segfault at `dynamic_cast` which pointed to this file:
https://github.com/weidai11/cryptopp/blob/53ccd310b8b3ce1b1cc79d125b85420bfb7c8682/test.cpp#L154-L156
I compiled with gcc 7.3.0
```
CXX=x86_64-w64-mingw32-g++ CC=x86_64-w64-mingw32-gcc AR=x86_64-w64-mingw32-ar RANLIB=x86_64-w64-mingw32-ranlib make -j$(nproc)
``` | cryptest: segfault which pointed to 'dynamic_cast' | https://api.github.com/repos/weidai11/cryptopp/issues/593/comments | 8 | 2018-03-02T13:02:51Z | 2018-03-09T11:51:09Z | https://github.com/weidai11/cryptopp/issues/593 | 301,759,414 | 593 |
[
"weidai11",
"cryptopp"
] | I'm using MacOS 10.13.3 and getting this error when compiling with `g++ main.ccp -lcryptopp`:
```
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation
```
I found the issue in the GNUmakefile in line 86:
```
# Sun Studio 12.0 provides SunCC 0x0510; and Sun Studio 12.3 provides SunCC 0x0512
SUNCC_VERSION := $(subst `,',$(shell $(CXX) -V 2>&1))
```
This comment the rest of the `GNUmakefile` out. Without `'` in
(subst `, ,$(shell $(CXX) -V 2>&1))
the compiling works after a new `make && make install`.
| Compile-Error under MacOS | https://api.github.com/repos/weidai11/cryptopp/issues/592/comments | 7 | 2018-02-25T14:32:58Z | 2018-02-27T18:07:34Z | https://github.com/weidai11/cryptopp/issues/592 | 300,030,668 | 592 |
[
"weidai11",
"cryptopp"
] | I use Visual Studio 2017 (msvc15) under Windows 10 and Crypto++ 6.10.
I get the following linker warning:
```
Warning C4742: '`string'' has different alignment in '\cryptopp\mqueue.cpp' and 'foo\bar.cpp': 1 and 2
```
I know that is the Microsoft compiler problem and I reported it to them.
But I also know why It occures and there is a very simple way to avoid it.
In your code, in `mqueue.cpp` we have
`return Output(1, (const byte *)"\0", 1, 0, blocking) != 0;`
The string `"\0"` is actually a two-element array of two zero bytes - exactly the same as `L""`. So the problem is whether it is a 1-length char* or an empty wide string.
Maybe you can write
`return Output(1, (const byte *)"\0\0", 1, 0, blocking) != 0;`
or
`return Output(1, (const byte *)"", 1, 0, blocking) != 0;`
Both codes works the same way and without linker warnings.
P.S. Older versions of Crypto++ give the same effect, of course. | Compiler warning due to different string alignments in mqueue.cpp code | https://api.github.com/repos/weidai11/cryptopp/issues/591/comments | 5 | 2018-02-24T17:31:42Z | 2018-02-24T22:02:04Z | https://github.com/weidai11/cryptopp/issues/591 | 299,957,454 | 591 |
[
"weidai11",
"cryptopp"
] | We have access to GCC 8, which has not been released yet. We are using the daily snapshot dated 20182002. It is producing a noisy compile:
```
algparam.h:313:32: warning: ‘bool std::uncaught_exception()’ is deprecated [-Wdeprecated-declarations]
if (!std::uncaught_exception())
^
In file included from /home/guerby/opt/cfarm/gcc8-r257824/include/c++/8.0.1/new:40,
from /home/guerby/opt/cfarm/gcc8-r257824/include/c++/8.0.1/ext/new_allocator.h:33,
from /home/guerby/opt/cfarm/gcc8-r257824/include/c++/8.0.1/powerpc64le-unknown-linux-gnu/bits/c++allocator.h:33,
from /home/guerby/opt/cfarm/gcc8-r257824/include/c++/8.0.1/bits/allocator.h:46,
from /home/guerby/opt/cfarm/gcc8-r257824/include/c++/8.0.1/string:41,
from stdcpp.h:14,
from cryptlib.h:103,
from regtest1.cpp:6:
/home/guerby/opt/cfarm/gcc8-r257824/include/c++/8.0.1/exception:102:8: note: declared here
bool uncaught_exception() _GLIBCXX_USE_NOEXCEPT __attribute__ ((__pure__));
^~~~~~~~~~~~~~~~~~
...
```
I think we should get out ahead of this one before Crypto++ 6.1 is released. Otherwise we will take multiple bug reports for it over time.
It looks like the fix is stop using `std::uncaught_exception` and start using `std::uncaught_exceptions`. We will need to investigate it a little further, like when we need to make the cutover (C++14 or C++17?). | GCC 8 and bool std::uncaught_exception() is deprecated | https://api.github.com/repos/weidai11/cryptopp/issues/590/comments | 1 | 2018-02-21T11:18:07Z | 2018-02-23T02:50:27Z | https://github.com/weidai11/cryptopp/issues/590 | 298,931,044 | 590 |
[
"weidai11",
"cryptopp"
] | ### Crypto++ Issue Report
The cryptopp compilation succeeded once a little fix is made:
```
sed -i -e 's/-mcpu=power4//' GNUmakefile
```
Prevent an error at aria-simd.cpp compile:
```
type_traits:347:39: error: '__float128' was not declared in this scope
```
Here is the full log:
* https://kojipkgs.fedoraproject.org//work/tasks/7092/25167092/build.log
State the operating system and version (Ubutnu 17 x86_64, Windows 7 Professional x64, etc)
* Fedora 28 (Rawhide: development branch) ppc64le
* Others arches have succeeded.
State the version of the Crypto++ library (Crypto++ 5.6.5, Master, etc)
* 6.0.0
State how you built the library (Makefile, Cmake, distro, etc)
* GNUMakefile
Show a typical command line (the output of the compiler for cryptlib.cpp)
* g++ -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fstack-clash-protection -fPIC -DPIC -c cryptlib.cpp
Show the link command (the output of the linker for libcryptopp.so or cryptest.exe)
* g++ -shared -Wl,-soname,libcryptopp.so.6 -o libcryptopp.so.6.0.0 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mcpu=power8 -mtune=power8 -fstack-clash-protection -fPIC -DPIC -Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld cryptlib.o cpu.o integer.o 3way.o adler32.o algebra.o algparam.o arc4.o aria-simd.o aria.o ariatab.o asn.o authenc.o base32.o base64.o basecode.o bfinit.o blake2-simd.o blake2.o blowfish.o blumshub.o camellia.o cast.o casts.o cbcmac.o ccm.o chacha.o channels.o cmac.o crc-simd.o crc.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-simd.o gcm.o gf256.o gf2_32.o gf2n.o gfpcrypt.o gost.o gzip.o hex.o hmac.o hrtimer.o ida.o idea.o iterhash.o kalyna.o kalynatab.o keccak.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 network.o oaep.o osrng.o padlkrng.o panama.o pkcspad.o poly1305.o polynomi.o ppc-simd.o pssr.o pubkey.o queue.o rabin.o randpool.o rc2.o rc5.o rc6.o rdrand.o rdtables.o rijndael-simd.o rijndael.o ripemd.o rng.o rsa.o rw.o safer.o salsa.o seal.o seed.o serpent.o sha-simd.o sha.o sha3.o shacal2-simd.o shacal2.o shark.o sharkbox.o simon-simd.o simon.o skipjack.o sm3.o sm4.o socketft.o sosemanuk.o speck-simd.o speck.o square.o squaretb.o sse-simd.o strciphr.o tea.o tftables.o threefish.o tiger.o tigertab.o trdlocal.o ttmac.o tweetnacl.o twofish.o vmac.o wait.o wake.o whrlpool.o xtr.o xtrcrypt.o zdeflate.o zinflate.o zlib.o
Show the exact error message you are receiving (copy and paste it); or
* Everything went fine with the compilation, but some tests with `cryptest.exe v` are failing:
* https://kojipkgs.fedoraproject.org//work/tasks/7092/25167092/build.log
Clearly state the undesired behavior (and state the expected behavior)
* Tests have to succeed. | Tests failure with cryptopp 6.0.0 on ppc64le | https://api.github.com/repos/weidai11/cryptopp/issues/588/comments | 12 | 2018-02-19T18:32:40Z | 2018-02-23T09:19:51Z | https://github.com/weidai11/cryptopp/issues/588 | 298,368,112 | 588 |
[
"weidai11",
"cryptopp"
] | The Linux kernel added Speck-64 and Speck-128 for opportunistic encryption on low resource devices that would otherwise have to disable encryption on the file system. Also see [[PATCH v2 0/5] crypto: Speck support](https://www.mail-archive.com/linux-crypto@vger.kernel.org/msg30925.html) on the kernel-crypto mailing list.
The problem is we are not going to interop well with the kernel. The problem is due to confusion in the Simon and Speck algorithmic description and the test vectors. The algorithmic description and test vectors did not quite align, and we went down one path (follow the test vectors) and the kernel went down another path (follow the algorithmic description).
It is possible to to interop with the kernel using our implementation but... (1) it is not readily apparent how to do it, and (2) there's a loss of efficiency when doing it. The interop can happen now by providing an adapter class. If my estimates are correct, then we could loose 2 to 4 cpb on a conversion via the adapter. That means SSE4 could drop from 2.1 cpb to about 4 or 6 cpb.
Also not readily apparent, the same interop issue affect Simon, too. At this point in time we are not aware of anyone implementing Simon and diverging due to the algorithmic description versus test vector results.
Simon and Speck has been part of the library since December 2017. We are probably running between the cracks, but we can likely make changes and take action before the 6.1 release and anyone notices.
This will track our handling of the issue and document how we close the gap.
-----
Also see [Speck, Android and Linux kernel interop](https://groups.google.com/d/msg/cryptopp-users/urd3pcd2ees/ojHnONPzAgAJ) on the Crypto++ mailing list. | Speck, Android and Linux kernel interop | https://api.github.com/repos/weidai11/cryptopp/issues/585/comments | 3 | 2018-02-13T10:18:14Z | 2018-02-19T20:38:33Z | https://github.com/weidai11/cryptopp/issues/585 | 296,682,764 | 585 |
[
"weidai11",
"cryptopp"
] | ```
hikey:cryptopp$ CXXFLAGS="-DNDEBUG -g2 -O3 -mabi=ilp32" make cryptlib.o
g++ -DNDEBUG -g2 -O3 -mabi=ilp32 -fPIC -pthread -pipe -c cryptlib.cpp
In file included from filters.h:18:0,
from cryptlib.cpp:20:
secblock.h: In instantiation of ‘const size_type CryptoPP::SecBlock<unsigned char>::ELEMS_MAX’:
secblock.h:488:75: required from ‘CryptoPP::SecBlock<T, A>::SecBlock(CryptoPP::SecBlock<T, A>::size_type) [with T = unsigned char; A = CryptoPP::AllocatorWithCleanup<unsigned char>; CryptoPP::SecBlock<T, A>::size_type = long unsigned int]’
algparam.h:30:49: required from here
secblock.h:479:25: warning: large integer implicitly truncated to unsigned type [-Woverflow]
static const size_type ELEMS_MAX = SIZE_MAX/sizeof(T);
^
secblock.h: In instantiation of ‘const size_type CryptoPP::SecBlock<unsigned char, CryptoPP::FixedSizeAllocatorWithCleanup<unsigned char, 256ul, CryptoPP::NullAllocator<unsigned char>, false> >::ELEMS_MAX’:
secblock.h:488:75: required from ‘CryptoPP::SecBlock<T, A>::SecBlock(CryptoPP::SecBlock<T, A>::size_type) [with T = unsigned char; A = CryptoPP::FixedSizeAllocatorWithCleanup<unsigned char, 256ul, CryptoPP::NullAllocator<unsigned char>, false>; CryptoPP::SecBlock<T, A>::size_type = long unsigned int]’
secblock.h:845:49: required from ‘CryptoPP::FixedSizeSecBlock<T, S, A>::FixedSizeSecBlock() [with T = unsigned char; unsigned int S = 256u; A = CryptoPP::FixedSizeAllocatorWithCleanup<unsigned char, 256ul, CryptoPP::NullAllocator<unsigned char>, false>]’
cryptlib.cpp:326:31: required from here
secblock.h:479:25: warning: large integer implicitly truncated to unsigned type [-Woverflow]
In file included from filters.h:18:0,
from cryptlib.cpp:20:
secblock.h: In instantiation of ‘const size_type CryptoPP::AllocatorBase<unsigned char>::ELEMS_MAX’:
secblock.h:115:30: required from ‘static void CryptoPP::AllocatorBase<T>::CheckSize(size_t) [with T = unsigned char; size_t = long unsigned int]’
secblock.h:194:3: required from ‘CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer CryptoPP::AllocatorWithCleanup<T, T_Align16>::allocate(CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type, const void*) [with T = unsigned char; bool T_Align16 = false; CryptoPP::AllocatorWithCleanup<T, T_Align16>::pointer = unsigned char*; CryptoPP::AllocatorWithCleanup<T, T_Align16>::size_type = long unsigned int]’
secblock.h:488:75: required from ‘CryptoPP::SecBlock<T, A>::SecBlock(CryptoPP::SecBlock<T, A>::size_type) [with T = unsigned char; A = CryptoPP::AllocatorWithCleanup<unsigned char>; CryptoPP::SecBlock<T, A>::size_type = long unsigned int]’
algparam.h:30:49: required from here
secblock.h:61:25: warning: large integer implicitly truncated to unsigned type [-Woverflow]
static const size_type ELEMS_MAX = SIZE_MAX/sizeof(T);
^
``` | Aarch64, -mabi=ilp32 and Warning: large integer implicitly truncated to unsigned type | https://api.github.com/repos/weidai11/cryptopp/issues/584/comments | 2 | 2018-02-06T00:39:13Z | 2018-02-13T10:24:28Z | https://github.com/weidai11/cryptopp/issues/584 | 294,592,485 | 584 |
[
"weidai11",
"cryptopp"
] | System : WIndows 10 Home x64
Crypto++ : Crypto++ 6
I built the library using by running the cryptest.sln which was successful by using MS VS community 2017 15.5.6.
All what I want to do is to run the [CCM example file ](https://www.cryptopp.com/w/images/9/98/CCM-AE-Test.zip) which was provided [here ](https://www.cryptopp.com/wiki/CCM_Mode).
So I opened the project and added the path to V++ directories :

I also added the path here :

when building the project I get the following error :
LINK : fatal error LNK1181: cannot open input file 'cryptlibd.lib'
I checked everywhere for cryptlibd.lib ( within the project, and the cryptopp600 directory ) , I only found cryptlib.lib (not cryptlibd.lib) in C:\Users\blue_\Downloads\cryptopp600\Win32\Output\Debug .
can you kindly tell me how to resolve this ? and why its asking for cryptlibd instead on cryptlib ?
| LINK : fatal error LNK1181: cannot open input file 'cryptlibd.lib' | https://api.github.com/repos/weidai11/cryptopp/issues/583/comments | 1 | 2018-02-05T14:14:42Z | 2018-02-05T14:32:07Z | https://github.com/weidai11/cryptopp/issues/583 | 294,407,009 | 583 |
[
"weidai11",
"cryptopp"
] | Our makefiles use the following recipe to install programs (just an excerpt):
```
install:
@-$(MKDIR) -p $(DESTDIR)$(INCLUDEDIR)/cryptopp
$(CP) *.h $(DESTDIR)$(INCLUDEDIR)/cryptopp
-$(CHMOD) 0755 $(DESTDIR)$(INCLUDEDIR)/cryptopp
-$(CHMOD) 0644 $(DESTDIR)$(INCLUDEDIR)/cryptopp/*.h
```
We can clean the code up a bit by using `install` program:
```
install:
@-$(MKDIR) $(DESTDIR)$(INCLUDEDIR)/cryptopp
$(INSTALL_DATA) *.h $(DESTDIR)$(INCLUDEDIR)/cryptopp
```
It is worth mentioning the `install` program is not required by Posix, so some systems may not have it. However, `mkdir -p` is not Posix either, so users likely have found solutions for their platforms, like installing coreutils. | Use install program in Makefiles | https://api.github.com/repos/weidai11/cryptopp/issues/582/comments | 1 | 2018-02-05T13:41:17Z | 2018-02-05T14:14:01Z | https://github.com/weidai11/cryptopp/issues/582 | 294,396,248 | 582 |
[
"weidai11",
"cryptopp"
] | [Conan](https://www.conan.io/) is the most popular C++ package manager which allows libraries to be consumed very easily. It is build system agnostic so you can still build Crypto++ using Make but Conan will generate necessary glue for other build systems such as CMake.
You only need to create `conanfile.py` with instructions how to build and consume the library. The tutorial is [here](http://docs.conan.io/en/latest/creating_packages.html).
A stretch goal would be getting Crypto++ into [conan-center](https://bintray.com/conan/conan-center) which will allow all Conan users to install and use Crypto++ with just a few lines of code. | Provide Conan package | https://api.github.com/repos/weidai11/cryptopp/issues/581/comments | 2 | 2018-02-05T06:53:47Z | 2018-02-13T10:37:43Z | https://github.com/weidai11/cryptopp/issues/581 | 294,290,593 | 581 |
[
"weidai11",
"cryptopp"
] | From Kovri [Build 323](https://build.getmonero.org/builders/kovri-static-openbsd-amd64/builds/323/steps/compile/logs/stdio):
```
...
eg++ -DNDEBUG -g2 -O3 -fPIC -DCRYPTOPP_DISABLE_SSE4 -pthread -pipe -c serpent.cpp
eg++ -DNDEBUG -g2 -O3 -fPIC -DCRYPTOPP_DISABLE_SSE4 -pthread -pipe -c sha-simd.cpp
In file included from /usr/local/lib/gcc/x86_64-unknown-openbsd6.0/4.9.3/include/smmintrin.h:32:0,
from /usr/local/lib/gcc/x86_64-unknown-openbsd6.0/4.9.3/include/nmmintrin.h:31,
from sha-simd.cpp:21:
/usr/local/lib/gcc/x86_64-unknown-openbsd6.0/4.9.3/include/tmmintrin.h: In function 'void CryptoPP::SHA1_HashMultipleBlocks_SHANI(CryptoPP::word32*, const word32*, size_t, CryptoPP::ByteOrder)':
/usr/local/lib/gcc/x86_64-unknown-openbsd6.0/4.9.3/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)
^
sha-simd.cpp:229:44: error: called from here
MSG0 = _mm_shuffle_epi8(MSG0, MASK);
...
``` | Failed build on OpenBSD with eg++ compiler | https://api.github.com/repos/weidai11/cryptopp/issues/579/comments | 1 | 2018-01-30T15:46:51Z | 2018-01-30T15:48:18Z | https://github.com/weidai11/cryptopp/issues/579 | 292,831,936 | 579 |
[
"weidai11",
"cryptopp"
] | Working on Debian X32, running `cryptest.exe v 51`:
```
(gdb) r v 51
Starting program: /cryptopp/cryptest.exe v 51
warning: linux_ptrace_test_ret_to_nx: Cannot PTRACE_PEEKUSER: Input/output error
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnux32/libthread_db.so.1".
Using seed: 1517157123
ECGDSA validation suite running...
passed brainpoolP192r1 using SHA-1
passed signature key validation
passed signature and verification
passed checking invalid signature
passed brainpoolP320r1 using SHA-224
passed signature key validation
passed signature and verification
passed checking invalid signature
passed brainpoolP320r1 using SHA-256
passed signature key validation
passed signature and verification
passed checking invalid signature
Program received signal SIGSEGV, Segmentation fault.
0x0063d45f in CryptoPP::(anonymous namespace)::SHA512_HashBlock_SSE2 (
data=0xdfffa2d0, state=0x3bd9eb7) at sha.cpp:1071
1071 );
```
It appears state is unaligned. | Crash in SHA-384 and SHA-512 on X32 platforms | https://api.github.com/repos/weidai11/cryptopp/issues/578/comments | 1 | 2018-01-28T16:32:54Z | 2018-01-28T17:06:18Z | https://github.com/weidai11/cryptopp/issues/578 | 292,217,892 | 578 |
[
"weidai11",
"cryptopp"
] | I am building crypto++ 6.0.0 for Arch Linux, and noticed that the new SIMD files are *not* built with the needed flags (`-msse4.1`, `-maes`, etc) by default.
These flags should be enabled unconditionally:
- these flags are necessary (otherwise, build errors occur, like mentioned in the release notes or #573 );
- the needed CPU features are already checked at run-time (if I read `cpu.cpp` correctly) so there's no harm enabling all features at build-time;
- when packaging for a distro, the build-time and run-time CPU have different capabilities, so it makes no sense to test CPU features at build time.
Note that I am using the `GNUMakefile-cross` build system, because the normal `GNUMakefile` is not suitable for packaging (it sets various unwanted build flags with no simple way to disable them).
What I propose is something like this:
```
ifneq ($(IS_i686)$(IS_x86_64),00)
ARIA_FLAG = -mssse3
BLAKE2_FLAG = -msse4.2
AES_FLAG = -msse4.1 -maes
# etc
endif
```
that is, remove all feature detection like `$(shell echo | $(CXX) -x c++ $(CXXFLAGS) -mssse3 -mpclmul -dM -E - 2>/dev/null | $(EGREP) -i -c __PCLMUL__ )`
I tested doing just that and building on an old Core2 (which certainly doesn't have AES, SHA and so on). It builds fine and all tests pass, printing the following:
```
hasSSE2 == 1, hasSSSE3 == 1, hasSSE4.1 == 1, hasSSE4.2 == 0, hasAESNI == 0, hasCLMUL == 0, hasRDRAND == 0, hasRDSEED == 0, hasSHA == 0, isP4 == 0
```
so runtime feature detection seems to work fine. | Instruction set compilation flags should always be enabled for SIMD implementations | https://api.github.com/repos/weidai11/cryptopp/issues/576/comments | 4 | 2018-01-27T16:25:23Z | 2018-01-27T19:47:33Z | https://github.com/weidai11/cryptopp/issues/576 | 292,132,759 | 576 |
[
"weidai11",
"cryptopp"
] | Complete system/build information: https://build.getmonero.org/builders/kovri-all-win32/builds/768/steps/compile/logs/stdio
TL;DR:
- Tag `CRYPTOPP_6_0_0`
- `i686-w64-mingw32`
- `gcc 6.2.0`
- `make CXXFLAGS="-march=native -DCRYPTOPP_NO_CPU_FEATURE_PROBES=1" static`
```
In file included from C:/msys32/mingw32/lib/gcc/i686-w64-mingw32/6.2.0/include/immintrin.h:71:0,
from sha-simd.cpp:16:
C:/msys32/mingw32/lib/gcc/i686-w64-mingw32/6.2.0/include/shaintrin.h: In function 'void CryptoPP::SHA1_HashMultipleBlocks_SHANI(CryptoPP::word32*, const word32*, size_t, CryptoPP::ByteOrder)':
C:/msys32/mingw32/lib/gcc/i686-w64-mingw32/6.2.0/include/shaintrin.h:53:1: error: inlining failed in call to always_inline '__m128i _mm_sha1nexte_epu32(__m128i, __m128i)': target specific option mismatch
_mm_sha1nexte_epu32 (__m128i __A, __m128i __B)
^~~~~~~~~~~~~~~~~~~
sha-simd.cpp:236:43: note: called from here
E1 = _mm_sha1nexte_epu32(E1, MSG1);
^
``` | i686-w64-mingw32: sha-simd: error: inlining failed in call to always_inline '__m128i _mm_sha1nexte_epu32(__m128i, __m128i)' | https://api.github.com/repos/weidai11/cryptopp/issues/573/comments | 30 | 2018-01-24T17:01:52Z | 2018-09-11T22:02:59Z | https://github.com/weidai11/cryptopp/issues/573 | 291,285,309 | 573 |
[
"weidai11",
"cryptopp"
] | Reason: more entropy
Difficulty: pretty easy
Risk: minimal
**TODO:**
- [x] determine best way to split a 384-bit hash into a 256-bit key + 128-bit seed
- [x] determine whether any other instances of SHA256 could benefit from a similar upgrade
- [x] determine whether any other code is affected negatively
- [x] confirm overall impact
- [x] test
- [x] update documentation
**Theoretical example of possible modifications:**
```
void RandomPool::IncorporateEntropy(const byte *input, size_t length)
{
//SHA256 hash; // replace with SHA384
SHA384 hash;
hash.Update(m_key, 32);
hash.Update(m_seed, 16); // add the current existing seed to the hash update cycle
hash.Update(input, length);
// Finalize using a 384-bit (48 byte) object, and split hash across the key and seed
//hash.Final(m_key);
FixedSizeAlignedSecBlock<byte, 48> hashResult;
hash.Final(hashResult);
::memcpy(m_key,hashResult,32);
::memcpy(m_seed,(byte*)hashResult+32,16);
m_keySet = false;
}
/* ... */
template <class BLOCK_CIPHER>
void AutoSeededX917RNG<BLOCK_CIPHER>::Reseed(bool blocking, const byte *input, size_t length)
{
/* BLOCK_CIPHER::BLOCKSIZE + BLOCK_CIPHER::DEFAULT_KEYLENGTH
will be 48 bytes (384 bits) when AES-256 is used as the block cipher. */
SecByteBlock seed(BLOCK_CIPHER::BLOCKSIZE + BLOCK_CIPHER::DEFAULT_KEYLENGTH);
const byte *key;
do
{
OS_GenerateRandomBlock(blocking, seed, seed.size());
if (length > 0)
{
//SHA256 hash; // replace with SHA384
SHA384 hash;
hash.Update(seed, seed.size());
hash.Update(input, length);
hash.TruncatedFinal(seed, UnsignedMin(hash.DigestSize(), seed.size()));
}
key = seed + BLOCK_CIPHER::BLOCKSIZE;
} // check that seed and key don't have same value
while (memcmp(key, seed, STDMIN((unsigned int)BLOCK_CIPHER::BLOCKSIZE, (unsigned int)BLOCK_CIPHER::DEFAULT_KEYLENGTH)) == 0);
Reseed(key, BLOCK_CIPHER::DEFAULT_KEYLENGTH, seed, NULLPTR);
}
/* ... */
class CRYPTOPP_DLL AutoSeededRandomPool : public RandomPool
{
public:
CRYPTOPP_STATIC_CONSTEXPR const char* StaticAlgorithmName() { return "AutoSeededRandomPool"; }
~AutoSeededRandomPool() {}
/// \brief Construct an AutoSeededRandomPool
/// \param blocking controls seeding with BlockingRng or NonblockingRng
/// \param seedSize the size of the seed, in bytes
/// \details Use blocking to choose seeding with BlockingRng or NonblockingRng.
/// The parameter is ignored if only one of these is available.
//explicit AutoSeededRandomPool(bool blocking = false, unsigned int seedSize = 32)
// {Reseed(blocking, seedSize);}
explicit AutoSeededRandomPool(bool blocking = false, unsigned int seedSize = 48) // update default seedSize to 48 bytes
{Reseed(blocking, seedSize);}
/// \brief Reseed an AutoSeededRandomPool
/// \param blocking controls seeding with BlockingRng or NonblockingRng
/// \param seedSize the size of the seed, in bytes
//void Reseed(bool blocking = false, unsigned int seedSize = 32);
void Reseed(bool blocking = false, unsigned int seedSize = 48); // update default seedSize to 48 bytes
};
```
**Thoughts:**
- The random number generator routinely adds a high-resolution timestamp to the seed, for a little more entropy. This is fine, and would not be impacted by these modifications. More entropy is more entropy.
- It would be convenient if the key and seed were guaranteed to be stored contiguously in memory. (Are they already contiguous? It didn't seem so to me, and I figured it's never safe to assume contiguousness, unless it is explicitly defined e.g. arrays.) I'm pretty new to Crypto++, but I believe modifying the key and seed to share a contiguous 384-bit block might break some other things (which would in turn need to be modified as well) - I have not yet confirmed whether this approach is realistic, and I have my doubts. | Upgrade RandomPool IncorporateEntropy from SHA-256 to SHA-384 | https://api.github.com/repos/weidai11/cryptopp/issues/572/comments | 3 | 2018-01-24T04:57:16Z | 2018-02-06T03:54:03Z | https://github.com/weidai11/cryptopp/issues/572 | 291,084,722 | 572 |
[
"weidai11",
"cryptopp"
] | Currently DSA and DSA2 use 1024 as the default modulus size. This will track changing the size to 2048.
This change should have occurred prior to the Crypto++ 6.0 release. Better late then never, I suppose. | Change default DSA modulus size to 2048 | https://api.github.com/repos/weidai11/cryptopp/issues/571/comments | 1 | 2018-01-23T18:16:52Z | 2018-01-23T18:44:45Z | https://github.com/weidai11/cryptopp/issues/571 | 290,942,122 | 571 |
[
"weidai11",
"cryptopp"
] | Travis is having infrastructure problems since it migrated in November 2017. Our OS X and iOS tests hang for days. When the current job hangs, new jobs that enter the queue later hang too because the original job is still waiting.
The subsequent hangs effect Android and Linux, too. Our Travis scripts test Android, Linux, OS X and iOS. A hang effects everything.
We are going to disable Travis OS X and iOS tests until things improve.
-----
Disabled at [Commit 133b2411d40d](https://github.com/weidai11/cryptopp/commit/133b2411d40d). | Disable Travis OS X and iOS testing | https://api.github.com/repos/weidai11/cryptopp/issues/570/comments | 1 | 2018-01-21T15:57:17Z | 2018-04-01T06:39:39Z | https://github.com/weidai11/cryptopp/issues/570 | 290,283,240 | 570 |
[
"weidai11",
"cryptopp"
] | `AsymmetricAlgorithm::BERDecode` and `AsymmetricAlgorithm::DEREncode` were deprecated at Crypto++ 5.6.0 from 2009. The notes say:
```
//! for backwards compatibility, calls AccessMaterial().Load(bt)
void BERDecode(BufferedTransformation &bt)
{AccessMaterial().Load(bt);}
//! for backwards compatibility, calls GetMaterial().Save(bt)
void DEREncode(BufferedTransformation &bt) const
{GetMaterial().Save(bt);}
```
The change will effect the `test.cpp` and a few other functions in `Test::` namespace. | Remove AsymmetricAlgorithm::BERDecode | https://api.github.com/repos/weidai11/cryptopp/issues/569/comments | 1 | 2018-01-21T13:28:00Z | 2018-01-21T14:02:25Z | https://github.com/weidai11/cryptopp/issues/569 | 290,272,809 | 569 |
[
"weidai11",
"cryptopp"
] | We are still catching compile failures when including `<arm_acle.h>` for NEON and ARMv8 instrinsics. ACLE is *"ARM C Language Extensions"* and it is the canonical reference. ARM's [ACLE 1.0](https://static.docs.arm.com/100739/0100/acle_extensions_for_armv8_m_100739_0100_0100_en.pdf) is pretty straightforward and it should not be this much trouble. ARM states we need to include `<arm_acle.h>` to get the intrinsics, and `__ARM_ACLE` is defined when it is available. The problem is, there are a lot compilers and nearly none of them follow the rules. | Improve logic for <arm_acle.h> include | https://api.github.com/repos/weidai11/cryptopp/issues/568/comments | 1 | 2018-01-20T15:06:05Z | 2018-01-20T18:29:42Z | https://github.com/weidai11/cryptopp/issues/568 | 290,198,544 | 568 |
[
"weidai11",
"cryptopp"
] | The `ElGamalKeys` class uses a Crypto++ 1.0 or 2.0 serialization format:
```
struct ElGamalKeys
{
typedef DL_CryptoKeys_GFP::GroupParameters GroupParameters;
typedef DL_PrivateKey_GFP_OldFormat<DL_CryptoKeys_GFP::PrivateKey> PrivateKey;
typedef DL_PublicKey_GFP_OldFormat<DL_CryptoKeys_GFP::PublicKey> PublicKey;
};
```
This is where we want to be nowadays:
```
struct ElGamalKeys
{
typedef DL_CryptoKeys_GFP::GroupParameters GroupParameters;
typedef DL_CryptoKeys_GFP::PrivateKey PrivateKey;
typedef DL_CryptoKeys_GFP::PublicKey PublicKey;
};
```
This report will track the conversion. | Remove DL_PrivateKey_GFP_OldFormat | https://api.github.com/repos/weidai11/cryptopp/issues/567/comments | 1 | 2018-01-19T12:41:54Z | 2018-01-19T13:09:20Z | https://github.com/weidai11/cryptopp/issues/567 | 289,963,642 | 567 |
[
"weidai11",
"cryptopp"
] | * State the operating system and version (Ubutnu 17 x86_64, Windows 7 Professional x64, etc)
* State the version of the Crypto++ library (Crypto++ 5.6.5, Master, etc)
* State how you built the library (Makefile, Cmake, distro, etc)
* Show a typical command line (the output of the compiler for cryptlib.cpp)
* Show the link command (the output of the linker for libcryptopp.so or cryptest.exe)
* Show the exact error message you are receiving (copy and paste it); or
* Clearly state the undesired behavior (and state the expected behavior)
1. Building on Ubuntu 16.10
2. Crytpopp 5.6.5
3. Build using directions at [ARM Embedded (Command Line)](https://www.cryptopp.com/wiki/ARM_Embedded_(Command_Line)). In the setenv-embedded.sh script, I changed version of gnueabi to 6. Docs use 4.7.3
4. File successfully made into object:
```
/usr/bin/arm-linux-gnueabi-g++ -DNDEBUG -g2 -O3 -fPIC -pipe -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -Wl,--fix-cortex-a8 -I/usr/arm-linux-gnueabi/include/c++/6 -I/usr/arm-linux-gnueabi/include/c++/6/arm-linux-gnueabi --sysroot=/usr/arm-linux-gnueabi -c fips140.cpp
```
5. Doesn't reach linking
6. Error:
```
/usr/lib/gcc-cross/arm-linux-gnueabi/6/include/arm_neon.h:12253:1: error: inlining failed in call to always_inline ‘uint64x2_t veorq_u64(uint64x2_t, uint64x2_t)’: target specific option mismatch
veorq_u64 (uint64x2_t __a, uint64x2_t __b)
^~~~~~~~~
gcm-simd.cpp:285:32: note: called from here
*(uint64x2_t*)a = veorq_u64(*(uint64x2_t*)b, *(uint64x2_t*)c);
GNUmakefile-cross:461: recipe for target 'gcm-simd.o' failed
```
7. The build process fails for cross-compilation
| Cross Compile for ARM Failure | https://api.github.com/repos/weidai11/cryptopp/issues/565/comments | 15 | 2018-01-16T17:13:53Z | 2018-01-23T18:55:07Z | https://github.com/weidai11/cryptopp/issues/565 | 288,986,602 | 565 |
[
"weidai11",
"cryptopp"
] | Our [Travis Asan test is now failing](https://travis-ci.org/noloader/cryptopp/jobs/328664087). The failure first surfaced at [Build #722](https://travis-ci.org/noloader/cryptopp/builds/328664082). It uses Clang 5.0 on Linux.
```
...
Testing KDF algorithm HKDF(SHA-1).
....
Testing KDF algorithm HKDF(SHA-256).
...
Testing KDF algorithm HKDF(SHA-512).
.....
Testing KDF algorithm HKDF(Whirlpool).
.....
Tests complete. Total tests = 7751. Failed tests = 0.
==2871==LeakSanitizer has encountered a fatal error.
==2871==HINT: For debugging, try setting environment variable LSAN_OPTIONS=verbosity=1:log_threads=1
==2871==HINT: LeakSanitizer does not work under ptrace (strace, gdb, etc)
```
-----
Here are the build system details.
```
Build system information
Build language: cpp
Build group: stable
Build dist: trusty
Build id: 328664082
Job id: 328664087
Runtime kernel version: 4.14.12-041412-generic
travis-build version: d08e1022d
Build image provisioning date and time
Tue Dec 5 20:11:19 UTC 2017
Operating System Details
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
Cookbooks Version
7c2c6a6 https://github.com/travis-ci/travis-cookbooks/tree/7c2c6a6
git version
git version 2.15.1
bash version
GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
gcc version
gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
Copyright (C) 2013 Free Software Foundation, Inc.
...
``` | LeakSanitizer crash on Travis | https://api.github.com/repos/weidai11/cryptopp/issues/564/comments | 4 | 2018-01-14T13:09:16Z | 2018-02-03T16:26:59Z | https://github.com/weidai11/cryptopp/issues/564 | 288,407,359 | 564 |
[
"weidai11",
"cryptopp"
] | Does anybody know why I'm getting this error? [https://pastebin.com/YeGA4dgN](https://pastebin.com/YeGA4dgN)
I just want make fingerprint of a file and put it into string.
```
CryptoPP::SHA256 sha256Hasher;
CryptoPP::FileSource createFileFingerprint(filePath.c_str(), true, new CryptoPP::HashFilter(sha256Hasher, new CryptoPP::HexEncoder(new CryptoPP::StringSink(fileFingerprint))));
``` | Undefined reference to BufferedTransformation | https://api.github.com/repos/weidai11/cryptopp/issues/563/comments | 0 | 2018-01-13T11:00:39Z | 2018-01-13T14:19:23Z | https://github.com/weidai11/cryptopp/issues/563 | 288,320,469 | 563 |
[
"weidai11",
"cryptopp"
] | >State the operating system and version (Ubutnu 17 x86_64, Windows 7 Professional x64, etc)
`FreeBSD freebsd 10.3-RELEASE-p11 FreeBSD 10.3-RELEASE-p11 #0: Mon Oct 24 18:49:24 UTC 2016 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64`
>State the version of the Crypto++ library (Crypto++ 5.6.5, Master, etc)
Tested against f1a80e6a58e6cf72c969dda6825b9781eb300927 and 591d70f1c7a92072765abe8dc0d3fbaf18411505
>State how you built the library (Makefile, Cmake, distro, etc)
>Show a typical command line (the output of the compiler for cryptlib.cpp)
>Show the link command (the output of the linker for libcryptopp.so or cryptest.exe)
`cd deps/cryptopp/ && gmake CXXFLAGS="-march=native -DCRYPTOPP_NO_CPU_FEATURE_PROBES=1" static` as noted [here](https://build.getmonero.org/builders/kovri-all-freebsd64/builds/752/steps/compile/logs/stdio). Note: also reproducible with clang++39.
>Show the exact error message you are receiving (copy and paste it); or
>Clearly state the undesired behavior (and state the expected behavior)
- https://github.com/monero-project/kovri/pull/788#issuecomment-357094475
- [Expected behavior](https://build.getmonero.org/builders/kovri-all-freebsd64/builds/753/steps/test/logs/stdio) with pre-processor patch noted in the above comment.
>throwIfNotUsed is ignored if using a compiler that does not support std::uncaught_exception(), such as MSVC 7.0 and earlier.
I don't think this applies but noting in case I've overlooked another caveat. | FreeBSD/Clang++38: AlgorithmParameters/MakeParameters throws when used | https://api.github.com/repos/weidai11/cryptopp/issues/562/comments | 28 | 2018-01-12T00:55:08Z | 2018-02-02T15:00:17Z | https://github.com/weidai11/cryptopp/issues/562 | 287,975,436 | 562 |
[
"weidai11",
"cryptopp"
] | @noloader,
Please forgive me in advance if this issue should go to the mailing list but:
1. this issue is more of a request than a question
2. there is no cryptopp project/meta repo
3. https://github.com/weidai11/cryptopp/ doesn't offer an issues page
4. email (at least for me) can be unreliable
On the notion of a donation option: there is currently no donation page for non-code donation options (AFAICT). I know you are a generous person, @noloader, but would it be possible for the *cryptopp project* to receive monetary and/or cryptocurrency donations? I know that the possibility of receiving donations can open a can of worms (who maintains/houses the funds, etc.) but perhaps the worms can be tackled for the betterment of the project?
On the notion of bug bounty: this could increase the reward surface for code-review though I can't seem to find cryptopp's formal stance on the matter. Perhaps combined with a donation option, cryptopp could benefit from both a donation option and a bug bounty program? | [Request] Donation option + bug bounty option | https://api.github.com/repos/weidai11/cryptopp/issues/561/comments | 5 | 2018-01-11T03:55:30Z | 2018-08-18T12:19:38Z | https://github.com/weidai11/cryptopp/issues/561 | 287,656,138 | 561 |
[
"weidai11",
"cryptopp"
] | There are a few places where 5.6.5 has problems with the changes in C++17. I've been compiling on a recent (self built from current head) of clang (so using libc++). There are two main problems:
* The addition of `std::byte` causes some confusion in a couple of places.
* `std::bind2nd` has been removed
I'm happy to work up a pull request if you want for this. For `std::byte` I think the first thing is to just fully qualify the names, but in the long run maybe using `std::byte` is the right approach?
For the second I think using lambdas instead should be fine, maybe only for C++14 or later.
| C++17 support | https://api.github.com/repos/weidai11/cryptopp/issues/558/comments | 11 | 2018-01-06T05:04:46Z | 2018-01-13T15:52:08Z | https://github.com/weidai11/cryptopp/issues/558 | 286,460,088 | 558 |
[
"weidai11",
"cryptopp"
] | This is fairly trivial, but I thought I'd mention it anyway.
Where pointer values are being put into the oss ostringstream in fipstest.cpp, the output has two lots of 0x (at least, it does when built with MinGW). For example:
```
Crypto++ DLL integrity check may fail. Expected module base address is **0x0x**42900000, but module loaded at **0x0x**63500000.
```
The issue is that std::hex used on a pointer value already includes the 0x, but the code in fipstest.cpp adds the 0x into the debug string too, e.g.
```
std::ostringstream oss;
oss << "Crypto++ DLL integrity check may fail. Expected module base address is 0x";
oss << std::hex << g_BaseAddressOfMAC << ", but module loaded at 0x" << h << ".\n";
OutputDebugStringA(oss.str().c_str());
```
This can be replicated using a really simple test program, built with mingw:
```
#include <iostream>
int main() {
const void* g_BaseAddressOfMAC = reinterpret_cast<void*>(0x42900000);
std::cout << std::hex << "0x" << g_BaseAddressOfMAC << std::endl;
const int* ptr = reinterpret_cast<int*>(100);
const int val = 100;
std::cout << std::hex << "0x" << ptr << std::endl;
std::cout << std::hex << "0x" << val << std::endl;
return 0;
}
```
Output is:
0x0x42900000
0x0x64
0x64
I did say trivial, but maybe someone would like to check and/or fix it when it's convenient.
| Minor debug text output issue - duplicated 0x in pointer values | https://api.github.com/repos/weidai11/cryptopp/issues/557/comments | 5 | 2018-01-05T17:03:57Z | 2018-01-06T00:00:56Z | https://github.com/weidai11/cryptopp/issues/557 | 286,346,994 | 557 |
[
"weidai11",
"cryptopp"
] | Hi. I want cross-compile my project, that use CryptoPP using [MXE](http://mxe.cc/) (MinGW). The problem is **std::byte**, which is C++17 functionality. Since MXE only supports C++11 I need some alternative.
The key generation and encryption looks something like this:
```
byte key[32];
randomGenerator.GenerateBlock(key, sizeof(key));
CryptoPP::StringSource keyToString(key, sizeof(key), true, new CryptoPP::StringSink(aesKey));
CryptoPP::AES::Encryption aesEncryptor((byte*)aesKey.c_str(), aesKey.length());
```
But I'm getting lot of errors, that obviously mean, that compiler can't understand what "byte" is and mark it as undefined reference. | How to generate AES key if I can't use std::byte since I can't use C++17? | https://api.github.com/repos/weidai11/cryptopp/issues/556/comments | 1 | 2018-01-02T17:20:45Z | 2018-01-02T22:49:41Z | https://github.com/weidai11/cryptopp/issues/556 | 285,487,065 | 556 |
[
"weidai11",
"cryptopp"
] | Hello CryptoPP mantainers: maybe it's already been answered already, but I haven't found it anywhere: why does CyproPP's makefile not enable compiler warnings?
Some header files give warnings If I `#include` them, mostly signed and unsigned comparisons.
I've seen that you have started fixing warnings in commit 5f083d652e4fb9698e0e22d3629311749d4142a6 and commit ba98c2bfb92eedd541622a2d904a6d4b35b5dd71 in the code, but if you compile the library with `-Wall ` I still get a lot of warnings.
I don't know if all compilers support `-Wall`, so maybe simply adding `CXXFLAGS += -Wall` may break the compilation for some environments, but at least both `g++ ` and `clang `support that option.
Thank you, and happy new year!
| Enable compiler warnings | https://api.github.com/repos/weidai11/cryptopp/issues/555/comments | 8 | 2018-01-02T08:50:32Z | 2018-01-04T13:13:32Z | https://github.com/weidai11/cryptopp/issues/555 | 285,379,650 | 555 |
[
"weidai11",
"cryptopp"
] | Hello, I'm experiencing a compilation error with master, `commit `1a7f19cdde7c84c88f96c5a5125447a9f4df0025.
I've tried dropping to `-O2` as suggested in #553 but it does not fix the error.
I just compiled with `make `and the compilation aborted in `gcm-simd.cpp`. Here is the error
```
$ make
g++ -DNDEBUG -g2 -O3 -fPIC -DCRYPTOPP_DISABLE_SHA -pthread -pipe -mssse3 -mpclmul -c gcm-simd.cpp
gcm-simd.cpp: In function ‘void CryptoPP::GCM_Xor16_SSE2(CryptoPP::byte*, const CryptoPP::byte*, const CryptoPP::byte*)’:
gcm-simd.cpp:442: error: impossible register constraint in ‘asm’
gcm-simd.cpp:448: error: impossible register constraint in ‘asm’
make: *** [gcm-simd.o] Error 1
```
I'm running Red-Hat 6.7 and the compilers I have are
```
$ as --version
GNU assembler version 2.20.51.0.2-5.43.el6 20100205
Copyright 2009 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-redhat-linux'.
```
```
$ g++ --version
g++ (GCC) 4.4.7 20120313 (Red Hat 4.4.7-16)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```
```
$ ld --version
GNU ld version 2.20.51.0.2-5.43.el6 20100205
Copyright 2009 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
```
Thank you. | Compilation error with g++: impossible register constraint in ‘asm’ | https://api.github.com/repos/weidai11/cryptopp/issues/554/comments | 7 | 2018-01-02T08:48:32Z | 2018-01-10T13:37:27Z | https://github.com/weidai11/cryptopp/issues/554 | 285,379,350 | 554 |
[
"weidai11",
"cryptopp"
] | It looks like XLC is miscompiling SM3 at `-O3`. Dropping back to `-O2` is OK.
```
$ ./cryptest.exe tv sm3
Using seed: 1514680217
Testing MessageDigest algorithm SM3.
AlgorithmType: MessageDigest
Comment: Appendix B, test vector 1
Digest: 66c7f0f4 62eeedd9 d1f2d46b dc10e4e2 4167c487 5cf2f7a2 297da02b 8f4ba8e0
Message: 616263
Name: SM3
Source: SM3 Hash function, https://tools.ietf.org/html/draft-shen-sm3-hash
Test: Verify
Test failed.
Skipping to next test.
.AlgorithmType: MessageDigest
Comment: Appendix B, test vector 2
Digest: debe9ff9 2275b8a1 38604889 c18e5a4d 6fdb70e5 387e5765 293dcba3 9c0c5732
Message: 61626364 61626364 61626364 61626364 61626364 61626364 61626364 61626364 61626364 61626364 61626364 61626364 61626364 61626364 61626364 61626364
...
```
-----
This works for the makefile, but the problem is people who do not use it (like Autoconf and Cmake users):
```
$ git diff GNUmakefile
diff --git a/GNUmakefile b/GNUmakefile
index d8247ac..7e49cdc 100755
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1024,6 +1024,12 @@ rdrand-%.o:
./rdrand-nasm.sh
endif
+# IBM XLC -O3 optimization bug
+ifeq ($(XLC_COMPILER),1)
+sm3.o : sm3.cpp
+ $(CXX) $(strip $(subst -O3,-O2,$(CXXFLAGS)) -c) $<
+endif
+
# SSSE3 or NEON available
aria-simd.o : aria-simd.cpp
$(CXX) $(strip $(CXXFLAGS) $(ARIA_FLAG) -c) $<
```
-----
According to [IBM XL C/C++ equivalent to #pragma GCC optimize](https://stackoverflow.com/q/46252763/608639) there are some ways to apply `-O2` at the source level. We tried `#pragma options optimize=2` but it did not work. The miscompile was still present.
The following does not work either. Outside the unnamed namespace the self tests continue to fail. Inside the unnamed namespace it fails to compile.
```
#if defined(CRYPTOPP_XLC_VERSION)
#pragma option_override(P0, "opt(level, 2)")
#pragma option_override(P1, "opt(level, 2)")
#pragma option_override(R1, "opt(level, 2)")
#pragma option_override(R2, "opt(level, 2)")
#pragma option_override(EE, "opt(level, 2)")
#pragma option_override(FF, "opt(level, 2)")
#pragma option_override(GG, "opt(level, 2)")
#pragma option_override(SM3_HashMultipleBlocks_CXX, "opt(level, 2)")
#endif
```
| XLC and SM3 failed self tests at -O3 | https://api.github.com/repos/weidai11/cryptopp/issues/553/comments | 1 | 2017-12-31T00:33:10Z | 2018-01-22T21:57:57Z | https://github.com/weidai11/cryptopp/issues/553 | 285,232,305 | 553 |
[
"weidai11",
"cryptopp"
] | We got GCC 5.4 installed on Solaris 11.3 according to [Where is GCC-5 after installing it on Solaris 11?](https://unix.stackexchange.com/q/339296/56041) It looks like a new compiler is available, but an old assembler is still being used.
```
$ g++ --version
g++ (GCC) 5.4.0
...
$ gmake
...
g++ -DNDEBUG -g2 -O3 -fPIC -m64 -Wa,--divide -pthread -pipe -msse4.2 -msha -c sha-simd.cpp
{standard input}: Assembler messages:
{standard input}:166: Error: no such instruction: `sha1rnds4 $0,%xmm0,%xmm7'
{standard input}:199: Error: no such instruction: `sha1nexte %xmm0,%xmm2'
{standard input}:206: Error: no such instruction: `sha1msg1 %xmm0,%xmm10'
{standard input}:212: Error: no such instruction: `sha1rnds4 $0,%xmm2,%xmm9'
{standard input}:239: Error: no such instruction: `sha1nexte %xmm2,%xmm7'
...
```
The source file can be found at [`sha-simd.cpp`](https://github.com/weidai11/cryptopp/blob/master/sha-simd.cpp), and it is simply uses SHA intrinsics.
We are trying to figure out how to update the assembler. Also see [How to update Solaris assembler after updating to GCC 5?](https://unix.stackexchange.com/q/413520/56041)
If we can't update the assembler then we will probably have to disable SHA extensions. Its will be unfortunate if we have to go this route. Accelerated SHA-1 runs at 1.7 cpb, and SHA-256 runs at 3.9 cpb. | Solaris i86pc, GCC 5.4 and Error: no such instruction: `sha1rnds4 $0,%xmm0,%xmm7' | https://api.github.com/repos/weidai11/cryptopp/issues/551/comments | 1 | 2017-12-28T19:23:08Z | 2017-12-29T00:18:55Z | https://github.com/weidai11/cryptopp/issues/551 | 284,975,014 | 551 |
[
"weidai11",
"cryptopp"
] | Since moving to VS2017 with Crypto++ compiled through vcpkg I've started to see a memory leak. Crypto++ is statically linked into a DLL which is loaded by the main program. One of the leaks has this call stack when I load the DLL when running a unit test:
```
ntdll.dll!RtlAllocateHeap 771113b0
ucrtbase.dll!malloc_base 76978d96
MyDll.dll!CryptoPP::UnalignedAllocate Line 256 + 0x14 bytes 0f6078a4
MyDll.dll!CryptoPP::Integer::Integer Line 2926 + 0x55 bytes 0f60c995
MyDll.dll!CryptoPP::Singleton<CryptoPP::Integer,CryptoPP::NewInteger<2>,0>::Ref Line 303 + 0x9f bytes 0f60f4df
MyDll.dll!CryptoPP::`anonymous namespace'::`dynamic initializer for 's_two'' Line 3047 + 0xc bytes 0f6010bc
ucrtbase.dll!initterm 769729e3
MyDll.dll!dllmain_crt_process_attach Line 63 + 0x8c bytes 0f61d258
MyDll.dll!dllmain_crt_dispatch Line 137 + 0x3b bytes 0f61d1b4
MyDll.dll!dllmain_dispatch Line 194 + 0x6e bytes 0f61d3c1
MyDll.dll!_DllMainCRTStartup Line 252 + 0x1c bytes 0f61d4a2
ntdll.dll!WinSqmAddToStream 7713e726
ntdll.dll!RtlDeactivateActivationContextUnsafeFast 7710cbef
ntdll.dll!LdrShutdownProcess 77107baa
ntdll.dll!LdrShutdownProcess 77107a44
ntdll.dll!LdrShutdownProcess 77107a63
ntdll.dll!RtlIsCriticalSectionLockedByThread 7712014d
ntdll.dll!RtlPrefixUnicodeString 77109012
ntdll.dll!LdrControlFlowGuardEnforced 7711b63e
ntdll.dll!LdrLoadDll 7711e8de
```
Could this be related to #372 or is it a problem with the way vcpkg compiles the static library?
Can I safely ignore this?
Edit: I'm compiling with the /permissive- flag and C++14
----
Windows 10 64-bit
VS2017 Pro 15.5.2
Crypto++ 5.6.5 vcpkg version
| Memory leak in Singleton::Ref()? | https://api.github.com/repos/weidai11/cryptopp/issues/550/comments | 11 | 2017-12-19T16:06:52Z | 2018-05-04T18:10:11Z | https://github.com/weidai11/cryptopp/issues/550 | 283,283,910 | 550 |
[
"weidai11",
"cryptopp"
] | `adv-simd.h` has code to process multiple blocks at a time using SSE, NEON or Altivec. During decryption things sometimes run in reverse, including the walk of the buffers. The code to accomplish a negative stride looks like so:
```
const size_t blockSize = 16;
size_t inIncrement = (flags & (BT_InBlockIsCounter|BT_DontIncrementInOutPointers)) ? 0 : blockSize;
size_t xorIncrement = xorBlocks ? blockSize : 0;
size_t outIncrement = (flags & BT_DontIncrementInOutPointers) ? 0 : blockSize;
if (flags & BT_ReverseDirection)
{
inBlocks += length - blockSize;
xorBlocks += length - blockSize;
outBlocks += length - blockSize;
inIncrement =0-inIncrement;
xorIncrement =0-xorIncrement;
outIncrement = 0-outIncrement;
}
```
After a block is processed pointers are incremented, which may walk backwards:
```
inBlocks += inIncrement;
outBlocks += outIncrement;
xorBlocks += xorIncrement;
```
Travis Clang 5.0 and UBsan is producing a finding on the pointer increment:
```
Testing Default Encryptors and Decryptors...
adv-simd.h:1138:26: runtime error: addition of unsigned offset to 0x000003f78cf0 overflowed to 0x000003f78ce0
adv-simd.h:1140:26: runtime error: addition of unsigned offset to 0x000003f78ce0 overflowed to 0x000003f78cd0
adv-simd.h:1142:26: runtime error: addition of unsigned offset to 0x000003f78cd0 overflowed to 0x000003f78cc0
adv-simd.h:1144:26: runtime error: addition of unsigned offset to 0x000003f78cc0 overflowed to 0x000003f78cb0
adv-simd.h:1166:27: runtime error: addition of unsigned offset to 0x000003f78ce0 overflowed to 0x000003f78cd0
adv-simd.h:1168:27: runtime error: addition of unsigned offset to 0x000003f78cd0 overflowed to 0x000003f78cc0
adv-simd.h:1170:27: runtime error: addition of unsigned offset to 0x000003f78cc0 overflowed to 0x000003f78cb0
adv-simd.h:1172:27: runtime error: addition of unsigned offset to 0x000003f78cb0 overflowed to 0x000003f78ca0
adv-simd.h:1176:23: runtime error: addition of unsigned offset to 0x000003f769c0 overflowed to 0x000003f769b0
adv-simd.h:1178:23: runtime error: addition of unsigned offset to 0x000003f769b0 overflowed to 0x000003f769a0
adv-simd.h:1180:23: runtime error: addition of unsigned offset to 0x000003f769a0 overflowed to 0x000003f76990
adv-simd.h:1182:23: runtime error: addition of unsigned offset to 0x000003f76990 overflowed to 0x000003f76980
adv-simd.h:1205:18: runtime error: addition of unsigned offset to 0x000003f76180 overflowed to 0x000003f76170
adv-simd.h:1206:19: runtime error: addition of unsigned offset to 0x000003f74e40 overflowed to 0x000003f74e30
adv-simd.h:1207:19: runtime error: addition of unsigned offset to 0x000003f76170 overflowed to 0x000003f76160
```
-----
The problem is, Clang is detecting signed ***overflow***, which is undefined behavior. The code above (as written) depends on unsigned ***wrap***, and that's well defined behavior. | Clang 5.0 UBsan finding | https://api.github.com/repos/weidai11/cryptopp/issues/549/comments | 1 | 2017-12-16T20:00:14Z | 2017-12-16T23:26:53Z | https://github.com/weidai11/cryptopp/issues/549 | 282,646,680 | 549 |
[
"weidai11",
"cryptopp"
] | Testing on Pine64 dev-board, HiKey dev-board and GCC118 from the compile farm shows the following results. GCC118, which is powered by an AMD chip, runs at 2.0 GHz.
NEON/ASIMD was initially disable due to Cortex-A57 and slow word rotates (see [Issue 367](http://github.com/weidai11/cryptopp/issues/367)), which caused our initial NEON cut-in to run about 3 cpb slower than C++. We've applied a fair number of optimizations based on feedback from Louis Wingers and Bryan Weeks, and it looks like we can re-enable NEON/ASIMD.
-----
***GCC118, Enable NEON/ASIMD***:
Algorithm | MiB/Second | Cycles Per Byte | u-sec key setup | cycles key setup
----------|------------|-----------------|-----------------|-----------------
SIMON-64(96)/CTR (96-bit key) | 112 | 17.04 | 0.460 | 919
SIMON-64(128)/CTR (128-bit key) | 107 | 17.82 | 0.455 | 910
SIMON-128(128)/CTR (128-bit key) | 78 | 24.6 | 0.480 | 960
SIMON-128(192)/CTR (192-bit key) | 77 | 24.9 | 0.478 | 955
SIMON-128(256)/CTR (256-bit key) | 73 | 26.0 | 0.528 | 1056
SPECK-64(96)/CTR (96-bit key) | 242 | 7.88 | 0.398 | 797
SPECK-64(128)/CTR (128-bit key) | 233 | 8.17 | 0.397 | 793
SPECK-128(128)/CTR (128-bit key) | 225 | 8.48 | 0.380 | 760
SPECK-128(192)/CTR (192-bit key) | 220 | 8.69 | 0.374 | 747
SPECK-128(256)/CTR (256-bit key) | 213 | 8.97 | 0.415 | 830
***GCC118, Disable NEON/ASIMD***:
Algorithm | MiB/Second | Cycles Per Byte | u-sec key setup | cycles key setup
----------|------------|-----------------|-----------------|-----------------
SIMON-64(96)/CTR (96-bit key) | 59 | 32.3 | 0.425 | 850
SIMON-64(128)/CTR (128-bit key) | 58 | 33.0 | 0.426 | 852
SIMON-128(128)/CTR (128-bit key) | 76 | 25.1 | 0.494 | 989
SIMON-128(192)/CTR (192-bit key) | 76 | 25.2 | 0.500 | 999
SIMON-128(256)/CTR (256-bit key) | 72 | 26.5 | 0.522 | 1043
SPECK-64(96)/CTR (96-bit key) | 108 | 17.68 | 0.354 | 707
SPECK-64(128)/CTR (128-bit key) | 106 | 17.97 | 0.362 | 725
SPECK-128(128)/CTR (128-bit key) | 176 | 10.82 | 0.391 | 782
SPECK-128(192)/CTR (192-bit key) | 170 | 11.21 | 0.385 | 771
SPECK-128(256)/CTR (256-bit key) | 168 | 11.33 | 0.383 | 766
-----
***HiKey, Enable NEON***:
Algorithm | MiB/Second | Cycles Per Byte | u-sec key setup | cycles key setup
----------|------------|-----------------|-----------------|-----------------
SIMON-64(96)/CTR (96-bit key) | 33 | 33.5 | 1.032 | 1181
SIMON-64(128)/CTR (128-bit key) | 31 | 34.9 | 1.098 | 1257
SIMON-128(128)/CTR (128-bit key) | 43 | 25.4 | 1.109 | 1270
SIMON-128(192)/CTR (192-bit key) | 42 | 25.7 | 1.093 | 1251
SIMON-128(256)/CTR (256-bit key) | 41 | 26.6 | 1.191 | 1363
SPECK-64(96)/CTR (96-bit key) | 49 | 22.26 | 0.945 | 1082
SPECK-64(128)/CTR (128-bit key) | 48 | 22.85 | 0.934 | 1069
SPECK-128(128)/CTR (128-bit key) | 85 | 12.79 | 0.944 | 1081
SPECK-128(192)/CTR (192-bit key) | 73 | 14.95 | 0.981 | 1122
SPECK-128(256)/CTR (256-bit key) | 82 | 13.39 | 0.983 | 1125
***HiKey, Disable NEON***:
Algorithm | MiB/Second | Cycles Per Byte | u-sec key setup | cycles key setup
----------|------------|-----------------|-----------------|-----------------
SIMON-64(96)/CTR (96-bit key) | 33 | 33.5 | 1.065 | 1218
SIMON-64(128)/CTR (128-bit key) | 31 | 34.9 | 1.125 | 1288
SIMON-128(128)/CTR (128-bit key) | 43 | 25.4 | 1.119 | 1281
SIMON-128(192)/CTR (192-bit key) | 42 | 25.7 | 1.102 | 1261
SIMON-128(256)/CTR (256-bit key) | 41 | 26.6 | 1.202 | 1375
SPECK-64(96)/CTR (96-bit key) | 49 | 22.26 | 0.959 | 1097
SPECK-64(128)/CTR (128-bit key) | 48 | 22.85 | 0.950 | 1087
SPECK-128(128)/CTR (128-bit key) | 85 | 12.79 | 0.957 | 1095
SPECK-128(192)/CTR (192-bit key) | 73 | 14.95 | 1.017 | 1164
SPECK-128(256)/CTR (256-bit key) | 82 | 13.39 | 1.011 | 1157
| Enable NEON on Aarch32/Aarch64 for Simon and Speck | https://api.github.com/repos/weidai11/cryptopp/issues/545/comments | 1 | 2017-12-05T17:56:14Z | 2017-12-05T23:56:27Z | https://github.com/weidai11/cryptopp/issues/545 | 279,471,449 | 545 |
[
"weidai11",
"cryptopp"
] | When cross-compiling for android, one can set the API to build against by using `AOSP_API`. This sets up the system root as well include paths. However, for the latest NDK (r16) there are 2 Problems with the script:
1. You don't set the `__ANDROID_API__` for the `AOSP_FLAGS`! This needs to be set to the api version number (e.g. 21), as it is used in the android include files to enable code sections used for backward compability. Please add `-D__ANDROID_API__=<version>` to the `AOSP_FLAGS` in setenv-android.h. Otherwise it is not possible to compile against an abi older then 21.
2. A few include paths are missing. Currently, you are only setting `AOSP_STL_INC` and `AOSP_BITS_INC`, which are used as include path. But there are actually 2 more:
- `$ANDROID_NDK_ROOT/sysroot/usr/include/<abi-specific>`. This contains additional abi specific headers. In case of arm, for example, it becomes `$ANDROID_NDK_ROOT/sysroot/usr/include/arm-linux-androideabi`
- `$ANDROID_NDK_ROOT/sysroot/usr/include/`: A generic include path, containing many additional header definitions. Is required because it's the only place where includes like `wchar.h` can be found. The other paths only provide `cwchar` etc. Should propably be set as the last include path to search for headers.
With these 2 changes, I was able to compile with the latest ndk. I haven't tried older NDKs yet, but these changes should not break anything for older NDKs. If you need more details on what did not work without these changes, I can add more details. | Missing compile/link flags on Android | https://api.github.com/repos/weidai11/cryptopp/issues/544/comments | 3 | 2017-12-05T15:25:31Z | 2018-01-21T14:05:35Z | https://github.com/weidai11/cryptopp/issues/544 | 279,415,721 | 544 |
[
"weidai11",
"cryptopp"
] | Here is the full finding:
```
$ make valgrind
...
$ valgrind --track-origins=yes ./cryptest.exe tv salsa
...
Using seed: 1511955526
Testing SymmetricCipher algorithm Salsa20.
......==7615== Conditional jump or move depends on uninitialised value(s)
==7615== at 0x4C34C26: __memcmp_sse4_1 (vg_replace_strmem.c:1099)
==7615== by 0x48B3B5: compare (char_traits.h:310)
==7615== by 0x48B3B5: __gnu_cxx::__enable_if<std::__is_char<char>::__value, bool>::__type std::operator==<char>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (basic_string.h:6006)
==7615== by 0x4F8B2B: operator!=<char, std::char_traits<char>, std::allocator<char> > (basic_string.h:6045)
==7615== by 0x4F8B2B: CryptoPP::Test::TestSymmetricCipher(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >&, CryptoPP::NameValuePairs const&) (datatest.cpp:502)
==7615== by 0x4FD2D4: CryptoPP::Test::TestDataFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, CryptoPP::NameValuePairs const&, unsigned int&, unsigned int&) (datatest.cpp:851)
==7615== by 0x4FD8FF: CryptoPP::Test::RunTestDataFile(char const*, CryptoPP::NameValuePairs const&, bool) (datatest.cpp:898)
==7615== by 0x42A6D6: CryptoPP::Test::scoped_main(int, char**) (test.cpp:310)
==7615== by 0x42B3F7: main (test.cpp:986)
==7615== Uninitialised value was created by a stack allocation
==7615== at 0x661638: CryptoPP::Salsa20_Policy::OperateKeystream(CryptoPP::KeystreamOperation, unsigned char*, unsigned char const*, unsigned long) (salsa.cpp:493)
==7615==
==7615== Conditional jump or move depends on uninitialised value(s)
==7615== at 0x4C34C26: __memcmp_sse4_1 (vg_replace_strmem.c:1099)
==7615== by 0x48B3B5: compare (char_traits.h:310)
==7615== by 0x48B3B5: __gnu_cxx::__enable_if<std::__is_char<char>::__value, bool>::__type std::operator==<char>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (basic_string.h:6006)
==7615== by 0x4F8D58: operator!=<char, std::char_traits<char>, std::allocator<char> > (basic_string.h:6045)
==7615== by 0x4F8D58: CryptoPP::Test::TestSymmetricCipher(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >&, CryptoPP::NameValuePairs const&) (datatest.cpp:515)
==7615== by 0x4FD2D4: CryptoPP::Test::TestDataFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, CryptoPP::NameValuePairs const&, unsigned int&, unsigned int&) (datatest.cpp:851)
==7615== by 0x4FD8FF: CryptoPP::Test::RunTestDataFile(char const*, CryptoPP::NameValuePairs const&, bool) (datatest.cpp:898)
==7615== by 0x42A6D6: CryptoPP::Test::scoped_main(int, char**) (test.cpp:310)
==7615== by 0x42B3F7: main (test.cpp:986)
==7615== Uninitialised value was created by a stack allocation
==7615== at 0x66167F: CryptoPP::Salsa20_Policy::OperateKeystream(CryptoPP::KeystreamOperation, unsigned char*, unsigned char const*, unsigned long) (salsa.cpp:493)
==7615==
.....
Testing SymmetricCipher algorithm XSalsa20.
................................................................................................
Tests complete. Total tests = 107. Failed tests = 0.
```
| Valgrind, Salsa20 and "Conditional jump or move depends on uninitialised value" | https://api.github.com/repos/weidai11/cryptopp/issues/543/comments | 2 | 2017-11-29T11:40:29Z | 2017-11-29T12:37:45Z | https://github.com/weidai11/cryptopp/issues/543 | 277,723,274 | 543 |
[
"weidai11",
"cryptopp"
] | SM2 is a 4-part Chinese national standard for public key algorithms, including digital signatures and elliptic curves. See [SM2 Digital Signature Algorithm](https://tools.ietf.org/html/draft-shen-sm2-ecdsa-02). We recently received some private emails asking for several Chinese algorithms. The email also pointed out US and some European algorithms have good coverage in the library. | Add SM2 public key and elliptic curve algorithms | https://api.github.com/repos/weidai11/cryptopp/issues/542/comments | 3 | 2017-11-25T10:00:17Z | 2019-03-31T14:36:35Z | https://github.com/weidai11/cryptopp/issues/542 | 276,739,772 | 542 |
[
"weidai11",
"cryptopp"
] | SM3 is a Chinese national hash function. See [SM3 Hash function](https://tools.ietf.org/html/draft-shen-sm3-hash). We recently received some private emails asking for several Chinese algorithms. The email also pointed out US and some European algorithms have good coverage in the library. | Add SM3 hash function | https://api.github.com/repos/weidai11/cryptopp/issues/541/comments | 2 | 2017-11-24T00:41:45Z | 2017-11-24T11:16:19Z | https://github.com/weidai11/cryptopp/issues/541 | 276,490,308 | 541 |
[
"weidai11",
"cryptopp"
] | SM4 (formerly SMS4) is a Chinese national block cipher. See [SMS4 Encryption Algorithm for Wireless Networks](https://eprint.iacr.org/2008/329.pdf). We recently received some private emails asking for several Chinese algorithms. The email also pointed out US and some European algorithms have good coverage in the library. | Add SM4 block cipher | https://api.github.com/repos/weidai11/cryptopp/issues/540/comments | 1 | 2017-11-23T15:27:04Z | 2018-07-13T13:12:58Z | https://github.com/weidai11/cryptopp/issues/540 | 276,411,521 | 540 |
[
"weidai11",
"cryptopp"
] | See [The SIMON and SPECK Families of Lightweight Block Ciphers](https://eprint.iacr.org/2013/404.pdf) by Ray Beaulieu, Douglas Shors, Jason Smith, Stefan Treatman-Clark, Bryan Weeks, Louis Wingers.
Additional sample code is available at [Noloader | Simon-and-Speck](https://github.com/noloader/Simon-and-Speck). The `SIMON-128(128)/CTR` reference implementation was modified to produce additional test vectors. | Add SIMON-64 and SIMON-128 block ciphers | https://api.github.com/repos/weidai11/cryptopp/issues/539/comments | 1 | 2017-11-21T09:57:34Z | 2017-12-03T11:48:12Z | https://github.com/weidai11/cryptopp/issues/539 | 275,649,397 | 539 |
[
"weidai11",
"cryptopp"
] | See [The SIMON and SPECK Families of Lightweight Block Ciphers](https://eprint.iacr.org/2013/404.pdf) by Ray Beaulieu, Douglas Shors, Jason Smith, Stefan Treatman-Clark, Bryan Weeks, Louis Wingers.
Additional sample code is available at [Noloader | Simon-and-Speck](https://github.com/noloader/Simon-and-Speck). The `SPECK-128(128)/CTR` reference implementation was modified to produce additional test vectors. | Add SPECK-64 and SPECK-128 block ciphers | https://api.github.com/repos/weidai11/cryptopp/issues/538/comments | 1 | 2017-11-20T11:28:58Z | 2017-12-03T11:49:25Z | https://github.com/weidai11/cryptopp/issues/538 | 275,323,113 | 538 |
[
"weidai11",
"cryptopp"
] | /usr/local/cryptopp565/filters.h:1000:64: error: extra ';' [-Wpedantic]
DOCUMENTED_TYPEDEF(StringSinkTemplate<std::string>, StringSink);
^
/usr/local/cryptopp565/filters.h:1284:46: error: extra ';' [-Wpedantic]
DOCUMENTED_TYPEDEF(StringSource, ArraySource);
Please remove the final semicolons in the distrib. Thanks!
Vincent | More semicolons to remove for gcc-7.2.0 -pedantic compatibility | https://api.github.com/repos/weidai11/cryptopp/issues/537/comments | 1 | 2017-11-20T01:03:53Z | 2017-11-20T02:42:08Z | https://github.com/weidai11/cryptopp/issues/537 | 275,210,885 | 537 |
[
"weidai11",
"cryptopp"
] | the new version do not support cmake?
i can not find the CMakelist.txt file in the new version | the new version do not support cmake? | https://api.github.com/repos/weidai11/cryptopp/issues/536/comments | 1 | 2017-11-19T04:16:47Z | 2017-11-19T07:39:26Z | https://github.com/weidai11/cryptopp/issues/536 | 275,130,930 | 536 |
[
"weidai11",
"cryptopp"
] | Users have been having trouble with variable block sizes in practice. The problem is the implementation, and I think the root cause is a bad fit under the current library design. Reported problems on the mailing list include [Threefish-1024 IV specification issue/documentation...or bug?](https://groups.google.com/forum/#!topic/cryptopp-users/9-QWtfAYxB4)
The bigger engineering problem is, variable block ciphers are a bad fit under the current design. We specify security parameters, like min and max key length and iv length, as template parameters. Later we rely on virtual functions and dynamic dispatch to override the default template parameters. Worse, users have to specify the block size they want through a `Name::BlockSize` parameter because a constructor is not available to take the block size (the `SetKey(byte* key, size_t keylen, unsigned int size)` ctor was taken for variable rounds). The design makes the interface a bit fragile and introduces subtle breaks, It also makes the existing interfaces harder to use correctly.
We are going to remove the support we added under [Issue 408, Add support for variable block sizes](https://github.com/weidai11/cryptopp/issues/408). The same algorithms will still be available, but they will need a class for each block size. For example, instead of `Threefish` we will offer a class with the block size in the name:
* `Threefish256`
* `Threefish512`
* `Threefish1024`
This issue will track removal.
-----
The thing that really bothers me about this one is, the fellow who posted on the mailing list used the library as advertised. He did the same thing folks have been doing for 25 years when using block ciphers. But because of the extra gyrations required for the variable block size, he did not arrive at the correct result. I'm not going to tolerate 25 years of user troubles.
| Remove variable block size support for block ciphers | https://api.github.com/repos/weidai11/cryptopp/issues/535/comments | 0 | 2017-11-17T03:04:20Z | 2018-01-19T01:27:51Z | https://github.com/weidai11/cryptopp/issues/535 | 274,737,121 | 535 |
[
"weidai11",
"cryptopp"
] | ```
std::string decoded2;
std::string first_20="1ACC64E9510C32CE8E34";
StringSource ssv(first_20, true /*pumpAll*/,
new HexDecoder(
new StringSink(decoded2)
) // HexDecoder
); // StringSource
boost::algorithm::to_lower(decoded2);
StringSource ss( decoded2, true,
new Base32Encoder(
new StringSink(hash_sink)
) // Base64Decoder
); // StringSource
std::cout<<"encoded raw:"<<hash_sink<<std::endl;
//I get "DMGGJ4MTBS3N7DTW" which is wrong
//instead of "DLGGJ2KRBQZM5DRU"
```
| Why doesn't this give correct result | https://api.github.com/repos/weidai11/cryptopp/issues/534/comments | 6 | 2017-11-16T08:14:05Z | 2017-11-16T09:03:17Z | https://github.com/weidai11/cryptopp/issues/534 | 274,428,134 | 534 |
[
"weidai11",
"cryptopp"
] | It looks like RSA broke somewhere along the line on OS X 10.9 with Apple Clang 6.0 on a Core2 Duo MacBook (x86_64). The issue is present with `libcryptopp.dylib` but not with `libcryptopp.a`.
I went back to [Issue 517,Add SHA3 OIDs for signature schemes](https://github.com/weidai11/cryptopp/issues/517) (actually, 1 commit prior), which seems like the natural place to break it. The issue was present there, too.
Using the static archive is OK. Crypto++ 5.6.5 is OK. MacPort compilers on the same machine are OK. Other machines, like Linux and Solaris, are OK.
-----
This may be related: [Explicit specialization of member function template in source file](https://stackoverflow.com/a/30530378/608639). We had a lot of trouble trying to squash Clang warnings for padding decoration functions and their definitions. It was one of the first things we worked on after 5.6.5 was released.
-----
Here's what it looks like running the test vector in question.
```
$ ./cryptest.exe tv rsa_pkcs1_1_5
Using seed: 1510528431
Testing Signature algorithm RSA/PKCS1-1.5(MD2).
.AlgorithmType: Signature
KeyFormat: DER
Message: 45 76 65 72 79 6f 6e 65 20 67 65 74 73 20 46 72 69 64 61 79 20 6f 66 66 2e
Name: RSA/PKCS1-1.5(MD2)
PrivateKey: 30 82 01 50 02 01 00 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 04 82 01 3a 30 82 01 36 02 01 00 02 40 0a 66 79 1d c6 98 81 68 de 7a b7 74 19 bb 7f b0 c0 01 c6 27 10 27 00 75 14 29 42 e1 9a 8d 8c 51 d0 53 b3 e3 78 2a 1d e5 dc 5a f4 eb e9 94 68 17 01 14 a1 df e6 7c dc 9a 9a f5 5d 65 56 20 bb ab 02 03 01 00 01 02 40 01 23 c5 b6 1b a3 6e db 1d 36 79 90 41 99 a8 9e a8 0c 09 b9 12 2e 14 00 c0 9a dc f7 78 46 76 d0 1d 23 35 6a 7d 44 d6 bd 8b d5 0e 94 bf c7 23 fa 87 d8 86 2b 75 17 76 91 c1 1d 75 76 92 df 88 81 02 20 33 d4 84 45 c8 59 e5 23 40 de 70 4b cd da 06 5f bb 40 58 d7 40 bd 1d 67 d2 9e 9c 14 6c 11 cf 61 02 20 33 5e 84 08 86 6b 0f d3 8d c7 00 2d 3f 97 2c 67 38 9a 65 d5 d8 30 65 66 d5 c4 f2 a5 aa 52 62 8b 02 20 04 5e c9 00 71 52 53 25 d3 d4 6d b7 96 95 e9 af ac c4 52 39 64 36 0e 02 b1 19 ba a3 66 31 62 41 02 20 15 eb 32 73 60 c7 b6 0d 12 e5 e2 d1 6b dc d9 79 81 d1 7f ba 6b 70 db 13 b2 0b 43 6e 24 ea da 59 02 20 2c a6 36 6d 72 78 1d fa 24 d3 4a 9a 24 cb c2 ae 92 7a 99 58 af 42 65 63 ff 63 fb 11 65 8a 46 1d
PublicKey: 30 5b 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 4a 00 30 47 02 40 0a 66 79 1d c6 98 81 68 de 7a b7 74 19 bb 7f b0 c0 01 c6 27 10 27 00 75 14 29 42 e1 9a 8d 8c 51 d0 53 b3 e3 78 2a 1d e5 dc 5a f4 eb e9 94 68 17 01 14 a1 df e6 7c dc 9a 9a f5 5d 65 56 20 bb ab 02 03 01 00 01
Signature: 05fa6a812fc7df8bf4f2542509e03e84 6e11b9c620be2009efb440efbcc66921 6994ac04f341b57d05202d428fb2a27b 5c77dfd9b15bfc3d559353503410c1e1
Source: http://www.rsasecurity.com/rsalabs/pkcs/index.html, Some Examples of the PKCS Standards
Test: Verify
Test failed.
Skipping to next test.
Testing Signature algorithm RSA/PKCS1-1.5(SHA-1).
AlgorithmType: Signature
KeyFormat: DER
Message: 45 76 65 72 79 6f 6e 65 20 67 65 74 73 20 46 72 69 64 61 79 20 6f 66 66 2e
Name: RSA/PKCS1-1.5(SHA-1)
PrivateKey: 30 82 01 50 02 01 00 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 04 82 01 3a 30 82 01 36 02 01 00 02 40 0a 66 79 1d c6 98 81 68 de 7a b7 74 19 bb 7f b0 c0 01 c6 27 10 27 00 75 14 29 42 e1 9a 8d 8c 51 d0 53 b3 e3 78 2a 1d e5 dc 5a f4 eb e9 94 68 17 01 14 a1 df e6 7c dc 9a 9a f5 5d 65 56 20 bb ab 02 03 01 00 01 02 40 01 23 c5 b6 1b a3 6e db 1d 36 79 90 41 99 a8 9e a8 0c 09 b9 12 2e 14 00 c0 9a dc f7 78 46 76 d0 1d 23 35 6a 7d 44 d6 bd 8b d5 0e 94 bf c7 23 fa 87 d8 86 2b 75 17 76 91 c1 1d 75 76 92 df 88 81 02 20 33 d4 84 45 c8 59 e5 23 40 de 70 4b cd da 06 5f bb 40 58 d7 40 bd 1d 67 d2 9e 9c 14 6c 11 cf 61 02 20 33 5e 84 08 86 6b 0f d3 8d c7 00 2d 3f 97 2c 67 38 9a 65 d5 d8 30 65 66 d5 c4 f2 a5 aa 52 62 8b 02 20 04 5e c9 00 71 52 53 25 d3 d4 6d b7 96 95 e9 af ac c4 52 39 64 36 0e 02 b1 19 ba a3 66 31 62 41 02 20 15 eb 32 73 60 c7 b6 0d 12 e5 e2 d1 6b dc d9 79 81 d1 7f ba 6b 70 db 13 b2 0b 43 6e 24 ea da 59 02 20 2c a6 36 6d 72 78 1d fa 24 d3 4a 9a 24 cb c2 ae 92 7a 99 58 af 42 65 63 ff 63 fb 11 65 8a 46 1d
PublicKey: 30 5b 30 0d 06 09 2a 86 48 86 f7 0d 01 01 01 05 00 03 4a 00 30 47 02 40 0a 66 79 1d c6 98 81 68 de 7a b7 74 19 bb 7f b0 c0 01 c6 27 10 27 00 75 14 29 42 e1 9a 8d 8c 51 d0 53 b3 e3 78 2a 1d e5 dc 5a f4 eb e9 94 68 17 01 14 a1 df e6 7c dc 9a 9a f5 5d 65 56 20 bb ab 02 03 01 00 01
Signature: 0610761F95FFD1B8F29DA34212947EC2AA0E358866A722F03CC3C41487ADC604A48FF54F5C6BEDB9FB7BD59F82D6E55D8F3174BA361B2214B2D74E8825E04E81
Source: generated by Wei Dai using Crypto++ 5.0
Test: Verify
Test failed.
Skipping to next test.
..AlgorithmType: Signature
KeyFormat: Component
Message: 74657374
ModPrime1PrivateExponent: 5D8EA4C8AF83A70634D5920C3DB66D908AC3AF57A597FD75BC9BBB856181C185
ModPrime2PrivateExponent: C598E54DAEC8ABC1E907769A6C2BD01653ED0C9960E1EDB7E186FDA922883A99
Modulus: A885B6F851A8079AB8A281DB0297148511EE0D8C07C0D4AE6D6FED461488E0D41E3FF8F281B06A3240B5007A5C2AB4FB6BE8AF88F119DB998368DDDC9710ABED
MultiplicativeInverseOfPrime2ModPrime1: 7C6F27B5B51B78AD80FB36E700990CF307866F2943124CBD93D97C137794C104
Name: RSA/PKCS1-1.5(SHA-1)
Prime1: D7103CD676E39824E2BE50B8E6533FE7CB7484348E283802AD2B8D00C80D19DF
Prime2: C89996DC169CEB3F227958275968804D4BE9FC4012C3219662F1A438C9950BB3
PrivateExponent: 2B259D2CA3DF851EE891F6F4678BDDFD9A131C95D3305C63D2723B4A5B9C960F5EC8BB7DCDDBEBD8B6A38767D64AD451E9383E0891E4EE7506100481F2B49323
PublicExponent: 010001
Signature: A7E00CE4391F914D82158D9B732759808E25A1C6383FE87A5199157650D4296CF612E9FF809E686A0AF328238306E79965F6D0138138829D9A1A22764306F6CE
Source: generated by Wei Dai using Crypto++ 5.0
Test: Verify
Test failed.
Skipping to next test.
Tests complete. Total tests = 6. Failed tests = 3.
``` | OS X 10.9, Clang 6.0 and RSA signature failures when using libcryptopp.dylib | https://api.github.com/repos/weidai11/cryptopp/issues/533/comments | 2 | 2017-11-12T23:26:08Z | 2017-12-26T03:40:25Z | https://github.com/weidai11/cryptopp/issues/533 | 273,275,855 | 533 |
[
"weidai11",
"cryptopp"
] | aes.h contains:
DOCUMENTED_TYPEDEF(Rijndael, AES);
Which expands into something ending in two ';'.
gcc 7.2.0 -Wall -Wextra hates it...
Thanks,
Vincent | aes.h double semicolon | https://api.github.com/repos/weidai11/cryptopp/issues/532/comments | 1 | 2017-11-10T21:22:50Z | 2017-11-12T06:31:55Z | https://github.com/weidai11/cryptopp/issues/532 | 273,063,778 | 532 |
[
"weidai11",
"cryptopp"
] | When building crypto++ with the default GNUmakefile and these parameters:
```
CXXFLAGS = -DNDEBUG -Os -s -fvisibility=hidden -ffunction-sections -fdata-sections -fPIC -arch ppc -arch i386 -arch x86_64 -isysroot/Developer/SDKs/MacOSX10.5.sdk -DMACOSX_DEPLOYMENT_TARGET=10.5 -mmacosx-version-min=10.5
LDFLAGS += -Wl,-dead_strip
```
Everything compiles fine. However, when linking with the statically compiled library you get the following error:
```
Undefined symbols:
"CryptoPP::AlignedDeallocate(void*)", referenced from:
CryptoPP::AllocatorWithCleanup<unsigned int, true>::deallocate(void*, unsigned long)in YourObj1.o
CryptoPP::AllocatorWithCleanup<unsigned char, true>::deallocate(void*, unsigned long)in YourObj2.o
"CryptoPP::AlignedAllocate(unsigned long)", referenced from:
CryptoPP::AllocatorWithCleanup<unsigned char, true>::allocate(unsigned long, void const*)in YourObj2.o
```
The fix is to the `config.h` file. Namely, change this:
```
#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64) && !defined(CRYPTOPP_DISABLE_ASM)
#define CRYPTOPP_BOOL_ALIGN16 1
#else
#define CRYPTOPP_BOOL_ALIGN16 0
#endif
```
To this:
```
#if (CRYPTOPP_BOOL_X86 || CRYPTOPP_BOOL_X32 || CRYPTOPP_BOOL_X64 || CRYPTOPP_BOOL_PPC32 || CRYPTOPP_BOOL_PPC64) && (!defined(CRYPTOPP_DISABLE_ASM) || (CRYPTOPP_GCC_VERSION == 40201 && defined(__APPLE__) && !defined(__clang__)))
#define CRYPTOPP_BOOL_ALIGN16 1
#else
#define CRYPTOPP_BOOL_ALIGN16 0
#endif
```
| Mac OS X 10.6 (g++) link failures | https://api.github.com/repos/weidai11/cryptopp/issues/530/comments | 2 | 2017-11-06T17:44:54Z | 2017-11-13T15:44:25Z | https://github.com/weidai11/cryptopp/issues/530 | 271,562,300 | 530 |
[
"weidai11",
"cryptopp"
] | Around Crypto++ 5.6.3 we started adding C++11 and above support. It has been modest, like using C++11's `alignof` and `alignas` instead of platform specific features like `declspec` and `__attribute__`.
One area that has been painful is threading and synchronization. Some older compilers claim to be a version of C++ they are not, like C++11 when they are really just C++03 with some additional headers. Older Apple platforms and MinGW falls into this category. I has been a constant sources of problems on some platforms, MinGW.
We work around Apple, but MinGW continues to be a problem (from [`config.h`](https://github.com/weidai11/cryptopp/blob/master/config.h#L892):
```
// Hack ahead. Apple's standard library does not have C++'s unique_ptr in C++11. We can't
// test for unique_ptr directly because some of the non-Apple Clangs on OS X fail the same
// way. However, modern standard libraries have <forward_list>, so we test for it instead.
// Thanks to Jonathan Wakely for devising the clever test for modern/ancient versions.
// TODO: test under Xcode 3, where g++ is really g++.
#if defined(__APPLE__) && defined(__clang__)
# if !(defined(__has_include) && __has_include(<forward_list>))
# undef CRYPTOPP_CXX11
# endif
#endif
```
We need an easy way to turn off C++11.
This issue will track two commits. First is the addition of a `CRYPTOPP_NO_CXX11`, and second are the supporting self tests to ensure it works.
-----
Here are some problem reports from the field. We should have recognized this trend sooner and moved against it.
* [CLion and Crypto++ library](https://stackoverflow.com/q/46989046/608639) on Stack Overflow (This is a CMake and MinGW trifecta)
* ['mutex' is not a member of 'std' in MinGW 5.3.0](https://stackoverflow.com/q/43864159/608639) on Stack Overflow
* [Build crypto562 with minGW](https://stackoverflow.com/q/43818185/608639) on Stack Overflow
* [error: 'mutex' in namespace 'std' does not name a type](https://groups.google.com/d/msg/cryptopp-users/MzvocLrbIpE/TMCa6LFhCgAJ) on the Mailing List
* ... | Add CRYPTOPP_NO_CXX11 for old compilers | https://api.github.com/repos/weidai11/cryptopp/issues/529/comments | 2 | 2017-11-06T12:16:22Z | 2017-11-06T14:14:03Z | https://github.com/weidai11/cryptopp/issues/529 | 271,455,795 | 529 |
[
"weidai11",
"cryptopp"
] | Hi,
starting with commit c50f2f23d8b8f45d0bb7e4c438b8ec41d4e49e6b I get the following link error:
```
g++ -o cryptest.exe -DNDEBUG -g2 -O3 -fPIC -pthread -pipe adhoc.o test.o bench1.o bench2.o validat0.o validat1.o validat2.o validat3.o datatest.o regtest1.o regtest2.o regtest3.o dlltest.o fipsalgt.o ./libcryptopp.a
validat3.o: In function `CryptoPP::Test::ValidatePoly1305()':
/home/nvidia/Development/osp/release/external/Source/ext_cryptopp/validat3.cpp:845: undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Resynchronize(unsigned char const*, int)'
/home/nvidia/Development/osp/release/external/Source/ext_cryptopp/validat3.cpp:846: undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Update(unsigned char const*, unsigned long)'
validat3.o: In function `CryptoPP::HashTransformation::Final(unsigned char*)':
/home/nvidia/Development/osp/release/external/Source/ext_cryptopp/cryptlib.h:1034: undefined reference to `non-virtual thunk to CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::TruncatedFinal(unsigned char*, unsigned long)'
validat3.o: In function `CryptoPP::Test::ValidatePoly1305()':
/home/nvidia/Development/osp/release/external/Source/ext_cryptopp/validat3.cpp:863: undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Update(unsigned char const*, unsigned long)'
validat3.o: In function `CryptoPP::HashTransformation::Final(unsigned char*)':
/home/nvidia/Development/osp/release/external/Source/ext_cryptopp/cryptlib.h:1034: undefined reference to `non-virtual thunk to CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::TruncatedFinal(unsigned char*, unsigned long)'
validat3.o: In function `CryptoPP::Test::ValidatePoly1305()':
/home/nvidia/Development/osp/release/external/Source/ext_cryptopp/validat3.cpp:880: undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Resynchronize(unsigned char const*, int)'
/home/nvidia/Development/osp/release/external/Source/ext_cryptopp/validat3.cpp:881: undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Update(unsigned char const*, unsigned long)'
validat3.o: In function `CryptoPP::HashTransformation::Final(unsigned char*)':
/home/nvidia/Development/osp/release/external/Source/ext_cryptopp/cryptlib.h:1034: undefined reference to `non-virtual thunk to CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::TruncatedFinal(unsigned char*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE[_ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE]+0x70): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Resynchronize(unsigned char const*, int)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE[_ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE]+0x78): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::GetNextIV(CryptoPP::RandomNumberGenerator&, unsigned char*)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE[_ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE]+0x88): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::UncheckedSetKey(unsigned char const*, unsigned int, CryptoPP::NameValuePairs const&)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE[_ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE]+0x90): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Update(unsigned char const*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE[_ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE]+0x98): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::TruncatedFinal(unsigned char*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE[_ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE]+0xa0): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Restart()'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE[_ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE]+0xe8): undefined reference to `non-virtual thunk to CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Update(unsigned char const*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE[_ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE]+0x100): undefined reference to `non-virtual thunk to CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Restart()'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE[_ZTVN8CryptoPP13Poly1305_BaseINS_8RijndaelEEE]+0x140): undefined reference to `non-virtual thunk to CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::TruncatedFinal(unsigned char*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE[_ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE]+0x70): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Resynchronize(unsigned char const*, int)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE[_ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE]+0x78): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::GetNextIV(CryptoPP::RandomNumberGenerator&, unsigned char*)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE[_ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE]+0x88): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::UncheckedSetKey(unsigned char const*, unsigned int, CryptoPP::NameValuePairs const&)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE[_ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE]+0x90): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Update(unsigned char const*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE[_ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE]+0x98): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::TruncatedFinal(unsigned char*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE[_ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE]+0xa0): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Restart()'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE[_ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE]+0xe8): undefined reference to `non-virtual thunk to CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Update(unsigned char const*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE[_ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE]+0x100): undefined reference to `non-virtual thunk to CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Restart()'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE[_ZTVN8CryptoPP25SimpleKeyingInterfaceImplINS_13Poly1305_BaseINS_8RijndaelEEES3_EE]+0x140): undefined reference to `non-virtual thunk to CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::TruncatedFinal(unsigned char*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE[_ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE]+0x70): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Resynchronize(unsigned char const*, int)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE[_ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE]+0x78): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::GetNextIV(CryptoPP::RandomNumberGenerator&, unsigned char*)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE[_ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE]+0x88): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::UncheckedSetKey(unsigned char const*, unsigned int, CryptoPP::NameValuePairs const&)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE[_ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE]+0x90): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Update(unsigned char const*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE[_ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE]+0x98): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::TruncatedFinal(unsigned char*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE[_ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE]+0xa0): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Restart()'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE[_ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE]+0xf8): undefined reference to `non-virtual thunk to CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Update(unsigned char const*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE[_ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE]+0x110): undefined reference to `non-virtual thunk to CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Restart()'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE[_ZTVN8CryptoPP30MessageAuthenticationCodeFinalINS_13Poly1305_BaseINS_8RijndaelEEEEE]+0x150): undefined reference to `non-virtual thunk to CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::TruncatedFinal(unsigned char*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE[_ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE]+0x70): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Resynchronize(unsigned char const*, int)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE[_ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE]+0x78): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::GetNextIV(CryptoPP::RandomNumberGenerator&, unsigned char*)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE[_ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE]+0x88): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::UncheckedSetKey(unsigned char const*, unsigned int, CryptoPP::NameValuePairs const&)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE[_ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE]+0x90): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Update(unsigned char const*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE[_ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE]+0x98): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::TruncatedFinal(unsigned char*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE[_ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE]+0xa0): undefined reference to `CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Restart()'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE[_ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE]+0xf8): undefined reference to `non-virtual thunk to CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Update(unsigned char const*, unsigned long)'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE[_ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE]+0x110): undefined reference to `non-virtual thunk to CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::Restart()'
validat3.o:(.data.rel.ro._ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE[_ZTVN8CryptoPP8Poly1305INS_8RijndaelEEE]+0x150): undefined reference to `non-virtual thunk to CryptoPP::Poly1305_Base<CryptoPP::Rijndael>::TruncatedFinal(unsigned char*, unsigned long)'
collect2: error: ld returned 1 exit status
GNUmakefile:882: recipe for target 'cryptest.exe' failed
```
| Link error | https://api.github.com/repos/weidai11/cryptopp/issues/528/comments | 2 | 2017-11-05T09:44:37Z | 2017-11-05T10:28:00Z | https://github.com/weidai11/cryptopp/issues/528 | 271,262,228 | 528 |
[
"weidai11",
"cryptopp"
] | I'm using Visual Studio 15.5 Preview 2.0 compiling on Release x64 with enabled default optimizations setting.
With this configuration compilation of blake2.cpp goes forever... Only after disabling optimizations on this file, I managed to compile the library..
Edit: just tested Release x32 – infinite compilation too...
It seems that compiler can't optimize it normally.. | Infinite compilation time on blake2.cpp | https://api.github.com/repos/weidai11/cryptopp/issues/527/comments | 19 | 2017-11-04T09:42:09Z | 2017-12-30T20:23:31Z | https://github.com/weidai11/cryptopp/issues/527 | 271,179,673 | 527 |
[
"weidai11",
"cryptopp"
] | I’m compiling cryptopp as a static library using clang on macOS with `-fvisibility=hidden` and the `visibility ("default")` attribute as [explained in the Wiki](https://www.cryptopp.com/wiki/Debug_Symbols#Symbol_visibility). The target application linking the library is also using hidden symbol visibility. This fixed most linker warnings due to visibility mismatch, however I am still getting the following warnings when linking:
```
ld: warning: direct access in function 'CryptoPP::GetValueHelperClass<CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>, CryptoPP::DL_PublicKey<CryptoPP::ECPPoint> >::GetValueHelperClass(CryptoPP::DL_PublicKey<CryptoPP::ECPPoint> const*, char const*, std::type_info const&, void*, CryptoPP::NameValuePairs const*)' from file 'libcryptopp.a(dll.o)' to global weak symbol 'typeinfo name for CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>' from file 'myclass.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'CryptoPP::GetValueHelperClass<CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>, CryptoPP::DL_PublicKey<CryptoPP::ECPPoint> >::GetValueHelperClass(CryptoPP::DL_PublicKey<CryptoPP::ECPPoint> const*, char const*, std::type_info const&, void*, CryptoPP::NameValuePairs const*)' from file 'libcryptopp.a(dll.o)' to global weak symbol 'typeinfo name for CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>' from file 'myclass.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'bool CryptoPP::NameValuePairs::GetThisObject<CryptoPP::DL_PublicKey<CryptoPP::ECPPoint> >(CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>&) const' from file 'libcryptopp.a(dll.o)' to global weak symbol 'typeinfo for CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>' from file 'myclass.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function 'bool CryptoPP::NameValuePairs::GetThisObject<CryptoPP::DL_PublicKey<CryptoPP::ECPPoint> >(CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>&) const' from file 'libcryptopp.a(dll.o)' to global weak symbol 'typeinfo name for CryptoPP::DL_PublicKey<CryptoPP::ECPPoint>' from file 'myclass.o' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
```
The code compiled to "myclass.o" above is using the following imports from cryptopp:
```
#include <cryptopp/filters.h>
#include <cryptopp/osrng.h>
#include <cryptopp/eccrypto.h>
#include <cryptopp/ecp.h>
#include <cryptopp/base64.h>
#include <cryptopp/base32.h>
#include <cryptopp/sha.h>
#include <cryptopp/hex.h>
```
I assume the above warnings are due to missing `CRYPTOPP_DLL` attributes for some classes or functions, but I’ve been unable to track down the right classes/functions. I’d very much appreciate any help to fix these warnings. Thank you! | Linker warning due to global weak symbol access when using -fvisibility=hidden | https://api.github.com/repos/weidai11/cryptopp/issues/526/comments | 4 | 2017-11-02T21:12:33Z | 2017-11-17T15:21:08Z | https://github.com/weidai11/cryptopp/issues/526 | 270,809,069 | 526 |
[
"weidai11",
"cryptopp"
] | I recently attempted to download and install Crypto++ 5.6.5 onto my Ubuntu 16.04 system using the directions provided in Readme.txt and Install.txt. However, if I specify CXXFLAGS on the command line when invoking `make`, as recommended in Install.txt, the build fails because `-fPIC` was not included in the compiler flags. It seems like setting the CXXFLAGS variable on the command line prevents Crypto++'s Makefile from adding any flags to it, rather than simply overwriting the default "starting" flags as is intended.
Specifically, I tried doing the following, based on the recommendation under "If you want to build using C++11" in Install.txt:
make CXXFLAGS="-std=c++11" static dynamic cryptest.exe
The terminal output printed many lines of the form
g++ -std=c++11 -c cryptlib.cpp
g++ -std=c++11 -c cpu.cpp
g++ -std=c++11 -c integer.cpp
indicating that `-std=c++11` was the *only* compiler flag being applied, then eventually failed with
/usr/bin/ld: cryptlib.o: relocation R_X86_64_32 against `.bss' can not be used when making a shared
object; recompile with -fPIC
cryptlib.o: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
However, if I just call `make static dynamic cryptest.exe`, I see output lines of this form:
g++ -DNDEBUG -g2 -O2 -fPIC -march=native -pipe -c cryptlib.cpp
g++ -DNDEBUG -g2 -O2 -fPIC -march=native -pipe -c cpu.cpp
g++ -DNDEBUG -g2 -O2 -fPIC -march=native -pipe -c integer.cpp
showing that in addition to the default flags `-DNDEBUG -g2 O2`, the Makefile was able to add `-fPIC` and other flags. The build then completes successfully, which is not surprising since `/usr/bin/ld` recommended compiling again with `-fPIC`.
Notes: I'm using GNU Make 4.1, gcc/g++ 7.2, and running 64-bit Ubuntu 16.04. | Setting CXXFLAGS on command line prevents Makefile from adding -fPIC | https://api.github.com/repos/weidai11/cryptopp/issues/525/comments | 4 | 2017-10-31T19:50:26Z | 2017-10-31T21:39:33Z | https://github.com/weidai11/cryptopp/issues/525 | 270,096,659 | 525 |
[
"weidai11",
"cryptopp"
] | _Issue_
Compilation of a cpp file including the dll.h header results in an error, due to the #error directive.
_Expected result_
Including dll.h should not result in a compilation error on linux, only on Windows
_Explanation_
dll.h is only relevant to Windows systems (and possibly only the windows compiler cl.exe). Therefore, it should only prevent compilation on Windows systems, and not on Linux
Proposed solution
The #error directive (and all applicable parts of the file) should be protected by a check on a Windows specific preproc macro ( for example #ifdef _MSC_VER). | Including dll.h on Linux raises an error | https://api.github.com/repos/weidai11/cryptopp/issues/524/comments | 7 | 2017-10-30T10:10:20Z | 2017-11-04T04:05:25Z | https://github.com/weidai11/cryptopp/issues/524 | 269,543,527 | 524 |
[
"weidai11",
"cryptopp"
] | Hello,
Creating a translation unit (via abi-compliance-checker https://lvc.github.io/abi-compliance-checker/) of all the header files from cryptopp yields the following error:
abicc includes all headers in the same source file, in an apparently non-deterministic order, and this is the main reason for this error.
From there, there are 2 solutions that I can think of:
- Remove the dll.h altogether from the binary+headers package I provide (only for Linux-based systems anyways, so I don't really care about this header)
- Patch the header to only trigger the error on Windows systems.
Since the error message mentions DLLs, I imagine that it only applies to Windows-based systems. Is that a correct assumption?
If so, shouldn't the inclusion of the file be subject to a check of the target OS of the build (ifdef WIN32, or something similar)?
I am attaching the log file from ABICC where one can see the contents of the compiled file, as well as the command line for compiling it.
[log1.txt](https://github.com/weidai11/cryptopp/files/1418992/log1.txt)
| Does the #error directive in cryptopp/dll.h apply to non-windows systems? | https://api.github.com/repos/weidai11/cryptopp/issues/523/comments | 2 | 2017-10-26T15:28:38Z | 2017-10-29T09:21:04Z | https://github.com/weidai11/cryptopp/issues/523 | 268,806,612 | 523 |
[
"weidai11",
"cryptopp"
] | https://circleci.com/gh/ethereum/cpp-ethereum/889
```
=================================================================
==15657==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000ab1c at pc 0x0001230bdb2a bp 0x7fff59f98700 sp 0x7fff59f97ea0
READ of size 16 at 0x60200000ab1c thread T0
#0 0x1230bdb29 in wrap_memcpy (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x18b29)
Running 1 test case...
Test Case "common_encrypt_decrypt":
.
#1 0x106660f80 in std::__1::vector<unsigned int, std::__1::allocator<unsigned int> >::__swap_out_circular_buffer(std::__1::__split_buffer<unsigned int, std::__1::allocator<unsigned int>&>&) memory:1676
#2 0x1068a6d56 in void std::__1::vector<unsigned int, std::__1::allocator<unsigned int> >::__push_back_slow_path<unsigned int const&>(unsigned int const&&&) vector:1574
#3 0x108082e75 in CryptoPP::ECP::SimultaneousMultiply(CryptoPP::ECPPoint*, CryptoPP::ECPPoint const&, CryptoPP::Integer const*, unsigned int) const (testeth:x86_64+0x10241ee75)
#4 0x108082b07 in CryptoPP::ECP::ScalarMultiply(CryptoPP::ECPPoint const&, CryptoPP::Integer const&) const (testeth:x86_64+0x10241eb07)
#5 0x10804e447 in CryptoPP::ECPPoint CryptoPP::GeneralCascadeMultiplication<CryptoPP::ECPPoint, std::__1::__wrap_iter<CryptoPP::BaseAndExponent<CryptoPP::ECPPoint, CryptoPP::Integer>*> >(CryptoPP::AbstractGroup<CryptoPP::ECPPoint> const&, std::__1::__wrap_iter<CryptoPP::BaseAndExponent<CryptoPP::ECPPoint, CryptoPP::Integer>*>, std::__1::__wrap_iter<CryptoPP::BaseAndExponent<CryptoPP::ECPPoint, CryptoPP::Integer>*>) (testeth:x86_64+0x1023ea447)
#6 0x10804d91c in CryptoPP::DL_FixedBasePrecomputationImpl<CryptoPP::ECPPoint>::Exponentiate(CryptoPP::DL_GroupPrecomputation<CryptoPP::ECPPoint> const&, CryptoPP::Integer const&) const (testeth:x86_64+0x1023e991c)
#7 0x10806ac08 in CryptoPP::DL_GroupParameters<CryptoPP::EC2NPoint>::ExponentiateBase(CryptoPP::Integer const&) const (testeth:x86_64+0x102406c08)
#8 0x107e3f5b6 in CryptoPP::DL_EncryptorBase<CryptoPP::ECPPoint>::Encrypt(CryptoPP::RandomNumberGenerator&, unsigned char const*, unsigned long, unsigned char*, CryptoPP::NameValuePairs const&) const pubkey.h:1720
#9 0x107e3ea0b in dev::crypto::Secp256k1PP::encrypt(dev::FixedHash<64u> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >&) CryptoPP.cpp:203
#10 0x107e1428d in dev::encrypt(dev::FixedHash<64u> const&, dev::vector_ref<unsigned char const>, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >&) Common.cpp:103
#11 0x10684b26e in Crypto::devcrypto::common_encrypt_decrypt::test_method() crypto.cpp:187
#12 0x10684a08d in Crypto::devcrypto::common_encrypt_decrypt_invoker() crypto.cpp:179
#13 0x1064b1c77 in boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) execution_monitor.ipp:1300
#14 0x1063baa69 in boost::execution_monitor::catch_signals(boost::function<int ()> const&) execution_monitor.ipp:281
#15 0x1063bb196 in boost::execution_monitor::execute(boost::function<int ()> const&) execution_monitor.ipp:1203
#16 0x1063a6119 in boost::execution_monitor::vexecute(boost::function<void ()> const&) execution_monitor.ipp:1309
#17 0x1063aefb1 in boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned int) unit_test_monitor.ipp:46
#18 0x1063b4340 in boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned int, boost::unit_test::framework::state::random_generator_helper const*) framework.ipp:771
#19 0x1063b4df6 in boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned int, boost::unit_test::framework::state::random_generator_helper const*) framework.ipp:717
#20 0x1063b4df6 in boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned int, boost::unit_test::framework::state::random_generator_helper const*) framework.ipp:717
#21 0x1063b4df6 in boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned int, boost::unit_test::framework::state::random_generator_helper const*) framework.ipp:717
#22 0x1063ad5a2 in boost::unit_test::framework::run(unsigned long, bool) framework.ipp:1577
#23 0x1063e5d1d in boost::unit_test::unit_test_main(boost::unit_test::test_suite* (*)(int, char**), int, char**) unit_test_main.ipp:231
#24 0x10641c73a in main boostTest.cpp:129
#25 0x7fff909e0234 in start (libdyld.dylib:x86_64+0x5234)
0x60200000ab20 is located 0 bytes to the right of 16-byte region [0x60200000ab10,0x60200000ab20)
allocated by thread T0 here:
#0 0x123105e3b in wrap__Znwm (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x60e3b)
#1 0x106661581 in std::__1::__split_buffer<unsigned int, std::__1::allocator<unsigned int>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<unsigned int>&) new:226
#2 0x1068a6cb4 in void std::__1::vector<unsigned int, std::__1::allocator<unsigned int> >::__push_back_slow_path<unsigned int const&>(unsigned int const&&&) __split_buffer:310
#3 0x108082e75 in CryptoPP::ECP::SimultaneousMultiply(CryptoPP::ECPPoint*, CryptoPP::ECPPoint const&, CryptoPP::Integer const*, unsigned int) const (testeth:x86_64+0x10241ee75)
#4 0x108082b07 in CryptoPP::ECP::ScalarMultiply(CryptoPP::ECPPoint const&, CryptoPP::Integer const&) const (testeth:x86_64+0x10241eb07)
#5 0x10804e447 in CryptoPP::ECPPoint CryptoPP::GeneralCascadeMultiplication<CryptoPP::ECPPoint, std::__1::__wrap_iter<CryptoPP::BaseAndExponent<CryptoPP::ECPPoint, CryptoPP::Integer>*> >(CryptoPP::AbstractGroup<CryptoPP::ECPPoint> const&, std::__1::__wrap_iter<CryptoPP::BaseAndExponent<CryptoPP::ECPPoint, CryptoPP::Integer>*>, std::__1::__wrap_iter<CryptoPP::BaseAndExponent<CryptoPP::ECPPoint, CryptoPP::Integer>*>) (testeth:x86_64+0x1023ea447)
#6 0x10804d91c in CryptoPP::DL_FixedBasePrecomputationImpl<CryptoPP::ECPPoint>::Exponentiate(CryptoPP::DL_GroupPrecomputation<CryptoPP::ECPPoint> const&, CryptoPP::Integer const&) const (testeth:x86_64+0x1023e991c)
#7 0x10806ac08 in CryptoPP::DL_GroupParameters<CryptoPP::EC2NPoint>::ExponentiateBase(CryptoPP::Integer const&) const (testeth:x86_64+0x102406c08)
#8 0x107e3f5b6 in CryptoPP::DL_EncryptorBase<CryptoPP::ECPPoint>::Encrypt(CryptoPP::RandomNumberGenerator&, unsigned char const*, unsigned long, unsigned char*, CryptoPP::NameValuePairs const&) const pubkey.h:1720
#9 0x107e3ea0b in dev::crypto::Secp256k1PP::encrypt(dev::FixedHash<64u> const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >&) CryptoPP.cpp:203
#10 0x107e1428d in dev::encrypt(dev::FixedHash<64u> const&, dev::vector_ref<unsigned char const>, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> >&) Common.cpp:103
#11 0x10684b26e in Crypto::devcrypto::common_encrypt_decrypt::test_method() crypto.cpp:187
#12 0x10684a08d in Crypto::devcrypto::common_encrypt_decrypt_invoker() crypto.cpp:179
#13 0x1064b1c77 in boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) execution_monitor.ipp:1300
#14 0x1063baa69 in boost::execution_monitor::catch_signals(boost::function<int ()> const&) execution_monitor.ipp:281
#15 0x1063bb196 in boost::execution_monitor::execute(boost::function<int ()> const&) execution_monitor.ipp:1203
#16 0x1063a6119 in boost::execution_monitor::vexecute(boost::function<void ()> const&) execution_monitor.ipp:1309
#17 0x1063aefb1 in boost::unit_test::unit_test_monitor_t::execute_and_translate(boost::function<void ()> const&, unsigned int) unit_test_monitor.ipp:46
#18 0x1063b4340 in boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned int, boost::unit_test::framework::state::random_generator_helper const*) framework.ipp:771
#19 0x1063b4df6 in boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned int, boost::unit_test::framework::state::random_generator_helper const*) framework.ipp:717
#20 0x1063b4df6 in boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned int, boost::unit_test::framework::state::random_generator_helper const*) framework.ipp:717
#21 0x1063b4df6 in boost::unit_test::framework::state::execute_test_tree(unsigned long, unsigned int, boost::unit_test::framework::state::random_generator_helper const*) framework.ipp:717
#22 0x1063ad5a2 in boost::unit_test::framework::run(unsigned long, bool) framework.ipp:1577
#23 0x1063e5d1d in boost::unit_test::unit_test_main(boost::unit_test::test_suite* (*)(int, char**), int, char**) unit_test_main.ipp:231
#24 0x10641c73a in main boostTest.cpp:129
#25 0x7fff909e0234 in start (libdyld.dylib:x86_64+0x5234)
SUMMARY: AddressSanitizer: heap-buffer-overflow (libclang_rt.asan_osx_dynamic.dylib:x86_64+0x18b29) in wrap_memcpy
Shadow bytes around the buggy address:
0x1c0400001510: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
0x1c0400001520: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
0x1c0400001530: fa fa fd fa fa fa fd fa fa fa fd fa fa fa fd fa
0x1c0400001540: fa fa 00 fa fa fa 00 fa fa fa 00 fa fa fa fd fa
0x1c0400001550: fa fa fd fa fa fa 00 fa fa fa fd fa fa fa fd fa
=>0x1c0400001560: fa fa 00[04]fa fa 00 04 fa fa fa fa fa fa fa fa
0x1c0400001570: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x1c0400001580: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x1c0400001590: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x1c04000015a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x1c04000015b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==15657==ABORTING
==15657==WARNING: ASan is ignoring requested __asan_handle_no_return: stack top: 0x7fff59f9c000; bottom 0x000128460000; size: 0x7ffe31b3c000 (140729732284416)
False positive error reports may follow
For details see https://github.com/google/sanitizers/issues/189
unknown location:0: fatal error: in "Crypto/devcrypto/common_encrypt_decrypt": signal: SIGABRT (application abort requested)
../test/unittests/libdevcrypto/crypto.cpp:179: last checkpoint: "common_encrypt_decrypt" test entry
``` | heap-buffer-overflow in CryptoPP::ECP::SimultaneousMultiply() | https://api.github.com/repos/weidai11/cryptopp/issues/522/comments | 17 | 2017-10-24T08:13:13Z | 2017-11-12T04:25:56Z | https://github.com/weidai11/cryptopp/issues/522 | 267,936,831 | 522 |
[
"weidai11",
"cryptopp"
] | This may be an error on my side, but I wrote a simple test program to test out the functions from cpu.h.
https://github.com/selsta/kovri/blob/cpuid/src/util/cpuid.cc#L51
It prints the following which is obviously wrong:
```
[2017.10.12 22:07:28.277355] [0x00007fff8aa93340] [info] false
[2017.10.12 22:07:28.277459] [0x00007fff8aa93340] [info] 0
[2017.10.12 22:07:28.277482] [0x00007fff8aa93340] [info] 0
[2017.10.12 22:07:28.277497] [0x00007fff8aa93340] [info] 0
[2017.10.12 22:07:28.277510] [0x00007fff8aa93340] [info] 0
[2017.10.12 22:07:28.277524] [0x00007fff8aa93340] [info] CacheLineSize: 64
[2017.10.12 22:07:28.277544] [0x00007fff8aa93340] [info] Has SSE2?: true
[2017.10.12 22:07:28.277560] [0x00007fff8aa93340] [info] Has SSSE3?: false
[2017.10.12 22:07:28.277573] [0x00007fff8aa93340] [info] Has SSE41?: false
[2017.10.12 22:07:28.277586] [0x00007fff8aa93340] [info] Has SSE42?: false
[2017.10.12 22:07:28.277608] [0x00007fff8aa93340] [info] Has AESNI?: false
[2017.10.12 22:07:28.277621] [0x00007fff8aa93340] [info] Has CLMUL?: false
[2017.10.12 22:07:28.277633] [0x00007fff8aa93340] [info] Has SHA?: false
[2017.10.12 22:07:28.277645] [0x00007fff8aa93340] [info] Is P4?: false
[2017.10.12 22:07:28.277669] [0x00007fff8aa93340] [info] Has RDRAND?: false
[2017.10.12 22:07:28.277682] [0x00007fff8aa93340] [info] Has RDSEED?: false
[2017.10.12 22:07:28.277694] [0x00007fff8aa93340] [info] Has PadlockRNG?: false
[2017.10.12 22:07:28.277717] [0x00007fff8aa93340] [info] Has PadlockACE?: false
[2017.10.12 22:07:28.277730] [0x00007fff8aa93340] [info] Has PadlockACE2?: false
[2017.10.12 22:07:28.277753] [0x00007fff8aa93340] [info] Has PadlockPHE?: false
[2017.10.12 22:07:28.277766] [0x00007fff8aa93340] [info] Has PadlockPMM?: false
```
Someone else tested my code on Linux and it worked fine. | macOS: CpuId() returns false | https://api.github.com/repos/weidai11/cryptopp/issues/521/comments | 2 | 2017-10-12T22:12:47Z | 2017-10-13T06:48:17Z | https://github.com/weidai11/cryptopp/issues/521 | 265,105,117 | 521 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.