I know PHP's mt_rand()
should not be used for security purposes as its results are not cryptographically strong. Yet a lot of PHP code does just that, or uses it as a fallback if better sources of randomness are not available.
So how bad is it? What sources of randomness does mt_rand
use for seeding? And are there other security problems with mt_rand
for cryptographic applications?