kalyna.cpp:432: error: integer constant is too large for 'long' type
kalyna.cpp:509: error: integer constant is too large for 'long' type
kalyna.cpp:608: error: integer constant is too large for 'long' type
kalyna.cpp:713: error: integer constant is too large for 'long' type
kalyna.cpp:833: error: integer constant is too large for 'long' type
...
Effectively this creates a workspace for encrypting the nonce. The zeroizer will run when the class is destroyed, rather than each invocation of UncheckedSetKey.
Performance went from 3.6 cpb as a temporary to 2.9 cpb as a class member
This broke MSbuild, which can no longer build a static library. Attempting to build with 'msbuild /t:Build cryptlib.vcxproj' results in:
...
X64\cryptlib\Debug\zinflate.obj
X64\cryptlib\Debug\zlib.obj
LINK : fatal error LNK1561: entry point must be defined [c:\Users\cryptopp\cryptlib.vcxproj]
Done Building Project "c:\Users\Jeff\Desktop\cryptopp\cryptlib.vcxproj" (Build target(s)) -- FAILED.
Microsoft tools are so fucked up. It should be illegal to sell them.
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 4630a5dab6 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"