note 53912 added to function.md5
| From: | tommiboy at osu1 dot php dot net | Date: | Thu, 16 Jun 2005 15:33:55 +0000 |
| Subject: | note 53912 added to function.md5 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-90550@lists.php.net to get a copy of this message | ||
Thomas Holz:
Awesome idea. This is simplicity itself. I love it :-)
mina86:
"there are more then 2^128 strings of maximum length of 128 bits"
Humm... you almost got me there, but this is not true. MD5 input length is congruent to 448 modulo
512, padded with zero bits.
Therefore, any message less than 448 bits is just a binary number of length 448 (with some zeros). A
128 bits message generates a block of 448 bits with 320 zero-bits, anything less will just have more
zero bits, so there is really no such thing as "less than length".
Your objection is right, however, if you explicitely save the message's length, too (MD5 does
not).
----
Manual Page -- http://www.php.net/manual/en/function.md5.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53912
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53912&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53912&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53912&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53912&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+53912&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53912&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53912&report=yes
Search -- http://master.php.net/manage/user-notes.php