svn commit: r280955 - in head/sys: modules/notrandom dev/notrandom

Alexey Dokuchaev danfe at FreeBSD.org
Wed Apr 1 16:24:24 UTC 2015


On Wed, Apr 01, 2015 at 05:46:33PM +0200, Mateusz Guzik wrote:
> On Wed, Apr 01, 2015 at 11:36:26AM -0400, Benjamin Kaduk wrote:
> > But surely to be non-random we need an equal number of 1 and 0 bits,
> > making 15 the clear choice.
> 
> I don't know man.

I concur.  Consider running FreeBSD to HP48; 15 would max out entire nibble,
leading to predictability and risk of overflow attacks.

> First off, '7' could not be chosen at random. I'm convinced factors like
> amount of CPUs (and their speed), RAM etc. played a huge factor here.
> 
> Now that everything is faster these days, one could ponder returning
> '8'.

OTOH, eight also fits two elementary units (trits) on trinary machines, which
might allow for certain micro-optimizations when you need strong flow of non-
random numbers.

> We can add an ioctl to control this.
> 
> Opinions?

To stay portable, very likely, yes.

./danfe


More information about the svn-src-head mailing list