You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
arc4random functions were added in glibc 2.36, but the interface was added as a basic loop wrapper around getrandom(). 12
Example commands
make mutex num-blocks others prng-params reseed-countdown
The mutex benchmark compares the use of pthread_mutex_t and thread_local.
The others benchmark compares randp to these PRNGs:
RDRAND
RDSEED
getentropy
arc4random
The num-blocks, prng-params, and reseed-countdown benchmarks compare varying parameters of randp and its internal PRNG.
All the benchmarks take about 10 minutes.
Refine the randp parameters
Run these targets in the following order to refine the parameters of randp.
make num-blocks: find optimal DEFAULT_RANDP_NUM_BLOCKS
make reseed-countdown: find optimal DEFAULT_RANDP_RESEED_COUNTDOWN_MIN
make prng-params: find optimal DEFAULT_AESCTR128_PRNG_NUM_KEYS, DEFAULT_AESCTR128_PRNG_NUM_ROUNDS_PER_KEY, DEFAULT_RANDP_PRNG_USE_ENC, and DEFAULT_RANDP_PRNG_USE_DAVIES_MEYER