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

From: Theodore Ts'o
Date: Fri Jan 20 2017 - 19:15:15 EST


On Fri, Jan 20, 2017 at 04:47:42PM +0100, Jason A. Donenfeld wrote:
>
> What do you mean? Nothing is wasted right now. The u64 function only
> gets u64s from a dedicated u64 array. The u32 function only gets u32s
> from a dedicated u32 array. There are separate batched entropy arrays
> for each function.

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?

- Ted