Home GnuPG

Add ARM/NEON implementation of Poly1305
0b5201285510Unpublished

Unpublished Commit ยท Learn More

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

Description

Add ARM/NEON implementation of Poly1305

* cipher/Makefile.am: Add 'poly1305-armv7-neon.S'.
* cipher/poly1305-armv7-neon.S: New.
* cipher/poly1305-internal.h (POLY1305_USE_NEON)
(POLY1305_NEON_BLOCKSIZE, POLY1305_NEON_STATESIZE)
(POLY1305_NEON_ALIGNMENT): New.
* cipher/poly1305.c [POLY1305_USE_NEON]
(_gcry_poly1305_armv7_neon_init_ext)
(_gcry_poly1305_armv7_neon_finish_ext)
(_gcry_poly1305_armv7_neon_blocks, poly1305_armv7_neon_ops): New.
(_gcry_poly1305_init) [POLY1305_USE_NEON]: Select NEON implementation
if HWF_ARM_NEON set.
* configure.ac [neonsupport=yes]: Add 'poly1305-armv7-neon.lo'.

Add Andrew Moon's public domain NEON implementation of Poly1305. Original
source is available at: https://github.com/floodyberry/poly1305-opt

Benchmark on Cortex-A8 (--cpu-mhz 1008):

Old:

|  nanosecs/byte   mebibytes/sec   cycles/byte

POLY1305 | 12.34 ns/B 77.27 MiB/s 12.44 c/B

New:

|  nanosecs/byte   mebibytes/sec   cycles/byte

POLY1305 | 2.12 ns/B 450.7 MiB/s 2.13 c/B

  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Nov 2 2014, 3:01 PM
Parents
rCc584f4454388: chacha20: add ARMv7/NEON implementation
Branches
Unknown
Tags
Unknown

Event Timeline

Jussi Kivilinna <jussi.kivilinna@iki.fi> committed rC0b5201285510: Add ARM/NEON implementation of Poly1305 (authored by Jussi Kivilinna <jussi.kivilinna@iki.fi>).Nov 2 2014, 3:26 PM