Re: MD5, SHA-1, RIPEMD, etc.
Thomas Koenig wrote:
> Using the reference you provided, I got around three Megabytes/ CPU
> second on a P133 with RIPEMD-160 (using pgcc -O6, I confess :-) How
> fast is SHA-1 in comprarison?
The RIPEMD folks have been carefully tweaking Pentium hashing times.
A speed chart is available at http://www.esat.kuleuven.ac.be/~bosselae/
Here are their results on a P90:
Hash functions Size (bytes) Cycles Mbit/sec Mbyte/sec
MD4 1186 241 191.2 23.90
MD5 1719 345 133.6 16.70
RIPEMD 2291 485 95.0 11.88
RIPEMD-128 2941 597 77.2 9.65
SHA-1 4079 837 55.1 6.88
RIPEMD-160 4801 1016 45.4 5.67
Block ciphers Cycles Mbit/sec Mbyte/sec
DES 351 16.4 2.05
DES key setup 686 7.3 0.91
IDEA 590 9.76 1.22
Square 324 35.56 4.45
Table 1: Performance of my assembly language implementations of some
cryptographic algorithms on a 90 MHz Pentium using a 32-bit flat memory
Due to the register limitations of the x86 architecture (you only have
7 registers), 160-bit hashes (with 5 active variables) suffer some
extreme regsiter pressure, making it hard to schedule the code optimally.
There are two ways to do SHA-1: with the "key scheduling" in a separate
pre-pass, and integrated with the rounds. Which is better depends on
a lot of things, including how many registers you have. (With enough,
you can just load the entire input block into 16 registers and not
worry about anything else.) I don't know which is used above.
If you want bigger hashes, you can always look at HAVAL (256 bits)...
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to firstname.lastname@example.org .