Am I the only one that thinks Math.random should be fixed instead of the hundreds of apps that used it wrong? Why shouldn't we make all random number generators at least somewhat secure?
the objection is something along the lines of how the people who depend on it assume high performance and if every PRNG was made into a CSPRNG there would be performance regressions or something.
frankly, it should be made their problem and if the performance isn't good enough for them they should migrate to custom insecure PRNGs themselves.
I think this is a more general question because C's rand() also comes to mind as sucking very hard. There are, across languages and OSes, very bad decisions from the past that we keep dragging on.
I just see this as a natural development of things. Companies have prioritized shipping shit fast. The security industry is snake oil on top of bad software (sorry, guys), and the software industry is even a larger joke. Now we are seeing the consequences. The only way forward is to increase spend on real security and to slow the fuck down.
Both PRNGs and hash functions should be secure by default.
If the API is incompatible with security, shouldn't it be deprecated and made very noisy in the logs?
Maybe but then it would end up being secure only on newer environments (new browsers for client side code, which is something you don’t control), while the same code would be insecure when run on an older environment.
That also isn’t ideal