Re: Pike 8.0 beta

"Stephen R. van den Berg" <[email protected]>
Newsgroups gmane.comp.lang.pike.devel,gmane.comp.lang.pike.user
Message-ID <[email protected]>
Peter Bortas wrote:
>o The random(), random_string() and random_seed() might be more random

>  On computers with a hardware pseudo random generator random() can
>  return significantly more random numbers, however, this means that
>  random_seed is a no-op on those machines.

That would mean that it becomes impossible to generate an identical
random stream using the same random_seed between different runs or
between different architectures.

I'd say it would be prudent to switch to a predictable
pseudo-random-sequence as soon as someone has called random_seed() with
a non-zero parameter.  If random_seed() is not being called, then
it does not matter, and faster and more random is better.

>  A side-effect of this is that random_string is now actually
>  significantly faster on at least x86 cpu:s with rdrnd.

>  Note: If you want cryptographically random data please use
>  Crypto.Random.random_string unless you know for sure the random data
>  returned by the RDRND instruction is random enough.
-- 
Stephen.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.