Re: [PATCH] add_mouse_randomness

From: Matt Mackall
Date: Thu Sep 04 2003 - 22:23:07 EST


On Fri, Sep 05, 2003 at 12:51:54AM +0200, Andries.Brouwer@xxxxxx wrote:
> I do not know whether anybody cares, but the random driver
> is a little bit broken these days.
>
> Long ago:
> Keystrokes cause randomness added via add_keyboard_randomness.
> Mouse movements cause randomness added via add_mouse_randomness.
> Key repeat does not add randomness.
>
> Today:
> Every keypress and every key release causes two calls of
> add_mouse_randomness and one call of add_keyboard_randomness.
> Key repeat causes lots of calls of add_mouse_randomness.
>
> The random driver contains a mechanism (delta, delta2, delta3)
> for estimating the amount of entropy in a stream of moments in
> time. But the fact that every event causes two calls, very
> quickly after each other, poisons this mechanism, and makes us
> overestimate.

The real problem is that the deltas are calculated from gigahertz
cycle counters, but yes, we're calling too frequently and blowing away
useful history. I've experimented with making the deltas per-source as
well.

I'll put this on my todo list.

--
Matt Mackall : http://www.selenic.com : of or relating to the moon
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/