aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/rng/auto_rng
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-06-30 13:15:30 -0400
committerJack Lloyd <[email protected]>2016-07-17 10:43:40 -0400
commit93922f20f04058ec624f7db3c74d8aa5a3d06440 (patch)
tree81144cfacced43c68c4385683ee0c123a1987042 /src/lib/rng/auto_rng
parent4c5847412d41756aab738a3746666cfaffe5d4af (diff)
Add Stateful_RNG
Handles fork checking for HMAC_RNG and HMAC_DRBG AutoSeeded_RNG change - switch to HMAC_DRBG as default. Start removing the io buffer from entropy poller. Update default RNG poll bits to 256. Fix McEliece test, was using wrong RNG API. Update docs.
Diffstat (limited to 'src/lib/rng/auto_rng')
-rw-r--r--src/lib/rng/auto_rng/auto_rng.h45
-rw-r--r--src/lib/rng/auto_rng/info.txt9
2 files changed, 0 insertions, 54 deletions
diff --git a/src/lib/rng/auto_rng/auto_rng.h b/src/lib/rng/auto_rng/auto_rng.h
deleted file mode 100644
index 72ea88d3e..000000000
--- a/src/lib/rng/auto_rng/auto_rng.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-* Auto Seeded RNG
-* (C) 2008 Jack Lloyd
-*
-* Botan is released under the Simplified BSD License (see license.txt)
-*/
-
-#ifndef BOTAN_AUTO_SEEDING_RNG_H__
-#define BOTAN_AUTO_SEEDING_RNG_H__
-
-#include <botan/rng.h>
-#include <string>
-
-namespace Botan {
-
-class AutoSeeded_RNG : public RandomNumberGenerator
- {
- public:
- void randomize(byte out[], size_t len) override
- { m_rng->randomize(out, len); }
-
- bool is_seeded() const override { return m_rng->is_seeded(); }
-
- void clear() override { m_rng->clear(); }
-
- std::string name() const override { return m_rng->name(); }
-
- size_t reseed_with_sources(Entropy_Sources& srcs,
- size_t poll_bits,
- std::chrono::milliseconds poll_timeout) override
- {
- return m_rng->reseed_with_sources(srcs, poll_bits, poll_timeout);
- }
-
- void add_entropy(const byte in[], size_t len) override
- { m_rng->add_entropy(in, len); }
-
- AutoSeeded_RNG() : m_rng(RandomNumberGenerator::make_rng()) {}
- private:
- std::unique_ptr<RandomNumberGenerator> m_rng;
- };
-
-}
-
-#endif
diff --git a/src/lib/rng/auto_rng/info.txt b/src/lib/rng/auto_rng/info.txt
deleted file mode 100644
index 4f48f484b..000000000
--- a/src/lib/rng/auto_rng/info.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-define AUTO_SEEDING_RNG 20131128
-
-<requires>
-hmac_rng
-hmac
-sha2_32
-sha2_64
-#dev_random|cryptoapi_rng|unix_procs|proc_walk
-</requires>