Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 2003 23:44:55 -0700 (PDT)
From:      Nate Lawson <nate@root.org>
To:        Mike Silbersack <silby@silby.com>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/libkern arc4random.c
Message-ID:  <20030814234315.M94986@root.org>
In-Reply-To: <20030815013501.L1565@odysseus.silby.com>
References:  <200308150634.h7F6Ylxw022089@repoman.freebsd.org> <20030815013501.L1565@odysseus.silby.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 15 Aug 2003, Mike Silbersack wrote:
> On Thu, 14 Aug 2003, Mike Silbersack wrote:
> >   Modified files:
> >     sys/libkern          arc4random.c
> >   Log:
> >   Lock down arc4random so it can be safely called w/o Giant.
> >
> >   Minor code reorganization was required, but the only functional
> >   change was that the first 1024 bytes of output are thrown out
> >   after each reseed, rather than just the initial seed.
> >
> >   Revision  Changes    Path
> >   1.12      +26 -17    src/sys/libkern/arc4random.c
>
> This doesn't use per-cpu randomness pools or anything cool, but I decided
> that easily verified locking was more important at this point.  (And I
> doubt that it's a performance problem either way.)

I'm less concerned about performance than loss of entropy.  You also
removed the comment pointing out the weakness that occurs if the first 256
bytes of output are used.

-Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030814234315.M94986>