Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Aug 2003 21:19:31 +0200
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Sam Leffler <sam@errno.com>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/libkern arc4random.c 
Message-ID:  <12160.1060975171@critter.freebsd.dk>
In-Reply-To: Your message of "Fri, 15 Aug 2003 12:17:46 PDT." <88549156.1060949866@melange.errno.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <88549156.1060949866@melange.errno.com>, Sam Leffler writes:
>> In message <87953260.1060949270@melange.errno.com>, Sam Leffler writes:
>>>
>>> Note that the data generated by arc4random needs to be exported to user
>>> apps for seeding crypto operations when operating in a chroot'd
>>> environment  where /dev/random is not available.
>>
>> I actually thought about that a bit, and I think "/dev/random" is
>> a wrong concept.
>>
>> I think we should have a randomdata(2) system call instead.
>>
>> Having a /dev/random which is sometimes (chroot/jail) means that
>> applications running under those circumstances are incredible fragile
>> to spoofing by creating a fake "/dev/random" in some way.
>
>openbsd defined a sysctl to get data from arc4random.  They use this as a 
>fallback if /dev/random or similar is not available.  Applications that 
>wanted to be paranoid about spoofing could use this directly.  I have not 
>compared the goodness of the data from /dev/random and arc4random.

A sysctl works for me too.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



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