openssl/include/crypto
Daniel Hu 4908787f21 SM4 optimization for ARM by ASIMD
This patch optimizes SM4 for ARM processor using ASIMD instruction

It will improve performance if both of following conditions are met:
1) Input data equal to or more than 4 blocks
2) Cipher mode allows parallelism, including ECB,CTR,GCM or CBC decryption

This patch implements SM4 SBOX lookup in vector registers, with the
benefit of constant processing time over existing C implementation.

It is only enabled for micro-architecture N1/V1. In the ideal scenario,
performance can reach up to 2.7X

When either of above two conditions is not met, e.g. single block input
or CFB/OFB mode, CBC encryption, performance could drop about 50%.

The assembly code has been reviewed internally by ARM engineer
Fangming.Fang@arm.com

Signed-off-by: Daniel Hu <Daniel.Hu@arm.com>

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17951)
2022-04-12 10:37:42 +02:00
..
__DECC_INCLUDE_EPILOGUE.H
__DECC_INCLUDE_PROLOGUE.H
aes_platform.h Fixed counter overflow 2022-02-07 11:29:18 +11:00
aria.h
asn1_dsa.h
asn1.h Add tests for do_updatedb 2022-02-14 10:18:46 +01:00
asn1err.h
async.h
asyncerr.h
bioerr.h
bn_conf.h.in
bn_dh.h
bn_srp.h
bn.h
bnerr.h
buffererr.h
chacha.h
cmll_platform.h Split bignum code out of the sparcv9cap.c 2021-07-15 09:33:04 +02:00
cmperr.h
cmserr.h CMS sign digest 2022-04-02 10:42:16 -04:00
comperr.h
conferr.h
context.h Refactor OSSL_LIB_CTX to avoid using CRYPTO_EX_DATA 2022-04-01 10:49:19 +11:00
crmferr.h
cryptlib.h
cryptoerr.h err: add additional errors 2022-01-12 20:10:21 +11:00
cterr.h
ctype.h
decoder.h
decodererr.h
des_platform.h Split bignum code out of the sparcv9cap.c 2021-07-15 09:33:04 +02:00
dh.h Fix EVP todata and fromdata when used with selection of EVP_PKEY_PUBLIC_KEY. 2022-02-03 13:48:42 +01:00
dherr.h
dsa.h Fix EVP todata and fromdata when used with selection of EVP_PKEY_PUBLIC_KEY. 2022-02-03 13:48:42 +01:00
dsaerr.h
dso_conf.h.in
ec.h fips module header inclusion fine-tunning 2021-07-06 10:52:27 +10:00
ecerr.h
ecx.h fips module header inclusion fine-tunning 2021-07-06 10:52:27 +10:00
encoder.h
encodererr.h
engine.h
engineerr.h
err.h
ess.h
esserr.h
evp.h EVP_MD performance fix (refcount cache contention) 2022-03-13 11:43:26 +11:00
evperr.h
httperr.h
lhash.h
md32_common.h Add define guards to avoid multi-inclusion 2022-02-16 16:11:56 +01:00
modes.h AES-GCM enabled with AVX512 vAES and vPCLMULQDQ. 2022-02-10 15:10:12 +01:00
objects.h
objectserr.h
ocsperr.h
pem.h Fix copyrights 2022-02-03 13:56:38 +01:00
pemerr.h
pkcs7.h
pkcs7err.h
pkcs12err.h
poly1305.h
ppc_arch.h chacha20 performance optimizations for ppc64le with 8x lanes, 2022-02-22 16:58:55 +11:00
punycode.h punycode: fix indentation 2021-06-19 15:54:06 +10:00
rand_pool.h
rand.h MacOS prior to 10.12 does not support random API correctly 2021-09-14 14:50:39 +02:00
randerr.h
rsa.h Fix EVP todata and fromdata when used with selection of EVP_PKEY_PUBLIC_KEY. 2022-02-03 13:48:42 +01:00
rsaerr.h
security_bits.h
sha.h
siphash.h
siv.h
sm2.h Correctly calculate the length of SM2 plaintext given the ciphertext 2021-08-24 14:22:07 +01:00
sm2err.h
sm4_platform.h SM4 optimization for ARM by ASIMD 2022-04-12 10:37:42 +02:00
sm4.h
sparc_arch.h Split bignum code out of the sparcv9cap.c 2021-07-15 09:33:04 +02:00
sparse_array.h
store.h
storeerr.h
tserr.h
types.h
uierr.h
x509.h cpp: fix included files to avoid failure in no-deprecated builds 2021-08-25 10:47:21 +10:00
x509err.h
x509v3err.h