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

Add support for getentropy() and getrandom() #17

Closed
colmmacc opened this issue Sep 2, 2014 · 2 comments
Closed

Add support for getentropy() and getrandom() #17

colmmacc opened this issue Sep 2, 2014 · 2 comments

Comments

@colmmacc
Copy link
Contributor

colmmacc commented Sep 2, 2014

Some platforms have a getentropy() call for retrieving randomly generated data, Linux has recently added getrandom(), an equivalent call. s2n should support these where available and avoid using /dev/urandom.

@masklinn
Copy link

Beware, as the name indicates getentropy(2) is a source of entropy not a direct source of randomness. getentropy(2) data should be fed into a PRNG, not used directly as randomness as the man page indicates:

getentropy() is not intended for regular code; please use the arc4random(3) family of functions instead.

@goatgoose
Copy link
Contributor

We don't want to further complicate our random implementation, and plan to use the libcrypto random when possible:
#4348

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

No branches or pull requests

6 participants