On Fri, 5 Apr 2019 20:04:28 +0200
Mattias Rönnblom <mattias.ronnb...@ericsson.com> wrote:

> On 2019-04-05 18:57, Stephen Hemminger wrote:
> > 
> > rand48 is a terrible PRNG, why not use something better?
> > 
> > Similar discussion in Linux kernel pointed at:
> > http://www.pcg-random.org/posts/some-prng-implementations.html
> > 
> > Mail thread here:
> > https://www.spinics.net/lists/netdev/msg560231.html
> >   
> 
> DPDK was already using lrand48(), I primarily wanted to address 
> lrand48()'s lack of MT safety, nothing else.
> 
> That said, maybe the easiest way to maintain the current API, provide MT 
> safety and have something portable is for DPDK to carry its own random 
> number generator, instead of relying on libc.
> 
> Maybe an ARC4 port from BSD? But instead of pulling entropy from the 
> kernel, let the user give the seed, like the current DPDK APIs permit.
> 
> You could deprecate rte_srand(), but I would vote against such a move, 
> because its sometimes useful to able to have something that is "random", 
> yet reproducible.

Read the discussion link about ARC4. http://www.pcg-random.org/

        As a general-purpose PRNG, it is rather slow, and it is also slow by
        the standards of modern cryptographic PRNGs and is also considered too
        weak to use for cryptographic purposes. It is, however, of historical
        interest and can be useful in testing to see how sensitive a algorithms
        are to PRNG speed.

Using ARC4 replaces a one legacy one with another.




Reply via email to