On Mon, Dec 26, 2022 at 7:29 PM Alejandro Colomar via Libc-alpha <libc-alpha@xxxxxxxxxxxxxx> wrote: > > Hi Jonny, > l it several times per second, you'll > find that it only changes the seed every second. There are better ways to > produce a good seed. > > However, I prefer suggesting arc4random() rather than workarounding rand(3) to > get good results. > > Florian, did you already merge arc4random() to glibc? arc4random is already on libc.. now to make it a replacement for everything random one has to hope for https://git.kernel.org/pub/scm/linux/kernel/git/crng/random.git/log/?h=vdso to be merged into the mainline kernel. That will make it as fast as possible and really,really cheap to call. Now it is just a wrapper that calls getrandom syscall. WRT the rand() example suggestion..it is bad.. The only addition I will make to this man page is strongly discouraging its use. Suggesting to use ar4random if available or one of https://prng.di.unimi.it/ PRNG if not for crypto.