Changeset View
Changeset View
Standalone View
Standalone View
src/random.h
Show All 31 Lines | |||||
* same randomness. FastRandomContext on the other hand does not protect against | * same randomness. FastRandomContext on the other hand does not protect against | ||||
* this once created, but is even faster (and acceptable to use inside tight | * this once created, but is even faster (and acceptable to use inside tight | ||||
* loops). | * loops). | ||||
* | * | ||||
* - The GetStrongRand*() class of function perform 'slow' seeding, including | * - The GetStrongRand*() class of function perform 'slow' seeding, including | ||||
* everything that fast seeding includes, but additionally: | * everything that fast seeding includes, but additionally: | ||||
* - OS entropy (/dev/urandom, getrandom(), ...). The application will | * - OS entropy (/dev/urandom, getrandom(), ...). The application will | ||||
* terminate if this entropy source fails. | * terminate if this entropy source fails. | ||||
* - Bytes from OpenSSL's RNG (which itself may be seeded from various | |||||
* sources) | |||||
* - Another high-precision timestamp (indirectly committing to a benchmark of | * - Another high-precision timestamp (indirectly committing to a benchmark of | ||||
* all the previous sources). These entropy sources are slower, but designed to | * all the previous sources). These entropy sources are slower, but designed to | ||||
* make sure the RNG state contains fresh data that is unpredictable to | * make sure the RNG state contains fresh data that is unpredictable to | ||||
* attackers. | * attackers. | ||||
* | * | ||||
* - RandAddPeriodic() seeds everything that fast seeding includes, but | * - RandAddPeriodic() seeds everything that fast seeding includes, but | ||||
* additionally: | * additionally: | ||||
* - A high-precision timestamp | * - A high-precision timestamp | ||||
▲ Show 20 Lines • Show All 210 Lines • Show Last 20 Lines |