3 ms·
Are there any good random numbers libraries for C?
by jwilk 9y ago
Are there any good random numbers libraries for C?
- John_Cena 9y agoFast? Unpredictable based on previous output if the seed is truly random? Here is a read I enjoyed on the subject: http://www.cs.yale.edu/homes/aspnes/pinewiki/C(2f)Randomization.html http://www.cs.yale.edu/homes/aspnes/pinewiki/C(2f)Randomizat...
- ben_bai 9y agoProviding good random numbers should be done by the OS (kernel and libc). Don't try to fake it in userland. Please wiggle your mouse for 1 minute so we can gather entropy for you AES key. REALLY?
- rocqua 9y agoI always though that was supposed to feed /dev/urandom.
- deleted 9y ago[deleted]
- ben_bai 9y ago/dev/urandom is a perfectly good source for random numbers. Because it's fed from the kernel which is gathering all kinds of entropy, including mouse movement interrupt timings. Bad implementations not considered. One problem with /dev/urandom is you always have to open it, create a filedescriptor just to get to some random number!?