SHA-1: Add SSSE3 implementation
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Fri, 13 Dec 2013 10:47:56 +0000 (12:47 +0200)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Fri, 13 Dec 2013 14:19:47 +0000 (16:19 +0200)
commitbe2238f68abcc6f2b4e8c38ad9141376ce622a22
treeedaebed2ef0f6c4bc7c8d7a0fd8a603356259dc0
parent04615cc6803cdede25fa92e3ff697e252a23cd7a
SHA-1: Add SSSE3 implementation

* cipher/Makefile.am: Add 'sha1-ssse3-amd64.c'.
* cipher/sha1-ssse3-amd64.c: New.
* cipher/sha1.c (USE_SSSE3): New.
(SHA1_CONTEXT) [USE_SSSE3]: Add 'use_ssse3'.
(sha1_init) [USE_SSSE3]: Initialize 'use_ssse3'.
(transform): Rename to...
(_transform): this.
(transform): New.
* configure.ac [host=x86_64]: Add 'sha1-ssse3-amd64.lo'.
--

Patch adds SSSE3 implementation based on white paper "Improving the Performance
of the Secure Hash Algorithm (SHA-1)" at
 http://software.intel.com/en-us/articles/improving-the-performance-of-the-secure-hash-algorithm-1

Benchmarks:

cpu                Old        New        Diff
Intel i5-4570      9.02 c/B   5.22 c/B   1.72x
Intel i5-2450M     12.27 c/B  7.24 c/B   1.69x
Intel Core2 T8100  7.94 c/B   6.76 c/B   1.17x

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
cipher/Makefile.am
cipher/sha1-ssse3-amd64.c [new file with mode: 0644]
cipher/sha1.c
configure.ac