Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Dec 2009 14:47:03 +0000
From:      RW <rwmaillists@googlemail.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: yarrow random generator
Message-ID:  <20091224144703.482896eb@gumby.homeunix.com>
In-Reply-To: <5a5b03660912240445x7df1498dt42e29d93105efebc@mail.gmail.com>
References:  <5a5b03660912240445x7df1498dt42e29d93105efebc@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 24 Dec 2009 15:45:15 +0300
Paul Graphov <graphov@gmail.com> wrote:

> Hello guys,
> 
> I've looked at FreeBSD 8.0 cryptographically secure pseudorandom
> numbers generator and have a question. It looks like a bug but I'am
> not sure.
> 
> In file sys/dev/randomdev.c, function random_read:
> 
>         if (!random_systat.seeded)
>                 error = (*random_systat.block)(flag);
> 
> It blocks until PRNG is seeded.

random_systat.seeded is initialized to 1 and it's never set to anything
other than 1

I got impression that blocking was something that seemed like a good
idea at the time, but fell-off half-way through coding. It's not a
good idea to block /dev/random, without a separate urandom. 



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