Re: Is this a csprng?



On Nov 21, 2:50 am, g...@xxxxxxxxxxxxx (Greg Rose) wrote:
In article <df48a599-acf8-4b4c-9619-af6a8f596...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,

Phoenix  <ribeiroa...@xxxxxxxxx> wrote:
The algorithm:

x=x(x+b)+c

If b and c are positive, this just grows without
bound, and finding b and c (and then x) would be
easy. Basically, wait until the second of two
consecutive numbers is nearly the square of the
first.

So I assume you mean "modulo something". If the
modulus is a Blum integer (look it up), I think it
is secure, and it is certainly secure if b == c == 0.

According to the link, it works using floating point number modulo 1.
So it's hardly portable and IMHO hard to analyse.

The author states that "Is very portable from platform to platform."
but this is very wrong - for example when using double in C on i86 the
precission may be 80 bits if the values get stored in registers and it
may 64 bits if there get saved to memory. So the result depends on the
compiler, compile flags and also on the usage pattern (when generating
many numbers in row he values stays in registers, when the computation
is interleaved with something else they may be saved to memory).

What's most interesting there is the formula for period length
depending on the current index...
.



Relevant Pages