mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-10-11 03:53:22 +02:00
random: stop retrieving random bytes from OpenSSL
On the ::SLOW path we would use OpenSSL as an additional source of random bytes. This commit removes that functionality. Note that this was always only an additional source, and that we never checked the return value RAND_bytes(): https://www.openssl.org/docs/manmaster/man3/RAND_bytes.html RAND_bytes() puts num cryptographically strong pseudo-random bytes into buf.
This commit is contained in:
@@ -495,10 +495,6 @@ static void SeedSlow(CSHA512& hasher) noexcept
|
||||
GetOSRand(buffer);
|
||||
hasher.Write(buffer, sizeof(buffer));
|
||||
|
||||
// OpenSSL RNG (for now)
|
||||
RAND_bytes(buffer, sizeof(buffer));
|
||||
hasher.Write(buffer, sizeof(buffer));
|
||||
|
||||
// High-precision timestamp.
|
||||
//
|
||||
// Note that we also commit to a timestamp in the Fast seeder, so we indirectly commit to a
|
||||
|
Reference in New Issue
Block a user