Home GnuPG

Add SM4 ARMv9 SVE CE assembly implementation

Description

Add SM4 ARMv9 SVE CE assembly implementation

* cipher/Makefile.am: Add 'sm4-armv9-aarch64-sve-ce.S'.
* cipher/sm4-armv9-aarch64-sve-ce.S: New.
* cipher/sm4.c (USE_ARM_SVE_CE): New.
(SM4_context) [USE_ARM_SVE_CE]: Add 'use_arm_sve_ce'.
(_gcry_sm4_armv9_sve_ce_crypt, _gcry_sm4_armv9_sve_ce_ctr_enc)
(_gcry_sm4_armv9_sve_ce_cbc_dec, _gcry_sm4_armv9_sve_ce_cfb_dec)
(sm4_armv9_sve_ce_crypt_blk1_16): New.
(sm4_setkey): Enable ARMv9 SVE CE if supported by HW.
(sm4_get_crypt_blk1_16_fn) [USE_ARM_SVE_CE]: Add ARMv9 SVE CE
bulk functions.
(_gcry_sm4_ctr_enc, _gcry_sm4_cbc_dec, _gcry_sm4_cfb_dec)
[USE_ARM_SVE_CE]: Add ARMv9 SVE CE bulk functions.
* configure.ac: Add 'sm4-armv9-aarch64-sve-ce.lo'.
  • Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>

Details

Provenance
Tianjia Zhang <tianjia.zhang@linux.alibaba.com>Authored on Jul 21 2022, 8:32 AM
jukiviliCommitted on Jul 21 2022, 9:54 AM
Parents
rCea5e71f9c8eb: Add ARMv9 SVE2 and optional Crypto Extension HW features
Branches
Unknown
Tags
Unknown