Add SSSE3 optimized non-parallel ChaCha20 function
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Sun, 27 Jan 2019 09:19:56 +0000 (11:19 +0200)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Sun, 27 Jan 2019 09:19:56 +0000 (11:19 +0200)
commit7d9b2f114f3edf4d13640616cf34c79364234781
tree77dc6bd6f1f8ac5f6d3ca37b0f005527621cafb7
parent88e482d16ee80de41b6f133e77f0d15423fcd266
Add SSSE3 optimized non-parallel ChaCha20 function

* cipher/chacha20-amd64-ssse3.S (ROTATE_SHUF, ROTATE, WORD_SHUF)
(QUARTERROUND4, _gcry_chacha20_amd64_ssse3_blocks1): New.
* cipher/chacha20.c (_gcry_chacha20_amd64_ssse3_blocks1): New
prototype.
(chacha20_blocks): Rename to ...
(do_chacha20_blocks): ... this.
(chacha20_blocks): New.
(chacha20_encrypt_stream): Adjust for new chacha20_blocks function.
--

This patch provides SSSE3 optimized version of non-parallel
ChaCha20 core block function. On Intel Haswell generic C function
runs at 6.9 cycles/byte. New function runs at 5.2 cycles/byte, thus
being ~32% faster.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
cipher/chacha20-amd64-ssse3.S
cipher/chacha20.c