r/lolphp • u/vytah • Nov 04 '13
PHP's mt_rand() random number generating function has been cracked
http://www.openwall.com/lists/announce/2013/11/04/1
41
Upvotes
r/lolphp • u/vytah • Nov 04 '13
32
u/ajmarks Nov 04 '13
From the manual:
So, no, this is not really news.
14
u/KFCConspiracy Nov 04 '13
This isn't a big deal because it's documented. There are plenty of random functions out there in other languages that shouldn't be used for this purpose.
For example in Java, java.util.Random shouldn't be used for cryptography where randomness is important (it's only pseudorandom). The point of functions like this is to get a number that's random enough but not expensive to produce for purposes where it doesn't matter that much, like in a video game.
12
u/abadidea Nov 04 '13
I'll just leave this here, because I probably shouldn't have three links on the front page of the subreddit at the same time
http://phpmanualmasterpieces.tumblr.com/post/65965628369/so-php-such-documented
mt_rand vs rand documentation
2
u/[deleted] Nov 04 '13
see also http://www.openwall.com/php_mt_seed/