aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2019-11-18 09:58:10 -0500
committerfanquake <fanquake@gmail.com>2019-11-18 10:22:08 -0500
commit461e547877da0c04db69e067c923cc4540aab03a (patch)
tree9fc7a9230c7dac91475ac98b91f614f6d4a9c1f5
parent6fde676f647e3b43cf0f5b242a00896f361ea385 (diff)
doc: correct random.h docs after #17270
-rw-r--r--src/random.cpp2
-rw-r--r--src/random.h14
2 files changed, 8 insertions, 8 deletions
diff --git a/src/random.cpp b/src/random.cpp
index 3e6398f7b4..c78a34ea45 100644
--- a/src/random.cpp
+++ b/src/random.cpp
@@ -182,7 +182,7 @@ static uint64_t GetRdSeed() noexcept
/* Access to other hardware random number generators could be added here later,
* assuming it is sufficiently fast (in the order of a few hundred CPU cycles).
* Slower sources should probably be invoked separately, and/or only from
- * RandAddSeedSleep (which is called during idle background operation).
+ * RandAddPeriodic (which is called once a minute).
*/
static void InitHardwareRand() {}
static void ReportHardwareRand() {}
diff --git a/src/random.h b/src/random.h
index 7768f9d3c5..76b3493c5d 100644
--- a/src/random.h
+++ b/src/random.h
@@ -41,17 +41,17 @@
* These entropy sources are slower, but designed to make sure the RNG state contains
* fresh data that is unpredictable to attackers.
*
- * - RandAddSeedSleep() seeds everything that fast seeding includes, but additionally:
- * - A high-precision timestamp before and after sleeping 1ms.
- * - (On Windows) Once every 10 minutes, performance monitoring data from the OS.
- - - Once every minute, strengthen the entropy for 10 ms using repeated SHA512.
- * These just exploit the fact the system is idle to improve the quality of the RNG
- * slightly.
+ * - RandAddPeriodic() seeds everything that fast seeding includes, but additionally:
+ * - A high-precision timestamp
+ * - Dynamic environment data (performance monitoring, ...)
+ * - Strengthen the entropy for 10 ms using repeated SHA512.
+ * This is run once every minute.
*
* On first use of the RNG (regardless of what function is called first), all entropy
* sources used in the 'slow' seeder are included, but also:
* - 256 bits from the hardware RNG (rdseed or rdrand) when available.
- * - (On Windows) Performance monitoring data from the OS.
+ * - Dynamic environment data (performance monitoring, ...)
+ * - Static environment data
* - Strengthen the entropy for 100 ms using repeated SHA512.
*
* When mixing in new entropy, H = SHA512(entropy || old_rng_state) is computed, and