Open cyphar opened 6 years ago
Yeah, I think that's the reason for the comment at libgfshare.h:34-39. It's already set up so you can assign a different function to gfshare_fill_rand
if you want.
(I'm not the author of libgfshare, but I suspect the "not very random" remark is based on the "NOTES" section in the Linux rand
(3) page. Perhaps this code used to use that function instead.)
Really we should be using
getrandom(2)
or reading directly from/dev/urandom
rather than usingrandom(3)
(which is deterministic). I don't really like this justification:I can prepare a patch for this if you like, but it's not clear to me whether this library is actually maintained.