Security

Hasard library

File descriptor: dev_nonblocking tries to set FD_CLOEXEC flag on the file descriptor, whereas dev_blocking and dev_hardware fail if FD_CLOEXEC flag can not be set.

Mersenne Twister

Why is Mersenne Twister non-secure? http://groups.google.com/group/sci.crypt/browse_thread/thread/305c507efbe85be4

MT was not designed as a cryptographic generator.  There's a
straightforward way (described in the MT paper) to reconstruct the
internal state.  Remember where it says something like it's
equidistributed in 623 dimensions?  That means that if you start
counting in 624 or more dimensions, all bets are off.  That's
different from a cryptographic generator, which can't be distinguished
from uniform no matter how many dimensions you use.
There can be no "cryptographic generator" in that sense
which uses a computer program.  This includes BBS, which
to be sure has more dimensions, and is not linear.
As has been noted, it's a linear shift register.

It is because there is a simple relationship between the successive
32-bit words of pseudorandom data that the Mersenne Twister produces.
The relationship will allow those words to be in a sequence that does
not exactly repeat itself for a very long time, but it only takes a
short time to determine all the information you need to duplicate the
entire sequence.

The successive words of data give the entire internal state; in a
secure keystream generator, the internal state is nearly impossible to
derive from the outputs.
Is it possible to predict forthcoming values,
given a string of previous values? (...)
Mersenne Twister, which needs < 650
In the simplest possible terms there is a difference between something
producing a random looking distrubtion of bytes and producing a stream
of bytes that is indistinguishable from a random source.

The MT is an algorithm that passes the first test but not the second.
It is easy to distinguish MT from a random source and this fact alone
is considered a break of the MT. Fufilling the indistinguishability
criteria is neccessary and sufficient for producing a secure
stream-cipher.