[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#6658: [PATCH] randread: don't require -lrt
From: |
Pádraig Brady |
Subject: |
bug#6658: [PATCH] randread: don't require -lrt |
Date: |
Sat, 17 Jul 2010 02:19:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 |
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.