Page MenuHomePhabricator

random: stop feeding RNG output back into OpenSSL
ClosedPublic

Authored by Fabien on May 25 2020, 07:29.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC8d6b4a37ad9d: random: stop feeding RNG output back into OpenSSL
Summary
On the ::SLOW or ::SLEEP paths, we would feed our RNG output back into
OpenSSL using RAND_add. This commit removes that functionality.

RAND_add(): https://www.openssl.org/docs/manmaster/man3/RAND_add.html

RAND_add() mixes the num bytes at buf into the internal state of the
random generator. This function will not normally be needed, as
mentioned above. The randomness argument is an estimate of how much
randomness is contained in buf, in bytes, and should be a number
between zero and num.

Partial backport of core PR17265:
https://github.com/bitcoin/bitcoin/pull/17265/commits/5624ab0b4f844dc7c17aeb1b009f002c33c38fb3

Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.May 25 2020, 07:29

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

This revision is now accepted and ready to land.May 25 2020, 13:11