note 13199 deleted from function.md5 by jimw
| From: | jimw@php.net | Date: | Sat, 08 Dec 2001 20:02:02 +0000 |
| Subject: | note 13199 deleted from function.md5 by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22167@lists.php.net to get a copy of this message | ||
The time() function is not good for creating random numbers in secure environments. You can
somewhat rely on time() creating a *unique* number, but unique is different from random.
time()'s output can be predicted if the attacker knows the exact time at which the time()
function was used (obviously), and even the general vicinity of time may be good enough for
brute-forcing. Using (pseudo-)*random* numbers and MD5 hashes, one can gain a great deal more
security, if the application is security-sensitive, that is.
I apologize; this was slightly off-topic.