[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] use libcrypto routines in gnulib

From: Niels Möller
Subject: Re: [PATCH] use libcrypto routines in gnulib
Date: Tue, 03 Dec 2013 17:57:40 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (usg-unix-v)

address@hidden (Ludovic Courtès) writes:

> Pádraig Brady <address@hidden> skribis:
>> The speed of md5 and sha* hashes has lagged a bit in gnulib.
>> So to address that and to take advantage of the architecture
>> specific assembly used in libcrypto, the attached gnulib patch
>> allows projects to configure --with-openssl to use that if
>> available or fall back to the existing internal routines.
> Any idea how libcrypto compares to what libgcrypt and Nettle provide?

I' afraid openssl/libcrypto is a bit faster than nettle on sha1 and md5.
Current benchmark (on my office machine, intel core i5, 3.4 GHz):

         Algorithm        mode Mbyte/s
               md2      update    8.32
               md4      update  854.80
               md5      update  577.86
       openssl md5      update  721.54
              sha1      update  548.50
      openssl sha1      update  775.10
            sha224      update  270.92
            sha256      update  271.31
            sha384      update  436.46
            sha512      update  437.23
          sha3_224      update  293.78
          sha3_256      update  275.69
          sha3_384      update  211.33
          sha3_512      update  146.43

I haven't paid much attention to x86_64 assembly for sha1 and md5 (there
is x86_64 assembly for sha1, which is a direct translation of an earlier
version of the x86 assembly, and there's no md5-assembly at all for

It's faster then openssl for some other algorithms. For use in
coreutils, I really think the minimalistic api in nettle should be easy
to use.

/Niels (nettle maintainer)

Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]