lua-users home
lua-l archive

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

On Sun, 17 Jan 2010 16:21:16 +0100
Klaus Ripke <> wrote:

> On Sun, Jan 17, 2010 at 12:52:00PM -0200, Luiz Henrique de Figueiredo
> wrote:
> > > For the randum number generator, pick one according to your
> > > requirements. E.g. many have very good distribution properties,
> > > but next values are rather predictable once you know a sequence,
> > > which may be a no-go.
> >
> > Shameless plug:
> ... which uses Mersenne Twister.
> An excellent algorithm in many situations, just be aware of
> "
> This is in fact a limitation of all F2 -linear generators,
> including the Mersenne twister, the TT800, etc.
> Because of their linear nature,
> the sequences produced by these generators just cannot have 
> the linear complexity of a truly random sequence.
> This is definitely unacceptable in cryptology, for example,
> but is quite acceptable for the vast majority of simulation
> applications if the linear dependencies are of long range and high
> order. "

One would assume that it's perfectly safe for some cryptographic
purposes?  Such as stream ciphers, which are essentially PRNGs anyway.

If we're doing plugs, how about these two Lua-related
cryptography/entropy gizmos:

Pure Lua implementation of RC4 (PRNG and stream cipher):

Hardware USB-attached true random number generator, where driver
software is (open source and) implemented mostly in Lua: