Skip to content
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

Stop using /dev/urandom, except on Linux, and then only when getrandom() isn't available #789

Closed
briansmith opened this issue Feb 6, 2019 · 1 comment

Comments

@briansmith
Copy link
Owner

Right now, the default implementation of ring::rand is to read from /dev/urandom. However, AFAICT, except for Redox, /dev/urandom either doesn't work, or there is something better that should be used instead. So, let's stop defaulting to /dev/urandom.

The main effect of this is that platforms that currently don't have an implementation of ring::rand will break. As far as I know, there are no ring users using these alternative operating systems, so we won't lose anything by removing the fallback.

Switching away from /dev/urandom on OpenBSD is issue #316.
Switching away from /dev/urandom on FreeBSD is issue #326.

@briansmith
Copy link
Owner Author

This was done in efb6ede. This will break FreeBSD, OpenBSD, and similar platforms unless/until PRs are merged that fix them with an implementation similar to the Linux getrandom()-based implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant