yarrow random generator

Paul Graphov graphov at gmail.com
Thu Dec 24 16:07:08 UTC 2009


random_systat.seeded is exported to sysctl? isn't it?
In this case If somebody resets it to zero, some "read" goest to "block" and

before acquiring mutex it is reseeded, setting it to true, block will never
leave the cycle.

2009/12/24 RW <rwmaillists at googlemail.com>

> On Thu, 24 Dec 2009 15:45:15 +0300
> Paul Graphov <graphov at 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.
> _______________________________________________
> freebsd-hackers at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>


More information about the freebsd-hackers mailing list