-
Notifications
You must be signed in to change notification settings - Fork 185
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 "insecure" functions #546
base: master
Are you sure you want to change the base?
Conversation
My quick thoughts:
|
In its current form, yes, it's. But I haven't decided yet on which approach to use. Alternative proposals in the issue suggested to use an "option" argument instead. So I would like to sort this out as part of the v0.3 release.
Seeding of hash maps and non-security-critical PRNGs are both legitimate use-cases. For example, see discussions about issues with systemd which led to the introduction of the GRND_INSECURE flag. |
Then it could be added in v0.4. I avoided putting out many breaking releases for
Yes, systemd is a special case because it operates in an early boot environment. But precisely because this is a special case (and also very targeted to a specific environment) it probably isn't going to use a general-purpose library like Hence "systemd needs this" is not good justification for this feature. |
Possibly of note is rust-lang/rust#130703: introduction of what is effectively |
Adds 4 new functions:
insecure_fill
,insecure_fill_uninit
,insecure_u32
, andinsecure_u32
.On some platforms these function can be less prone to blocking, but may return potentially "insecure" random data. Such data can be used for seeding
HashMap
s and non-security-sensitive PRNGs.Closes #365