Generic PRNG framework:

* A new, unified interface for generating random numbers and
  filling buffers supporting any engine that fits the
  UniformRandomNumberGenerator concept;
* Automatically seeded replacement for rand using the fast
  xorshift+ PRNG engine;
* A CSPRNG engine that can be used with the new framework
  when needing to to generate cryptographically secure
  randomness.
* Unit test cleanups to work with new engine.
This commit is contained in:
Nik Bougalis
2016-01-09 02:27:32 -08:00
parent 1c9577a1ac
commit 40363f96a9
28 changed files with 647 additions and 334 deletions

View File

@@ -70,7 +70,7 @@
#include <ripple/shamap/Family.h>
#include <ripple/unity/git_id.h>
#include <ripple/websocket/MakeServer.h>
#include <ripple/crypto/RandomNumbers.h>
#include <ripple/crypto/csprng.h>
#include <beast/asio/io_latency_probe.h>
#include <beast/module/core/text/LexicalCast.h>
#include <beast/module/core/thread/DeadlineTimer.h>
@@ -844,7 +844,7 @@ public:
{
if (timer == m_entropyTimer)
{
add_entropy (nullptr, 0);
crypto_prng().mix_entropy ();
return;
}