Home GnuPG

Add AMD64 assembly implementation for arcfour
7547898109c7Unpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Add AMD64 assembly implementation for arcfour

* cipher/Makefile.am: Add 'arcfour-amd64.S'.
* cipher/arcfour-amd64.S: New.
* cipher/arcfour.c (USE_AMD64_ASM): New.
[USE_AMD64_ASM] (ARCFOUR_context, _gcry_arcfour_amd64)
(encrypt_stream): New.
* configure.ac [host=x86_64]: Add 'arcfour-amd64.lo'.

Patch adds Marc Bevand's public-domain AMD64 assembly implementation of RC4 to
libgcrypt. Original implementation is at:

http://www.zorinaq.com/papers/rc4-amd64.html

Benchmarks on Intel i5-4570 (3200 Mhz):

New:
ARCFOUR | nanosecs/byte mebibytes/sec cycles/byte

STREAM enc |      1.29 ns/B     737.7 MiB/s      4.14 c/B
STREAM dec |      1.31 ns/B     730.6 MiB/s      4.18 c/B

Old (C-language):
ARCFOUR | nanosecs/byte mebibytes/sec cycles/byte

STREAM enc |      2.09 ns/B     457.4 MiB/s      6.67 c/B
STREAM dec |      2.09 ns/B     457.2 MiB/s      6.68 c/B
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Dec 30 2013, 2:10 PM
Parents
rCa05be441d8cd: Parse /proc/cpuinfo for ARM HW features
Branches
Unknown
Tags
Unknown

Event Timeline

Jussi Kivilinna <jussi.kivilinna@iki.fi> committed rC7547898109c7: Add AMD64 assembly implementation for arcfour (authored by Jussi Kivilinna <jussi.kivilinna@iki.fi>).Dec 30 2013, 2:10 PM