Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: