-
Notifications
You must be signed in to change notification settings - Fork 11
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
Teach util/entropy.c about other APIs #83
Comments
Is the idea that we use those other APIs instead of |
On 04/21/18 11:38, Graham Percival wrote:
Is the idea that we use those other APIs instead of |/dev/urandom| and only
fall back to that if they fail?
Good question. If the other APIs are available, we should use them. If
they're available and fail, we should error out -- because they shouldn't
ever fail.
If we don't know if the other APIs are available, I guess we can try them
and if we get ENOSYS or ENOENT or whatever means "this isn't available",
then yes we should fall back to trying /dev/urandom.
…--
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid
|
I'm guessing that you'll want a
(like (I've had this code ready to go for a while, but I thought that we should get the current round of releases done before adding it.) |
I'd prefer to keep it in |
Linux 3.17+ has
getrandom(2)
. Linux also hasgetentropy(3)
, which theoretically behaves the same way as thegetentropy(2)
in OpenBSD 5.6+. FreeBSD has thekern.arandom
sysctl. iOS hasSecRandom
. Windows hasCryptGenRandom
.The text was updated successfully, but these errors were encountered: