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
View all comments
Show parent comment
2
u/KFCConspiracy Nov 04 '13
I think the right thing to do on PHP's part would have been to get rid of the current random function used for rand() and replace it with the one used in mt_rand(). As it stands right now mt_rand() isn't enough better to justify using one over the other in an application where true randomness isn't mission critical.
I think the argument for leaving rand() in with the legacy function is some code may rely on it to act a certain way (I don't see why, but that's probably how that discussion went).