Source-Changes-D archive

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

Re: CVS import: othersrc/external/bsd/ibbs



On Mon, Nov 23, 2015 at 05:56:01AM +0000, Alistair G. Crooks wrote:
> Module Name:	othersrc
> Committed By:	agc
> Date:		Mon Nov 23 05:56:01 UTC 2015
> 
> Update of /cvsroot/othersrc/external/bsd/ibbs
> In directory ivanova.netbsd.org:/tmp/cvs-serv12751
> 
> Log Message:
> Import an integer-based version of the Blum Blum Shub random number
> generator into othersrc.
> 
> 	IBBS - Integer Blum Blum Shub Random Number Generator
> 	=====================================================
> 
> 	This is a small Blum Blum Shub implementation which uses a Mersenne
> 	Twister to take 4 bytes of entropy (retrieved from the microseconds
> 	part of gettimeofday(2)), and generates 2 prime numbers and a seed from
> 	this.  Each prime number and seed is 16 bits.  A deterministic prime
> 	check is used to ensure we are dealing with safe/unsafe prime numbers.
> 
> 	Since 16 bits are used for the two primes, care is taken to avoid
> 	cycles in the BBS output. If a cycle is detected, the generator is
> 	re-seeded, and output starts again.
> 
> 	The RNG seems to be quite efficient, generating numbers at 10 MBps
> 	on a NetBSD VM running in Fusion hosted on Mac OS X.

Doesn't sound like anywhere near enough entropy.
If you start with 32 bits you'll get 'birthday paradox' duplicated
sequences after a relatively small number of boots.

	David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index