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 <paul-lua@malete.org> 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: http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lrandom
> ... 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. "
> http://www.iro.umontreal.ca/~lecuyer/myftp/papers/wellrng.pdf

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):
	<http://www.rjek.com/arcfour.lua.txt>

Hardware USB-attached true random number generator, where driver
software is (open source and) implemented mostly in Lua:
	<http://www.entropykey.co.uk/>

B.