lua-users home
lua-l archive

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

On Thu, 2023-03-16 at 06:40 +0100, bil til wrote:
> Am Mi., 15. März 2023 um 20:28 Uhr schrieb Roger Leigh <>:
> >
> > [ ... replace this with a direct call to a hardware RNG and get a
> >   truly random number straight from the hardware. ...]
> ... this I tried also, but it is not so easy, as the RNG module is
> analogue and thus "a bit slow". It needs startup-time in millisecond
> range, and also the random values are not created "super-high-speed"
> (at least not in "digital clock speed" of the controller - I felt a
> bit unsure what would happen if Lua would ask for many random values
> one after each other - I would not like to invoke "delay waiting
> states" then (but I did NOT investigate this further so far)).

But isn't the point that you don't keep draining random numbers
from the external hardware that is slow to generate them (the
reason being that you get something really random, which is what
you want in that specific case)?

That's why you have a pseudo RNG in the software, and _seed_ that
from something with much better entropy. Results in the fast(er)
generation of GoodEnough(TM) random numbers at an acceptable
cost. Or did I miss something?

virtually yours
Gerhard Sittig
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.