lkml.org 
[lkml]   [2006]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Entropy Pool Contents
Martin Mares wrote:
> No, the only safe thing the kernel can do is to add NO entropy,
> unless explicitly told otherwise.

Ahh, I think I see where I got confused now. I thought you wanted to
save and restore the entropy estimate after a reboot. I was trying to
say that you don't want to/can't do that. I would think that since you
are, in fact, adding some entropy by writing the data, that increasing
the entropy count would be fine, you just can't set it to its 'full'
value ( assuming it was full at shutdown ).

> More importantly, it should be possible for root to write to /dev/random
> _without_ increasing the entropy count, for example when restoring random
> pool contents after reboot. In such cases you want the pool to contain
> at least some unpredictable data before real entropy arrives, so that
> /dev/urandom cannot be guessed, but you unless you remember the entropy
> counter as well, you should not add any entropy.

I believe that random and urandom use separate entropy pools, so boot
scripts save/restore urandom to keep that nicely seeded, but not random.
It has to start clean each boot and rely on entropy created by the
usual input methods. That is actually why I have a problem with the
ioctl being required, because I can't just write a simple boot script to
save/restore random data as is done with urandom, and be able to extract
some random data right away.

-
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: 2006-11-29 21:07    [W:0.042 / U:11.976 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site