Re: untie the MD4 code from MD5
| From: | Dmitry Stogov | Date: | Thu, 07 Feb 2008 13:21:15 +0000 |
| Subject: | Re: untie the MD4 code from MD5 | ||
| References: | 1 2 3 4 5 6 7 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-35297@lists.php.net to get a copy of this message | ||
Thank you for fix.
I assume now the patch is ready to commit.
I'll commit it tomorrow in case of no objections.
Thanks. Dmitry.
Solar Designer wrote:
> I wrote:
>> OK, I think I found it. ext/hash/php_hash_md.h has this:
>>
>> #define PHP_MD4Init PHP_MD5Init
>>
>> which breaks when the two implementations are not that similar anymore.
>> Replacing the MD4 implementation with mine as well would fix this (or
>> hide the bug, depending on your point of view), but for now I think the
>> right fix would be to define a PHP_MD4Init() function explicitly.
>
> The patch is attached. It contains two other tiny changes:
>
> 1. Replaces two of MD4's basic functions with more optimal versions
> (faster and smaller code).
>
> 2. Corrects a typo in a nearby comment.
>
> This patch may be applied independently and before the MD5 replacement
> patch - but it is required for the MD5 replacement patch.
>
> Alexander