new ssp patch sysctl-erandom (was Re: book)

Robert Connolly robert at
Tue Apr 20 21:24:34 PDT 2004

On April 20, 2004 11:16 pm, Archaic wrote:
> On Tue, Apr 20, 2004 at 06:25:46PM -0400, Robert Connolly wrote:
> > All my initial testing of the new sysctl-erandom interface are good. It
> > works. I left a few loose ends in the book, I want to get blowfish
> > passwords in, and after I plan to integrate sysctl-erandom into mkstemp
> > (lfs-utils). Anyone know where else this can be used? Aswell, I want
> > sysctl interfaces for urandom and random so crypto can use this facility
> > too.
> If we start making everything use the same source, will the data pool
> run too low?

mouse+keyboard -> kernel
					-> random
						-> urandom
						-> frandom
							-> erandom

Erandom uses the fluctuating state of frandom as a seed. Frandom seeds from 
random when its loaded or used. Because random can't be guessed, neither can 
frandom's pool, nor erandoms output. We don't need to use frandom very much, 
or at all; maybe once a day from crontab just to reseed erandom. So, erandom 
doesn't drain anything, it uses available randomness in the kernel as a seed 
without taking anything from /dev/random. Its output was tested for random 
quality and looks fine. Its something like urandom cut in half. Frandom feeds 
off random directly, taking 4 bytes and making that into whatever (much like 
what bsd's arandom does). The erandom device is like what urandom does when 
random is empty, I think in therory erandom uses the same technique pax/aslr 
does for gathering entropy. The point of this is so SSP does not use any 
kernel entropy durring normal operation, while still having urandom quality 
guard values. The sysctl interface is a bonus. I've emailed the mktemp 
maintainer so hopefully sysctl erandom can be a configure option instead of a 
patch. I feel sysctl is a more robust interface than /dev/ mainly because it 
is a bit faster to execute and works threw chroot.

More information about the hlfs-dev mailing list