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

Consider reading /dev/random instead of using SecureRandom #9

Closed
samdunne opened this issue May 3, 2015 · 2 comments
Closed

Consider reading /dev/random instead of using SecureRandom #9

samdunne opened this issue May 3, 2015 · 2 comments

Comments

@samdunne
Copy link

samdunne commented May 3, 2015

SecureRandom uses /dev/urandom which is non blocking (fantastic!), however when the entropy pool becomes small enough it becomes possible to guess the resulting number produced.

Reading /dev/random will be a much more secure way of generating this.

The only possible downside is that /dev/random is blocking

@jimtreadway
Copy link

Arguments for just using /dev/urandom instead of /dev/random:

@robertomiranda
Copy link
Owner

@samdunne @jimtreadway really interesting discussion, but since this is a back-port I think that would be better to move the discussion http://github.com/rails/rails, otherwise "The security is in terms of its random generation. See SecureRandom"

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

3 participants