Re: entropy

2010-01-10 Thread Matt Domsch
On Thu, Jan 07, 2010 at 06:40:02PM +0100, Roberto Ragusa wrote:
 You could investigate on how rngd works.

rngd is your friend, if you have a source of entropy.  There's a patch
to rngd by Dell at the rngd web site [1] which uses the TPM chip (if
present) to feed the entropy pool and keep it full.

http://sourceforge.net/projects/gkernel/

-- 
Matt Domsch
Technology Strategist, Dell Office of the CTO
linux.dell.com  www.dell.com/linux

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


entropy

2010-01-07 Thread Luca
Hi all,
 if I simply write to /dev/random, will that increase the entropy of my
system? (I'm assuming that the data I'm writing are random and that somehow
I got them).

Thanks,
 Luca
-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

Re: entropy

2010-01-07 Thread Roberto Ragusa
Luca wrote:
 Hi all,
  if I simply write to /dev/random, will that increase the entropy of my
 system? (I'm assuming that the data I'm writing are random and that
 somehow I got them).

Wikipedia says so.

My tests say no.

In particular this brutal approach does not increase the entropy
  cat /dev/urandom /dev/random
(it is stupid to do that, I know, but it's just a test)

You could investigate on how rngd works.

-- 
   Roberto Ragusamail at robertoragusa.it

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: entropy

2010-01-07 Thread Patrick O'Callaghan
On Thu, 2010-01-07 at 18:40 +0100, Roberto Ragusa wrote:
 Luca wrote:
  Hi all,
   if I simply write to /dev/random, will that increase the entropy of my
  system? (I'm assuming that the data I'm writing are random and that
  somehow I got them).
 
 Wikipedia says so.

But random(4) does not. Is there some other authoritative source for
this?

poc

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: entropy

2010-01-07 Thread Tony Nelson
On 10-01-07 12:40:02, Roberto Ragusa wrote:
 Luca wrote:
  Hi all,
   if I simply write to /dev/random, will that increase the entropy 
  of my  system? (I'm assuming that the data I'm writing are random 
  and that somehow I got them).
 
 Wikipedia says so.
 
 My tests say no.
 
 In particular this brutal approach does not increase the entropy
   cat /dev/urandom /dev/random
 (it is stupid to do that, I know, but it's just a test)
 ...

`man 4 random` says that the current entropy can be read and written 
from /dev/urandom, not /dev/random.  This is used to preserver entropy 
across reboots.

-- 

TonyN.:'   mailto:tonynel...@georgeanelson.com
  '  http://www.georgeanelson.com/

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: entropy

2010-01-07 Thread Matthew Miller
On Thu, Jan 07, 2010 at 07:28:20PM +, Patrick O'Callaghan wrote:
 But random(4) does not. Is there some other authoritative source for
 this?

Yes. :)

http://lxr.linux.no/#linux+v2.6.32/drivers/char/random.c

-- 
Matthew Miller mat...@mattdm.org
Senior Systems Architect 
Cyberinfrastructure Labs / Instructional  Research Computing
Computing  Information Technology 
Harvard School of Engineering  Applied Sciences

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: entropy

2010-01-07 Thread Matthew Miller
On Thu, Jan 07, 2010 at 06:40:02PM +0100, Roberto Ragusa wrote:
  Hi all,
   if I simply write to /dev/random, will that increase the entropy of my
  system? (I'm assuming that the data I'm writing are random and that
  somehow I got them).
 Wikipedia says so.
 My tests say no.

How are you testing?

The wikipedia article says:

  Non-random data is harmless, because only a privileged user can issue the
  ioctl  needed to increase the entropy estimate. 

SO 

-- 
Matthew Miller mat...@mattdm.org
Senior Systems Architect 
Cyberinfrastructure Labs / Instructional  Research Computing
Computing  Information Technology 
Harvard School of Engineering  Applied Sciences

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: entropy

2010-01-07 Thread Roberto Ragusa
Tony Nelson wrote:
 On 10-01-07 12:40:02, Roberto Ragusa wrote:
 Luca wrote:
 Hi all,
  if I simply write to /dev/random, will that increase the entropy 
 of my  system? (I'm assuming that the data I'm writing are random 
 and that somehow I got them).
 Wikipedia says so.

 My tests say no.

 In particular this brutal approach does not increase the entropy
   cat /dev/urandom /dev/random
 (it is stupid to do that, I know, but it's just a test)
  ...
 
 `man 4 random` says that the current entropy can be read and written 
 from /dev/urandom, not /dev/random.  This is used to preserver entropy 
 across reboots.

That's true.
But as far as I can see neither writing to random nor to urandom will
increase the entropy availability.

After checking the sources of rngd, I found it uses a specific ioctl:
  ioctl(random_fd, RNDADDENTROPY, entropy);

So I think Luca can inject entropy by using the same ioctl in his
own application, or by using rngd in some way (you can tell it where
to take entropy from).

-- 
   Roberto Ragusamail at robertoragusa.it

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines


Re: entropy

2010-01-07 Thread Patrick O'Callaghan
On Thu, 2010-01-07 at 21:42 +0100, Roberto Ragusa wrote:
 Tony Nelson wrote:
  On 10-01-07 12:40:02, Roberto Ragusa wrote:
  Luca wrote:
  Hi all,
   if I simply write to /dev/random, will that increase the entropy 
  of my  system? (I'm assuming that the data I'm writing are random 
  and that somehow I got them).
  Wikipedia says so.
 
  My tests say no.
 
  In particular this brutal approach does not increase the entropy
cat /dev/urandom /dev/random
  (it is stupid to do that, I know, but it's just a test)
   ...
  
  `man 4 random` says that the current entropy can be read and written 
  from /dev/urandom, not /dev/random.  This is used to preserver entropy 
  across reboots.
 
 That's true.
 But as far as I can see neither writing to random nor to urandom will
 increase the entropy availability.

AFAIK the purpose of writing to /dev/urandom is simply to preserve the
entropy state across reboots (at least that's the standard example).
There's no implication that it increases the entropy.

The effect of writing to /dev/random doesn't seem to be defined.

poc

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines