5 ms·
Userland PRNGs are one of the easiest ways to introduce security vulnerabilities into your programs. I would recommend being very, VERY careful before trying t
by mcpherrinm 13y ago
Userland PRNGs are one of the easiest ways to introduce security vulnerabilities into your programs. I would recommend being very, VERY careful before trying to do this, like the traditional "Don't roll your own crypto" advice.
- raverbashing 13y agoOf course. But there are a lot of needs for random numbers that don't need the random numbers to be secure.
- azinman2 13y agoIn which case rand and the like really should be renamed unsecure_random to prevent confusion.
- raverbashing 13y agoFine by me
- dlitz 13y agoMost developers don't know how to make that distinction, and even savvy ones know better than to take the risk of being wrong. It's 2014. There are well-funded governments and organized crime attacking our systems. If downstream developers still have to ask the question, "what kind of random numbers does this API provide?", then it's a bug in the platform.
- ekimekim 13y agoOnly in this case you aren't rolling your own crypto, but (hopefully) using a popular, field-tested CSPRNG available as a library for your language of choice. Unless you mistakenly pick a non-cryptographic PRNG, and assuming the implementation is correct (which is just as true of kernel code as it is of user code), I fail to see how you would introduce a vulnerability.