Home GnuPG

chacha20: add ARMv7/NEON implementation
c584f4454388Unpublished

Unpublished Commit ยท Learn More

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

Description

chacha20: add ARMv7/NEON implementation

* cipher/Makefile.am: Add 'chacha20-armv7-neon.S'.
* cipher/chacha20-armv7-neon.S: New.
* cipher/chacha20.c (USE_NEON): New.
[USE_NEON] (_gcry_chacha20_armv7_neon_blocks): New.
(chacha20_do_setkey) [USE_NEON]: Use Neon implementation if
HWF_ARM_NEON flag set.
(selftest): Self-test encrypting buffer byte by byte.
* configure.ac [neonsupport=yes]: Add 'chacha20-armv7-neon.lo'.

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

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

Old:
CHACHA20 | nanosecs/byte mebibytes/sec cycles/byte

STREAM enc |     13.45 ns/B     70.92 MiB/s     13.56 c/B
STREAM dec |     13.45 ns/B     70.90 MiB/s     13.56 c/B

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

STREAM enc |      6.20 ns/B     153.9 MiB/s      6.25 c/B
STREAM dec |      6.20 ns/B     153.9 MiB/s      6.25 c/B
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Aug 6 2014, 7:05 PM
Parents
rC669a83ba86c3: Register DCO for Markus Teich
Branches
Unknown
Tags
Unknown

Event Timeline

Jussi Kivilinna <jussi.kivilinna@iki.fi> committed rCc584f4454388: chacha20: add ARMv7/NEON implementation (authored by Jussi Kivilinna <jussi.kivilinna@iki.fi>).Nov 2 2014, 3:00 PM