Re:PCG, A Family of Better Random Number Generators
by danieltillett on Wednesday July 15, 2015 @04:12AM
(#9890257)
The reason why is crypto RNG are much slower than something less secure. It really depends on the application, but in the code I wrote today a significant fraction of my application’s time was spent in the RNG function. By replacing the RNG I managed to speed up my code by a bit over 2 fold. I am not doing crypto work so this is great.
Re:PCG, A Family of Better Random Number Generators
by daurnimator on Wednesday July 15, 2015 @09:56PM
(#9895136)
ChaCha is fast. very fast.
see just below: https://news.ycombinator.com/item?id=9890599
I'm not sure why they marked it as "fairly slow" in the table in the OP.
Re:PCG, A Family of Better Random Number Generators
by danieltillett on Thursday July 16, 2015 @09:20AM
(#9896953)
Fast and slow are all relative - ChaCha is relatively fast but PGC is faster.
Re:PCG, A Family of Better Random Number Generators
by ars on Wednesday July 15, 2015 @04:19AM
(#9890270)
> Why not? It's perfectly valid to use a secure RNG for non-secure purposes.
It's much slower. Yes, in your application it was a fraction, but they are still much slower than non-secure RNG's.
Re:PCG, A Family of Better Random Number Generators
by eterm on Wednesday July 15, 2015 @04:23AM
(#9890283)
One of the benefits of a PRNG is reproducibility. If you are doing a monte carlo simulation, then you can get good results while still starting runs from predictable seeds. (e.g. [0,1,2,3,4,...])
This gives you both good quality random numbers during the simulation run yet lets others reproduce your results and expand with more results if required.
Why not? It's perfectly valid to use a secure RNG for non-secure purposes.
As I mentioned, I've used ChaCha20 for those sort of purposes too. And the random number generation barely shows up as a fraction of the runtime.
i.e. improving 1% of the runtime by 99% isn't worth the overhead of having more than one random number generator.