2015-08-14 21:47 GMT+08:00 Jonas Maebe <jonas.ma...@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?​
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to