[PATCH] Remove os_random() and refactor its callers to use os_get_random(...)
Jouni Malinen
j at w1.fi
Mon Feb 8 10:24:59 PST 2016
On Mon, Feb 08, 2016 at 05:35:31PM +0000, Nick Lowe wrote:
> Because it is a relatively insignificant factor for the quantity of
> random bits that are being consumed in insensitive areas, where
> os_random suffices, compared to everything else.
>
> /dev/urandom isn't so CPU heavy that it is tangible for the use cases
> and it stops a future changes using what can be a dangerous function.
>
> I agree there are places where os_random could remain, but it just
> isn't worth it for no tangible benefit.
I'd prefer to do this type of changes one-by-one should there be any
stronger justification for some of the changes to the point of someone
potentially wanting to merge in such a change to a release branch. In
other words, about nine patches to convert the existing users and a
separate patch to remove the function in the end. Each of the patches
should have a commit message that explains why the particular change is
done (e.g., identify that this can be somewhat stronger design like the
EAP-pwd server case or state that it is just for the sake of getting rid
of os_random() callers where no such justification can be described).
--
Jouni Malinen PGP id EFC895FA
More information about the Hostap
mailing list