Page MenuHomePhabricator

gui: remove OpenSSL PRNG seeding (Windows, Qt only)

Authored by Fabien on May 20 2020, 11:16.


This removes the code introduced in
that attempts to add additional entroy to the OpenSSL PRNG using Windows
Note that this is specific to bitcoin-qt running on Windows.

RAND_event() collects the entropy from Windows events such as mouse
movements and other user interaction.
It should be called with the iMsg, wParam and lParam arguments of all
messages sent to the window procedure.
It will estimate the entropy contained in the event message (if any),
and add it to the PRNG.
The program can then process the messages as usual.

Besides BIP70, this is the last place we are directly using OpenSSL in
the GUI code. All other OpenSSL usage is in random.cpp.

Note that we are still also doing Windows specific entropy gathering in
multiple other places. Such as
and [RAND_screen()](

Also note that if RAND_event returns 0 (PRNG has NOT been seeded with
enough data), we're just logging a message and continuing on, which
seems less than ideal.

Backport of core PR17151.

Test Plan

Run the build-win64 CI build plan.

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien requested review of this revision.May 20 2020, 11:16

[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 20 2020, 11:33