Users of OldRandomPool must use the new interface. All that means is they must call IncorporateEntropy instead of Put, and GenerateBlock instead of Get
The existing interface still exists. The new interface is routed into the old methods. Without the new interface, using OldRandPool could result in:
$ ./cryptest.exe v
terminate called after throwing an instance of CryptoPP::NotImplemented
what(): RandomNumberGenerator: IncorporateEntropy not implemented
Aborted (core dumped)
RandomPool used to be a PGP-style deterministic generator and folks used it as a key generation function. At Crypto++ 5.5 the design changed to harden it agianst rollback attacks. The design change resulted in an upgrade barrier. That is, some folks are stuck at Crypto++ 4.2 or Crypto++ 5.2 because they must interoperate with existing software.
Below is the test program we used for the test vector. It was run against Crypto++ 5.4.
RandomPool prng;
SecByteBlock seed(0x00, 384), result(64);
prng.Put(seed, seed.size());
prng.GenerateBlock(result, result.size());
HexEncoder encoder(new FileSink(std::cout));
std::cout << "RandomPool: ";
encoder.Put(result, sizeof(result));
std::cout << std::endl;
Commit 4630a5dab66a0e18ec8dfc0998ac223e40b3dc13 broke compilation for
Windows 2000 and earlier as getaddrinfo was introduced in Windows XP.
Fix this by including <wspiapi.h> when targeting Windows 2000 and
earlier, which falls back to an inline implementation of getaddrinfo
when necessary.
Some MinGW flavors still target Windows 2000 by default.
Ref:
https://msdn.microsoft.com/en-us/library/windows/desktop/ms738520.aspx,
section "Support for getaddrinfo on Windows 2000 and older versions"
Benchmark2 is used to benchmark shared key algorithms. At the moment Benchmark2 is all or nothing. It does not understand SharedKeyMAC, SharedKeyStream, SharedKeyBlock. It will be fixed in the future.
CRYPTOPP_NO_UNALIGNED_DATA_ACCESS was required in Crypto++ 5.6 and earlier because unaligned data access was the norm. It caused problems at -O3 and on ARM NEON.
At Crypto++ 6.0 no unaligned data access became a first class citizen. Folks who want to allow it must now define CRYPTOPP_ALLOW_UNALIGNED_DATA_ACCESS
- don't enable SSE2 explicitly for x64, it's always enabled and causes
warnings (issue #445)
- remove newlines in project files that Visual Studio doesn't like and
removes on every change to project options
* Fix compilation on Windows with /DUNICODE
* Fix linking of fipstest for MSVC targeting ARM (__crt_debugger_hook is not available).
* Fix build for Clang on Windows with optimizations on.
* Fix a warning about a non-existant warning under Clang.
* Fix compilation under Intel C++ 18.0 on Windows
This check-in supports Romain Geissler's work on cleaning up our use of ::byte when it collides with std::byte. Regardless of what happens, such as removing ::byte and adding CryptoPP::byte, providing the typedef here makes Kalyna immune to the outside changes. Also see Pull Request 437 and 438.
When compiling with Visual Studio 2015+, Crypto++ uses CryptoNG by
default. CryptoNG is only available on Windows Vista and later and
Crypto++ currently ignores if the user explicitly wants to target
Windows XP. Unlike with other Windows SDK features, everything
compiles, but the application doesn't start on Windows XP because
bcrypt.dll is missing. That is an issue when updating Visual Studio
because the root cause is hard to find.
Making use of CryptoNG when targeting Windows 8+ instead by default,
regardless of the Visual Studio version, to fix this.
In the bigger picture, the code to use inline ASM when intrinsics are not available still needs to be checked-in. Its a big change since we moved into SSE4, AVX and SHA. Design changes are still being evaluated, and its still being tested.
This reverts commit eb3b27a6a543. The change broke GCC 4.8 and unknown version of Clang on OS X. UB reported the OS X break, and JW found duplicated the break on a ARM CubieTruck with GCC 4.8.
Its a new Google Group created at https://groups.google.com/forum/#!forum/cryptopp-build. The list should allow us to run services on unprivileged forks and other unrelated accounts while making it easy to find results.