lua-users home
lua-l archive

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


On Mar 23, 2018, at 6:31 PM, Coda Highland <chighland@gmail.com> wrote:

> On Fri, Mar 23, 2018 at 5:24 PM, Albert Chan <albertmcchan@yahoo.com> wrote:
>> You mean just two math.random(0) (128 bits) can predict the next one ?
> 
> No, if you see the least significant bit of 128 consecutive calls to
> math.random, then you can predict the least significant bit of every
> call from there on out.
> 

I misunderstood what Ge were saying, but I somehow got it right !

--> two (at most 3) math.random(0) (128 bits) can predict the next one

For math.random(), 3 calls can definitely "crack" xorshift128+

https://blog.securityevaluators.com/hacking-the-javascript-lottery-80cc437e3b7f

Too bad it is not a real lottery :-(