Home GnuPG

Add SM3 ARMv8/AArch64/CE assembly implementation

Description

Add SM3 ARMv8/AArch64/CE assembly implementation

* cipher/Makefile.am: Add 'sm3-armv8-aarch64-ce.S'.
* cipher/sm3-armv8-aarch64-ce.S: New.
* cipher/sm3.c (USE_ARM_CE): New.
[USE_ARM_CE] (_gcry_sm3_transform_armv8_ce)
(do_sm3_transform_armv8_ce): New.
(sm3_init) [USE_ARM_CE]: New.
* configure.ac: Add 'sm3-armv8-aarch64-ce.lo'.

Benchmark on T-Head Yitian-710 2.75 GHz:

Before:

|  nanosecs/byte   mebibytes/sec   cycles/byte  auto Mhz

SM3 | 2.84 ns/B 335.3 MiB/s 7.82 c/B 2749

After (~55% faster):

|  nanosecs/byte   mebibytes/sec   cycles/byte  auto Mhz

SM3 | 1.84 ns/B 518.1 MiB/s 5.06 c/B 2749

  • Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>

Details

Provenance
Tianjia Zhang <tianjia.zhang@linux.alibaba.com>Authored on Apr 1 2022, 11:17 AM
jukiviliCommitted on Apr 4 2022, 5:49 PM
Parents
rC29bfb3ebbc63: hwf-ppc: fix missing HWF_PPC_ARCH_3_10 in HW feature
Branches
Unknown
Tags
Unknown