News for hackers. Stuff that matters.
Re:How do computers generate random numbers? by Someone on Wednesday September 08, 2021 @08:03PM (#28464572)
“The most common algorithms used for PRNGs are linear congruential generators”

I doubt that is still true for ‘modern’ languages. Let’s google a few.

https://docs.microsoft.com/en-us/dotnet/api/system.random?vi... says “The current implementation of the Random class is based on a modified version of Donald E. Knuth's subtractive random number generator algorithm”. So, that’s a no.

https://rust-random.github.io/book/guide-rngs.html doesn’t appear to mention multiplicative algorithms, either.

https://developer.apple.com/documentation/swift/systemrandom... says “SystemRandomNumberGenerator is automatically seeded, is safe to use in multiple threads, and uses a cryptographically secure algorithm whenever possible.”

Re:How do computers generate random numbers? by sunny--tech on Thursday September 09, 2021 @12:17PM (#28471360)
That's a good call out and I realize that was an error on my part. I meant to put in the Mersenne Twister but when I went back through my notes when I was writing, I misread that linear congruential generators were popular decades ago.

I've edited that section.