Re: Head's up: Yarrow-style periodic entropy saving

2001-01-12 Thread Andrzej Bialecki

On Thu, 11 Jan 2001, Doug Barton wrote:

   For the sake of those who don't follow commit messages (shame on you!),
 here's your fair warning regarding this change. This is the promised update
 that periodically (every 3 minutes by default) saves 2k of randomness to a
 set of rotating files stored by default in /.entropy. That location was
 chosen so that it could be loaded as early as possible in the boot process.

On / ? that's quite inconvenient for systems running with read-only root
FS...

Andrzej Bialecki

//  [EMAIL PROTECTED] WebGiro AB, Sweden (http://www.webgiro.com)
// ---
// -- FreeBSD: The Power to Serve. http://www.freebsd.org 
// --- Small  Embedded FreeBSD: http://www.freebsd.org/~picobsd/ 




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Head's up: Yarrow-style periodic entropy saving

2001-01-11 Thread Doug Barton

For the sake of those who don't follow commit messages (shame on you!),
here's your fair warning regarding this change. This is the promised update
that periodically (every 3 minutes by default) saves 2k of randomness to a
set of rotating files stored by default in /.entropy. That location was
chosen so that it could be loaded as early as possible in the boot process.
As mentioned in the commit message, Mark suggested the defaults for size,
period, and number of files based on the requirements of the Yarrow
algorithm. System load for this should be negligible. All the parameters
are tunable if load becomes a problem. 

I chose the operator user as the custodian of the entropy files since that
both isolates them from unprivileged users to a certain extent, and
minimizes the possibility of damaged caused by file based exploits that
could be caused if the files were owned by root. This is bike shed
material.

For now my opinion is that the best option is to leave the single file
written out at shutdown intact. First, I'd rather make one change at a
time. Second, having both systems in place gives users with special needs
(like diskless boots) more options in terms of saving entropy. I've no
objection to ripping this out down the road if circumstances warrant. 

Enjoy,

Doug

 Original Message 
Subject: cvs commit: src/etc crontab rc src/etc/defaults
rc.confsrc/etc/mtree BSD.root.dist src/libexec
Makefilesrc/libexec/save-entropy Makefile save-entropy.sh
Date: Thu, 11 Jan 2001 05:01:20 -0800 (PST)
From: Doug Barton [EMAIL PROTECTED]
To: [EMAIL PROTECTED], [EMAIL PROTECTED]

dougb   2001/01/11 05:01:20 PST

  Modified files:
etc  crontab rc 
etc/defaults rc.conf 
etc/mtreeBSD.root.dist 
libexec  Makefile 
  Added files:
libexec/save-entropy Makefile save-entropy.sh 
  Log:
  Add a system to save entropy from /dev/random periodically so that
  it can be used to reseed at boot time. This will greatly increase
  the chances that there will be sufficient entropy available at
  boot time to prevent long delays.
  
  For /etc/rc, remove the vmstat and iostat runs from the attempt
  to provide some cheesy randomness if the files fail, since
  those programs are dynamically linked, and ldd seems to want
  some randomness to do its magic.
  
  Guidance and parameters for this project were provided by
  Mark Murray, based on the requirements of the Yarrow
  algorithm. Some helpful suggestions for implementation
  (including the tip about iostat and vmstat) were provided
  by Sheldon Hearn. All blame for problems or mistakes is
  mine of course.
  
  Revision  ChangesPath
  1.28  +4 -1  src/etc/crontab
  1.247 +27 -11src/etc/rc
  1.84  +4 -1  src/etc/defaults/rc.conf
  1.48  +5 -1  src/etc/mtree/BSD.root.dist
  1.44  +2 -1  src/libexec/Makefile


http://www.FreeBSD.org/cgi/cvsweb.cgi/src/etc/crontab.diff?r1=1.27r2=1.28f=h
http://www.FreeBSD.org/cgi/cvsweb.cgi/src/etc/rc.diff?r1=1.246r2=1.247f=h
http://www.FreeBSD.org/cgi/cvsweb.cgi/src/etc/defaults/rc.conf.diff?r1=1.83r2=1.84f=h
http://www.FreeBSD.org/cgi/cvsweb.cgi/src/etc/mtree/BSD.root.dist.diff?r1=1.47r2=1.48f=h
http://www.FreeBSD.org/cgi/cvsweb.cgi/src/libexec/Makefile.diff?r1=1.43r2=1.44f=h


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Head's up: Yarrow-style periodic entropy saving

2001-01-11 Thread Ollivier Robert

According to Matt Dillon:
 Please make the default something more reasonable, like every 30 minutes.
 It is simply not necessary to save entropy every 3 minutes.  It's massive
 overkill.

Agreed.
 
 This is broken.  The files should be in /var somewhere... for example,
 /var/db/entropy/

Agreed too, this is the standard location for such things. I know we need
entropy at boot time (hopefully after mounting /var) but that's not a good
reason to put them in / IMHO.
-- 
Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- [EMAIL PROTECTED]
FreeBSD keltia.freenix.fr 5.0-CURRENT #80: Sun Jun  4 22:44:19 CEST 2000



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Head's up: Yarrow-style periodic entropy saving

2001-01-11 Thread Sheldon Hearn



On Thu, 11 Jan 2001 21:20:44 +0100, Ollivier Robert wrote:

  This is broken.  The files should be in /var somewhere... for example,
  /var/db/entropy/
 
 Agreed too, this is the standard location for such things. I know we need
 entropy at boot time (hopefully after mounting /var) but that's not a good
 reason to put them in / IMHO.

Hop off the bandwagon.  The system didn't use /var/db/ before Doug's
commit either.  See my _long_ explanation (before/after/future) on the
cvs-all mailing list.

Ciao,
Sheldon.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: Head's up: Yarrow-style periodic entropy saving

2001-01-11 Thread Ollivier Robert

According to Sheldon Hearn:
 Hop off the bandwagon.  The system didn't use /var/db/ before Doug's
 commit either.  See my _long_ explanation (before/after/future) on the
 cvs-all mailing list.

I know the system used now stores it in /entropy. I was too busy to react at
that time but I still dislike using / for that.

I read your message as well but I'm still behind Matt  Jordan on that one.
-- 
Ollivier ROBERT -=- FreeBSD: The Power to Serve! -=- [EMAIL PROTECTED]
FreeBSD keltia.freenix.fr 5.0-CURRENT #80: Sun Jun  4 22:44:19 CEST 2000



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message