Hello Solar,

  thanks again for offering this. What we require is to have the PHP License
in the code. If you are fine with this we will gladly replace the existing
code with yours. You can of course put more header information in there to
stress out further that it is your code and where it can be found. The key
is that we indeed try to get rid of anything that is not under the PHP
License.

marcus

Sunday, December 9, 2007, 2:05:52 AM, you wrote:

> Hi,

> Attached is a quick patch for PHP 5.2.5 that replaces RSA's copyrighted
> implementation of MD5 with my public domain one:

>        
> http://cvsweb.openwall.com/cgi/cvsweb.cgi/Owl/packages/popa3d/popa3d/md5/

> This also results in faster and slightly smaller code (both source and
> binary).  On a Pentium 3 that I've tested this on, the speedup is 12%
> for the portable hashes as implemented in phpass:

>         http://www.openwall.com/phpass/

> Given that most CPU time is spent on various overhead of the PHP
> interpreter rather than on MD5 hashing itself (and gprof confirms this),
> the 12% speedup seen on the PHP script as a whole means that the speedup
> for the MD5 implementation alone is much higher than that.  The speedup
> should be similar on other little-endian CPUs (other x86 CPUs, x86-64,
> Alpha), but smaller on big-endian.

> The code can be made cleaner by taking my md5.[ch] files as they are and
> introducing two files more for PHP's added functions.  I did not do it
> for this patch in order for my changes to be less invasive.

> I also did not similarly replace the MD5 implementation in hash_md.c,
> which obviously will need to be done (once again, I'd prefer that
> separate md5.[ch] files are used - and perhaps only one instance of them
> included in the PHP distribution).

> I also wrote a similar public domain implementation of MD4, which I can
> provide for inclusion in hash_md.c if there's any interest.

> Finally, it'd be nice if PHP could optionally link against OpenSSL
> libcrypto to take advantage of the architecture-specific implementations
> of these hashes.  My implementations of MD5 and MD4 are function
> prototype compatible with OpenSSL's.

> I'd appreciate being CC'ed on any follow-ups as I am not on the list.

> Thanks,




Best regards,
 Marcus

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to