[fpc-pascal] quality of FPC random
jonas.maebe at elis.ugent.be
Fri Aug 14 15:47:16 CEST 2015
Xiangrong Fang wrote on Fri, 14 Aug 2015:
> I need to generate random numbers to be used as IV of block ciphers. My
> question is: is FPC built-in PRNG good enough as comparing to /dev/urandom?
No PRNG is suited for that purpose, because every PRNG is by
definition predictable and you need unpredictable numbers for IVs.
> On the other hand, /dev/urandom in my impression is fairly slow, how is the
> speed of Random() comparing to that?
They are not comparable, they serve completely different purposes.
Additionally, the speed of /dev/urandom depends on a lot of factors
(it gets its input from various kinds of activity on the system, so
the more activity there is, the faster it becomes).
More information about the fpc-pascal