Performance tuning for the XO

C. Scott Ananian cscott at laptop.org
Sat Sep 22 13:31:50 EDT 2007


On 9/22/07, Mitch Bradley <wmb at laptop.org> wrote:
> Some timing for libtomcrypt with various compilation options.  All times
> are for hashing 1MiB of data from memory, timed under Open Firmware with
> interrupts disabled.
[...]
> So, with this code, the slow version does sha256 at about 4 MiB/sec, the
> fast version does sha256 at about 5.3 MiB/sec, and rm160 goes at 9
> MiB/sec in all cases.

Hmm.  I did browse through all the SHA256 implementations I could
find, looking at libtomcrypt, libgcrypt, and openssl in particular.
Most of what I've seen has followed the definitions in the SHA
standard pretty closely; unrolling the loops seems to be the only
common "optimization".  Assuming you were starting from portable C
code, it seems that compiler quality had the most effect, which made
me realize that I don't actually know the appropriate machine type to
pass the the GCC optimizer, prompting my original post.

Some more SHA256 implementations I found which claim to be optimized:
   http://www.ouah.org/ogay/sha2/
   http://fp.gladman.plus.com/cryptography_technology/sha/index.htm

I'd gladly accept a volunteer to go through and benchmark different
implementations on XO hardware.  From my initial investigations, it
seems like we should use RIPEMD-160 for bulk hashing of filesystem
data.  There were some recent cryptoanalytic results against RIPEMD,
however; I need to go off and reread them to get a sense for its
current level of security.
 --scott

-- 
                         ( http://cscott.net/ )



More information about the Devel mailing list