News for hackers. Stuff that matters.
Re:Should random() be banned? by devlopr on Thursday February 11, 2021 @10:26PM (#26110451)
Use the minimal amount of resources and scale up. If you need mostly random don't force cryptographic level random. It adds unnecessary processor cycles and reduces speed.
Re:Should random() be banned? by tgsovlerkhgsel on Saturday February 13, 2021 @07:01PM (#26128303)
I benchmarked it, and AES-CTR is faster than `random()` on a machine with AES-NI.

That's my main point: It does _not_ seem to be meaningfully more expensive to use cryptographic randomness. Yes, you could build a faster non-cryptographic PRNG, but that's not what is done by the default library.