lkml.org 
[lkml]   [2011]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG] perf: bogus correlation of kernel symbols

* Ray Lee <ray-lk@madrabbit.org> wrote:

> On Mon, May 23, 2011 at 3:49 AM, Ingo Molnar <mingo@elte.hu> wrote:
> > Well, since entropy does not get reduced on addition of independent variables
> > the right sequence is (pseudocode):
> >
> >        rnd  = entropy_cycles();
> >        rnd += entropy_rdrand();
> >        rnd += entropy_RTC();
> >        rnd += entropy_system();
>
> I think you mean concatenation rather than addition? Or perhaps XOR, or a
> hash? [...]

Yeah.

In this special case probably concatenation works the best: the above 4 random
variables have total randomness probably less than 32 bits, so we want to
create 4 tight random numbers and concatenate them.

[ XOR would destroy some fair amount of entropy because most of these random
variables have their randomness in their low bits, and a hash would probably
lose about 2 bits and would also be slower. A hash would probably be safer
and more robust though, if we mis-identify any of the random variables. ]

Thanks,

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

\
 
 \ /
  Last update: 2011-05-23 21:39    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site