[fpc-pascal] quality of FPC random

Xiangrong Fang xrfang at gmail.com
Fri Aug 14 16:27:28 CEST 2015

2015-08-14 21:47 GMT+08:00 Jonas Maebe <jonas.maebe at elis.ugent.be>:

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

​Well, practically, how can I get totally unpredictable numbers? On
stackoverflow, someone suggested using hash value of data as IV, but that's
still flawed somehow.

Without introduce hardware source like a dongle or other devices (which is
not acceptable for my purpose), I suppose good quality PRNGs​ are the only
thing that I can use?

​Also, why FPC random number are not comparable to /dev/urandom?  Despite
the difference in their quality and speed (if any), what's the difference
between them? especially, what are the typical use cases of these 2 PRNGs
when they are designed?​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20150814/b814fa95/attachment.html>

More information about the fpc-pascal mailing list