note 44688 added to function.mt-rand
| From: | timr at onlinehome dot de | Date: | Thu, 12 Aug 2004 23:24:35 +0000 |
| Subject: | note 44688 added to function.mt-rand | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-74567@lists.php.net to get a copy of this message | ||
The correct address of the inventor's FAQ is
(http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/efaq.html). They state that Mersenne Twister may be
used for cryptography if you do some post-processing:
"Mersenne Twister is not cryptographically secure. (MT is based on a linear recursion. Any
pseudorandom number sequence generated by a linear recursion is insecure, since from sufficiently
long subsequence of the outputs, one can predict the rest of the outputs.)
To make it secure, you need to use some Secure Hashing Algorithm with MT. For example, you may
gather every eight words of outputs, and compress them into one word (thus the length of the output
sequence is 1/8 of the original one)."
----
Manual Page -- http://www.php.net/manual/en/function.mt-rand.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44688
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44688&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44688&report=yes
Search -- http://master.php.net/manage/user-notes.php