I would like to use:
BN_rand_range(...);
and due to the OpenSSL documentation:
The PRNG must be seeded prior to calling BN_rand() or BN_rand_range().
But there is no link or method name hint provided how I could do that. What is the correct way to seed the PRNG with OpenSSL?
What is the correct way to seed the PRNG with OpenSSL?
Internally, OpenSSL of auto-seeds itself with RAND_poll (with some hand waiving). There's a few reasons why you might want to avoid the behavior and explicitly seed the generator yourself.
There's a more complete writeup on the OpenSSL wiki at Random Numbers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With