You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge bitcoin#17270: Feed environment data into RNG initializers
d1c0277 Report amount of data gathered from environment (Pieter Wuille)
64e1e02 Use thread-safe atomic in perfmon seeder (Pieter Wuille)
d61f2bb Run background seeding periodically instead of unpredictably (Pieter Wuille)
483b942 Add information gathered through getauxval() (Pieter Wuille)
11793ea Feed CPUID data into RNG (Pieter Wuille)
a81c494 Use sysctl for seeding on MacOS/BSD (Pieter Wuille)
2554c1b Gather additional entropy from the environment (Pieter Wuille)
c2a262a Seed randomness with process id / thread id / various clocks (Pieter Wuille)
723c796 [MOVEONLY] Move cpuid code from random & sha256 to compat/cpuid (Pieter Wuille)
cea3902 [MOVEONLY] Move perfmon data gathering to new randomenv module (Pieter Wuille)
b51bae1 doc: minor corrections in random.cpp (fanquake)
Pull request description:
This introduces a new `randomenv` module that queries varies non-cryptographic (and non-RNG) sources of entropy available on the system; things like user IDs, system configuration, time, statistics, CPUID data.
The idea is that these provide a fallback in scenarios where system entropy is somehow broken (note that if system entropy *fails* we will abort regardless; this is only meant to function as a last resort against undetected failure). It includes some data sources OpenSSL currently uses, and more.
The separation between random and randomenv is a bit arbitrary, but I felt that all this "non-essential" functionality deserved to be separated from the core random module.
ACKs for top commit:
TheBlueMatt:
utACK d1c0277. Certainly no longer measuring the time elapsed between a 1ms sleep (which got removed in the latest change) is a fair tradeoff for adding about 2 million other actually-higher-entropy bits :).
laanwj:
ACK d1c0277
Tree-SHA512: d290a8db6538a164348118ee02079e4f4c8551749ea78fa44b2aad57f5df2ccbc2a12dc7d80d8f3e916d68cdd8e204faf9e1bcbec15f9054eba6b22f17c66ae3
0 commit comments