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).


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to