Skip to content

Commit 3cb9ce8

Browse files
committed
Document strenghtening
1 parent 1d207bc commit 3cb9ce8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/random.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@
4343
* - RandAddSeedSleep() seeds everything that fast seeding includes, but additionally:
4444
* - A high-precision timestamp before and after sleeping 1ms.
4545
* - (On Windows) Once every 10 minutes, performance monitoring data from the OS.
46+
- - Once every minute, strengthen the entropy for 10 ms using repeated SHA512.
4647
* These just exploit the fact the system is idle to improve the quality of the RNG
4748
* slightly.
4849
*
4950
* On first use of the RNG (regardless of what function is called first), all entropy
5051
* sources used in the 'slow' seeder are included, but also:
5152
* - (On Windows) Performance monitoring data from the OS.
5253
* - (On Windows) Through OpenSSL, the screen contents.
54+
* - Strengthen the entropy for 100 ms using repeated SHA512.
5355
*
5456
* When mixing in new entropy, H = SHA512(entropy || old_rng_state) is computed, and
5557
* (up to) the first 32 bytes of H are produced as output, while the last 32 bytes

0 commit comments

Comments
 (0)