Help wanted with md2 hash algorithm

Tom Anderson twic at urchin.earth.li
Sat Jan 7 21:50:02 EST 2006


On Fri, 6 Jan 2006 wjb131 at web.de wrote:

> below you find my simple python version of MD2 algorithm
> as described in RFC1319  (http://rfc1319.x42.com/MD2).
> It produces correct results for strings shorter than 16 Bytes and wrong
> results for longer strings.
>
> I can't find what's wrong.
>
> Can anybody help?

Okay, i've reimplemented the code from scratch, based on the RFC, without 
even looking at your code, as a basis for comparison.

The trouble is, i get exactly the same results as you!

Here's mine:

http://urchin.earth.li/~twic/md2.py

I guess the thing to do is extract the C code from the RFC and compile it, 
verify that it works, then stick loads of print statements in the C and 
the python, to see where the states of the checksum engines diverge.

tom

-- 
Death to all vowels! The Ministry of Truth says vowels are plus
undoublethink. Vowels are a Eurasian plot! Big Brother, leading us proles
to victory!



More information about the Python-list mailing list