bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [patch #6797] shred option to use internal RNG


From: Steve Schveighoffer
Subject: Re: [patch #6797] shred option to use internal RNG
Date: Thu, 2 Apr 2009 08:30:09 -0700 (PDT)



> From: Jim Meyering

> Pádraig Brady wrote:
> > Steven Schveighoffer wrote:
> >> Follow-up Comment #4, patch #6797 (project coreutils):
> >>
> >> Thanks for the suggestion, but I really don't understand the reluctance to
> >> utilize the (already implemented) internal random number generator.  It's
> >> there, it costs nothing extra to use it, it doesn't require extra programs
> >> that generate random data, nor external files.  It's even the default case
> >> when /dev/urandom does not exist.  What is the downside?
> >
> > None as far as I can see:
> > No new options.
> 
> A new option to tell shred to use its internal PRNG
> might make sense

This is what my patch does, I added the option:

-i, --random-internal

> -- or maybe some special syntax for the
> FILE in --random-source=FILE.
> Though adding a new option sounds cleaner.

This technically would work with my patch also, as the flag to randread to use 
the internal RNG is a 0-length string specified as the random source file name, 
so you could do:

--random-source=""

Not using a "special" filename would change the interface to randread (you'd 
need to pass a flag indicating it should use the internal RNG).  I'm OK with 
that too.

> > Relatively small change to optionally seed from /dev/urandom (once is 
> > enough).
> 
> Just seed from the existing interface, according to defaults
> or from the --random-source-specified file.

That is a good idea, but I'm not sure how to implement it.  The seeding is done 
internally in isaac.c, and I'm not really familiar with the seeding process.  
My patch assumes that the default seeding is fine.  If you have suggestions, 
I'll gladly implement them and resubmit the patch.

-Steve








reply via email to

[Prev in Thread] Current Thread [Next in Thread]