Re: [PATCH 1/2] random: use chacha20 for get_random_int/long

From: Jason A. Donenfeld
Date: Fri Jan 20 2017 - 19:43:45 EST


On Sat, Jan 21, 2017 at 1:15 AM, Theodore Ts'o <tytso@xxxxxxx> wrote:
> But there is a shared pointer, which is used both for the dedicated
> u32 array and the dedicated u64 array. So when you increment the
> pointer for the get_random_u32, the corresponding entry in the u64
> array is wasted, no?

No, it is not a shared pointer. It is a different pointer with a
different batch. The idea is that each function gets its own batch.
That way there's always perfect alignment. This is why I'm suggesting
that my approach is faster.

Would you like me to roll your (slower) bitshifting idea as v2, or can
we stick with my v1?

Jason