lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 12/25/15 20:16, Dirk Laurie wrote:
>> So, the first question I have is: do you folks plan to use a
>> kernel-provided randomness source like 'arc4random()' (under
>> *BSD) or 'getrandom()' (under Linux)?
> 
> On Ubuntu 14.04 `arc4random` is available in `#include <bsd/stdlib.h>`
> and there is no `getrandom`.

You're probably right; my knowledge of the Linux side of things
is spotty, sorry.

If 'luai_makeseed()' is to be changed in the main distribution,
there will be a need for some sort of detection of what the
current system supports, with a fallback to the portable
'time(NULL)'.

I think 'getrandom()' is a fairly new API, it is only available
since kernel version 3.17. Ubuntu 14.04 could be using an earlier
kernel.

The 'arc4random()' under '<bsd/stdlib.h>' looks like it may be
a part of 'libbsd' library.