-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Which Rng
s need reseeding, if any?
#230
Comments
Good question. We have had several discussions around reseeding. Basically it is never necessary or a solution. If the concern is security, reseeding is not necessary because a good CSPRNG can produce a just about infinite stream of random numbers once initialized. And for simple PRNG's if the period is too small, reseeding is not a solution because after a reseed you will just end up somewhere else in the already too small period. Why does Another reason is historical: Finally reseeding can be seen as some form of 'security in depth'. Even if in the future there is found a cryptographic weakness in the used CSPRNG, occasionally reseeding should make exploiting it much more difficult or even impossible. How reseeding in rand works now is that we have PRNG implementations that just provide the core algorithm, and a separate Note that we have several changes in the works around reseeding:
|
@8573 any further questions or parts of the documentation you think should be improved? If there are action items we can work on them, otherwise I'll close this issue. |
I think I will copy some of the above to the documentation for |
Thanks for the explanation. I don't think I have further questions; if you have the time for it, the improvement to the documentation that I would suggest would be to explicitly note that the need for reseeding implied by |
I improved the doc: d82bad1 |
It is documented that the
Rng
returned bythread_rng
will periodically reseed itself. Do the otherRng
s need to be periodically reseeded in dependent code, or will they also reseed themselves, or do they not need reseeding at all?The text was updated successfully, but these errors were encountered: