3 ms·
We can't condone any solution that depends on userspace PRNGs like OpenSSL instead of the kernel's CSPRNG. There are probably worse examples of userspace PRNGs
by CiPHPerCoder 10y ago
We can't condone any solution that depends on userspace PRNGs like OpenSSL instead of the kernel's CSPRNG.
There are probably worse examples of userspace PRNGs that attempt to be cryptographically secure than what OpenSSL provides, but we wrote this to encourage good habits. Reliance on OpenSSL's PRNG is definitely not a good habit to get into.
The "General Requirements for Inclusion" section is our basic evaluation criteria. Cross-platform APIs that wrap the operating system's CSPRNG aren't that difficult. See https://github.com/cryptosphere/sysrandom/blob/master/ext/sysrandom/randombytes_sysrandom.c https://github.com/cryptosphere/sysrandom/blob/master/ext/sy...
- avodonosov 10y agoHm, why userspace PRNGs are bad? Does code executed in kernel mode become better automatically? If OpenSSL has bad RNG, then a lot of SSL traffic is in danger... Also, do you think Java's SecureRandom is not a user space implementation? I guess it only uses /dev/[u]random for seed.
- CiPHPerCoder 10y ago> Hm, why userspace PRNGs are bad? Does code executed in kernel mode become better automatically? At the beginning of the blog post there are three links. adequately -> http://www.2uo.de/myths-about-urandom/ covered -> http://sockpuppet.org/blog/2014/02/25/safely-generate-random-numbers/ elsewhere -> https://blog.cr.yp.to/20140205-entropy.html I highly recommend reading all three. They answer your question in painstaking detail. > Also, do you think Java's SecureRandom is not a user space implementation? I guess it only uses /dev/[u]random for seed. In Java 8, it just reads from urandom. The relevant section has a cautionary note: https://paragonie.com/blog/2016/05/how-generate-secure-random-numbers-in-various-programming-languages#java-csprng https://paragonie.com/blog/2016/05/how-generate-secure-rando...