summaryrefslogtreecommitdiff
path: root/crypto/arm_arch.h
diff options
context:
space:
mode:
authorfangming.fang <fangming.fang@arm.com>2021-12-24 08:29:04 +0000
committerTomas Mraz <tomas@openssl.org>2022-01-14 11:40:05 +0100
commit71396cd048072b69559b46d98cfebfd4474cd712 (patch)
tree3b29b3ce3f469473600816c6fdabf79e858ce91b /crypto/arm_arch.h
parent79704a88eb5aa70fa506e3e59a29fcda21f428af (diff)
downloadopenssl-new-71396cd048072b69559b46d98cfebfd4474cd712.tar.gz
SM3 acceleration with SM3 hardware instruction on aarch64
SM3 hardware instruction is optional feature of crypto extension for aarch64. This implementation accelerates SM3 via SM3 instructions. For the platform not supporting SM3 instruction, the original C implementation still works. Thanks to AliBaba for testing and reporting the following perf numbers for Yitian710: Benchmark on T-Head Yitian-710 2.75GHz: Before: type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes sm3 49297.82k 121062.63k 223106.05k 283371.52k 307574.10k 309400.92k After (33% - 74% faster): type 16 bytes 64 bytes 256 bytes 1024 bytes 8192 bytes 16384 bytes sm3 65640.01k 179121.79k 359854.59k 481448.96k 534055.59k 538274.47k Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17454)
Diffstat (limited to 'crypto/arm_arch.h')
-rw-r--r--crypto/arm_arch.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/arm_arch.h b/crypto/arm_arch.h
index 848f06542c..77173cae42 100644
--- a/crypto/arm_arch.h
+++ b/crypto/arm_arch.h
@@ -79,6 +79,7 @@ extern unsigned int OPENSSL_armv8_rsa_neonized;
# define ARMV8_SHA512 (1<<6)
# define ARMV8_CPUID (1<<7)
# define ARMV8_RNG (1<<8)
+# define ARMV8_SM3 (1<<9)
/*
* MIDR_EL1 system register