[Top][All Lists]

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

Re: [PATCH] use libcrypto routines in gnulib

From: Pádraig Brady
Subject: Re: [PATCH] use libcrypto routines in gnulib
Date: Tue, 03 Dec 2013 17:08:32 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 12/03/2013 04:57 PM, Niels Möller wrote:
> 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
> x86_64).
> 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.
> Regards,
> /Niels (nettle maintainer)

Thanks for the info.
That aligns also with my quick testing.
Now it should be fairly easy to map the gnulib interface
to the nettle one, so we might in future provide a --with-nettle
option to gnulib similar to the current --with-openssl


reply via email to

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