Commit Graph

23 Commits

Author SHA1 Message Date
Jeffrey Walton
12c6a9032b
Use unsigned types with UnsignedMin 2023-06-23 16:51:05 -04:00
Dimitris Apostolou
715a0bcce3
Fix typos (PR# 1099) 2022-01-04 05:06:35 -05:00
Jeffrey Walton
04b84da291
Update comments 2021-06-17 17:55:45 -04:00
Jeffrey Walton
fabd88e4e4
Use GenerateWord32 impl from Crypto++ 5.4
Also see https://groups.google.com/g/cryptopp-users/c/YOl2FGXSp44
2021-06-17 17:51:52 -04:00
Jeffrey Walton
89424327e5
Whitespace check-in 2021-06-17 17:23:18 -04:00
Jeffrey Walton
7101e9e73a
Endian swap outptu OldRandomPool::GenerateWord32
Also see https://groups.google.com/g/cryptopp-users/c/YOl2FGXSp44
2021-06-17 17:19:50 -04:00
Jeffrey Walton
3edaf67b34
Update comments 2020-12-28 16:44:29 -05:00
Jeffrey Walton
35c0fa82fd
Use <time.h> for Borland/Embarcadero (GH #512) 2017-09-20 18:10:07 -04:00
Jeffrey Walton
76ff3fc03b
Remove pre-Crypto++ 5.5 interface
Users of OldRandomPool must use the new interface. All that means is they must call IncorporateEntropy instead of Put, and GenerateBlock instead of Get
2017-08-02 19:43:56 -04:00
Jeffrey Walton
4da4ece5a5
Cut-in RandomNumberGenerator interface to OldRandPool
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)
2017-08-02 18:55:10 -04:00
Jeffrey Walton
6ab1a729ef
Cleared unused variable warnings 2017-08-01 20:42:55 -04:00
Jeffrey Walton
02e3a79444
Add OldRandomPool class (Issue 452)
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;
2017-08-01 18:53:31 -04:00
Jeffrey Walton
5efb019d8b
Add C++ nullptr support (Issue 383) 2017-03-01 06:10:06 -05:00
Jeffrey Walton
81b1a18063
Change file preamble to include "originally written by Wei Dai"
We have made a fair number of changes, and we don't want WD to receive credit for issues he was not part of
2017-01-27 07:05:45 -05:00
Jeffrey Walton
894874fe75 Whitespace checkin 2016-09-10 04:57:48 -04:00
Jeffrey Walton
bf3b80f25c Cleared -Wcast-align (Issue 122) 2016-01-24 23:09:28 -05:00
Jeffrey Walton
48809d4e85 CRYPTOPP 5.6.3 RC6 checkin 2015-11-05 01:59:46 -05:00
Jeffrey Walton
a14a5696e1 Added GCC_DIAGNOSTIC_AWARE to help suppress some warnings on contemporary compilers. The macro was needed to help with managing old compilers, like GCC 4.2.1, present on OpenBSD 2015-06-29 02:09:02 -04:00
weidai
01d0286194 initialize memory to remove Valgrind warning (Zooko, Jeffrey Walton) 2009-09-17 01:45:26 +00:00
weidai
f41245df6f reduce risk of reusing random numbers after VM state rollback 2007-05-04 15:37:46 +00:00
weidai
1db8ea5084 port to MSVC .NET 2005 beta 2 2005-07-12 04:23:32 +00:00
weidai
f278895908 create DLL version, fix GetNextIV() bug in CTR and OFB modes 2003-07-04 00:17:37 +00:00
weidai
a3b6ece7ab Initial revision 2002-10-04 17:31:41 +00:00