[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $RANDOM not Cryptographically secure pseudorandom number generator
From: |
Chet Ramey |
Subject: |
Re: $RANDOM not Cryptographically secure pseudorandom number generator |
Date: |
Sun, 6 Jan 2019 18:06:57 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.3.3 |
On 1/5/19 3:12 PM, Eduardo A. Bustamante López wrote:
> On Fri, Dec 28, 2018 at 10:24:50AM +0100, Ole Tange wrote:
> (...)
>> Patch attached.
>>
>> It is basically a copy of the code snippet from Wikipedia with a few
>> trivial wrappers.
>>
>> Apart from using Salsa20 the biggest change is that you can now seed
>> RANDOM with a string.
>
> Nice!
>
> I applied the Salsa20 RNG patch (slightly modified due to the recent changes
> in
> variables.c, attached [1]) to the tip of `devel`
> (89b3a79dd4643f210f8443856214d558572733a5) and ran a couple of tests, to
> answer
> the following questions:
>
> - Does the new RNG generate uniformly distributed numbers? (Yes)
> - What is the performance impact (roughly 2X slower)
> - Does it break any existing tests? (Yes, easy to fix)
What's the period of the resulting RNG? That's the chief complaint with
the existing implementation.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/