Date: Sat, 19 Jul 2014 22:26:05 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: Steven Chamberlain <steven@pyro.eu.org>, freebsd-security@freebsd.org Subject: Re: Speed and security of /dev/urandom Message-ID: <20140719192605.GV93733@kib.kiev.ua> In-Reply-To: <20140719190348.GM45513@funkthat.com> References: <53C85F42.1000704@pyro.eu.org> <20140719190348.GM45513@funkthat.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--Gx/Ih+SeBVJCvkYs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Jul 19, 2014 at 12:03:48PM -0700, John-Mark Gurney wrote: > So, my suggestions: > 1) Convert arc4random(9) in the kernel to use the random pool as > /dev/random uses. I vaguely remeber there being an issue w/ > arc4random(9) being used early in boot before /dev/random is > initalized which would complicate this change... > 2) Convert arc4random(3) to use the sysctl, and if the sysctl fails, > kill the process. I think that using sysctl for non-management functionality is wrong. If this feature is for the libraries and applications, and not for system management and introspection utilities, it should be normal syscall. Being syscall, it also solves the issue of backward-compatibility, i.e. a new code, running on old kernel, get SIGSYS when using non-existing syscall. If application is so sophisticated that it want to handle the situation, it can, by installing a signal handler. Otherwise, it is terminated automatically. --Gx/Ih+SeBVJCvkYs Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJTysZMAAoJEJDCuSvBvK1BEIkP/jMFy5Rx4fpQ2PDYcmdp94wt gMGmwws0mlerSZ7X/FKqQ5drlppeGbTuQoFw7+zIli4mDImTnDEIZ2tBdAVOFmOs OQrutmvoWfUweS2H0kSRcVBKqqII6OaUpSQ2t4ikBCQV5Ww0HooOm9gvm6e23ZPV XTVJx1AMz6HM+Ama+cFsmvUwvsNLWXLQSOdfIdYFjiRTolEAFO0Cx4LqRt7ENWnS G57ztrYjPTA3fegbaSdN24Wg8BkRjtJrWr2SqJeJu2Uy1ZoIrUwRz63HC74+B/ym TLfYqPPoNSDFov+JhoYvaln50K6V3guXx3xhzWNbM4cm2k0CoB4OfeDiwJhHdFg8 IvaQZrSywiH0Bx0G1ZzjVZiBFq4It0iB2u1vwXGkfjL9Rpbh9yBCkDVijuTl0eYd 7qUQY20txEJ2Y28ZWxuJyXik2H+ltAa2rkX52qBRyKH/SKyEYgoijpMmD1iJStPy H8QzN45scHFpS0KTbuPRI7pq3ISg+TJ3iJUSeVfRCBGPwXe/ZZcs4MUfD2+WPObK J6mHeNLID5/xkR4mJA7xdZ71XPIeFG4pTjVZFXHCwrAwMDpDqg+txdoetCv7ElZA dnh6Z3qRv5QFJjZ2RWfUHemkcJOXhtxHLdugDfrvh7oZf32Xu1oYlJ0Zh2nqJ7Ws /UXqCb0gLK7wqYafer9o =F+gt -----END PGP SIGNATURE----- --Gx/Ih+SeBVJCvkYs--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140719192605.GV93733>