lkml.org 
[lkml]   [2009]   [May]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] random: make get_random_int() more random

* Matt Mackall <mpm@selenic.com> wrote:

> On Wed, May 06, 2009 at 10:09:54PM +0200, Ingo Molnar wrote:
> > I then ran the FIPS randomness test over the first 20,000 bits [2.5K
> > data], which it passed:
>
> That's proves nothing except that you have no idea what you're
> talking about. People regularly break things that FIPS gives
> flying colors. FIPS is nothing but a statistical sanity-check.

The current code didnt even pass the FIPS test, due to:

<...>-1739 [000] 112.487579: sys_prctl: get_random_int(): d1f8a190
<...>-1739 [000] 112.487583: sys_prctl: get_random_int(): d1f8a190
<...>-1739 [000] 112.487584: sys_prctl: get_random_int(): d1f8a190
<...>-1739 [000] 112.487585: sys_prctl: get_random_int(): d1f8a190
<...>-1739 [000] 112.487586: sys_prctl: get_random_int(): d1f8a190
<...>-1739 [000] 112.487588: sys_prctl: get_random_int(): d1f8a190
<...>-1739 [000] 112.487589: sys_prctl: get_random_int(): d1f8a190
<...>-1739 [000] 112.487590: sys_prctl: get_random_int(): d1f8a190
<...>-1739 [000] 112.487592: sys_prctl: get_random_int(): d1f8a190
<...>-1739 [000] 112.487593: sys_prctl: get_random_int(): d1f8a190
<...>-1739 [000] 112.487594: sys_prctl: get_random_int(): d1f8a190
<...>-1739 [000] 112.487595: sys_prctl: get_random_int(): d1f8a190
<...>-1739 [000] 112.487597: sys_prctl: get_random_int(): d1f8a190
<...>-1739 [000] 112.487598: sys_prctl: get_random_int(): d1f8a190
<...>-1739 [000] 112.487599: sys_prctl: get_random_int(): d1f8a190
<...>-1739 [000] 112.487601: sys_prctl: get_random_int(): d1f8a190

Linus's patch is a marked improvement, and it is really what we need
here mostly.

We cannot afford true physical randomness (it's too expensive to get
and not all hw has it), and even a 'good' PRNG is pretty expensive.
Performance is the main reason why the networking stack has its own
fast hack.

> Do you need this to be publicly broken again by someone who
> actually knows something about cryptanalysis before you'll accept
> that it's a bad idea? If so, then please move the code out of
> random.c, so that I don't have to share in your embarassment a
> second time.

I see your flame, but what's your technical point?

Ingo


\
 
 \ /
  Last update: 2009-05-06 22:57    [W:0.132 / U:0.356 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site