HomePhabricator

Use RdSeed when available, and reduce RdRand load

Description

Use RdSeed when available, and reduce RdRand load

Summary:
This introduces support for autodetecting and using the RdSeed instruction.

In addition:

  • In SeedFast, only 64 bits of entropy are generated through RdRand (256 was relatively slow).
  • In SeedStartup, 256 bits of entropy are generated, using RdSeed (preferably) or RdRand (otherwise).

This is a backport of Core PR15250

Test Plan:

make check
./test/functional/test_runner.py

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D4512

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on Jan 25 2019, 02:40
deadalnixCommitted on Nov 25 2019, 13:27
deadalnixPushed on Nov 25 2019, 13:27
Reviewer
Restricted Project
Differential Revision
D4512: Use RdSeed when available, and reduce RdRand load
Parents
rABCf7ce41a3d53f: Print to console by default when not run with -daemon
Branches
Unknown
Tags
Unknown