Hi Jason,

I've been taking a look at your patch, and i think it's... problematic.

You're using a union for the entropy_u64 and entropy_u32 arrays, and
the position field is used to indexed into those two arrays.

So if the first caller calls get_random_u64 with position=0, it will
get the first 64 bits out of the batched entropy, and increment the
position to 1.  If the second caller calls get_random_u32 with
position=1... it will get the second of the 32-bit chunks in the
batched entropy array --- which will include the 64 bits returned to
the first caller.

That's not very random.   :-(

                                                - Ted

Reply via email to