- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 456
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
Implement CryptoRng for EntropyRng and StdRng #323
Implement CryptoRng for EntropyRng and StdRng #323
Conversation
Another thing which may have fallen through the cracks: should |
I don't know. I think |
The only real reason is that |
Good point. Shall I add it to this PR? |
Looks ready for merge to me |
Is the point of EntropyRng that it can use woefully insecure things when nothing secure is available? |
😄 Actually quite the opposite. It just builds on the idea that |
Using the clock directly (like I tried doing before this), that is. |
I think an entropy based CSPRNG needs to know when it has enough randomness and refuse to give out random numbers if it does not. We've no error path so this mean it needs to panic. Is that what happens? |
|
Apologizes but I ignored the whole |
You can read all about it on the author's page (This is just a Rust implementation of his library) www.chronox.de/jent/doc/CPU-Jitter-NPTRNG.html |
A CSPRNG only needs enough entropy for seeding, after that it's independent of the entropy source (unless you want to reseed).
|
I'll read it, thanks! I also finally noticed the panic when entropy sources fail, which makes sense. lol I'd suggest adding this method, both so that users know how to test if an EntropyRng is ready, and to help test that
I do not understand why |
@burdges Thanks for giving it such close attention 😄. The idea to use
A test for |
Implement CryptoRng for EntropyRng and StdRng
Fallen through the cracks...