On 16/07/10 22:17, Paul Eggert wrote:
> In looking at the random part of coreutils some more, I see some
> issues.
> 
> 1.  Apps that use random numbers typically must link to -lrt,
>     for a very small benefit (nanosecond resolution rather than
>     microsecond resolution time stamp for random seed).  Often
>     this "benefit" is illusory as the time stamps really are not
>     nanosecond resolution.
> 
> 2.  If /dev/urandom is available, it should be used to seed
>     the ISAAC generator.  This will cost more than invoking
>     gettimeofday() but it's far more random.
> 
> 3.  We could get about 2X CPU performance on 64-bit machines by using
>     ISAAC64 instead of ISAAC.
> 
> The patch below implements (1); I haven't installed it.  I'd like to
> do (2) and (3) too, but thought I'd ask for feedback first.

All changes make sense.

`shred` doesn't need the entropy anyway as it's just
scribbling random data to make it more difficult
to recover data, and to hide its tracks.
Performance wise `shred` probably won't run faster as
it should saturate any disk, but using less CPU is good:

`sort -R` and `shuf` should benefit also.

thanks,
Pádraig.



Reply via email to