openssl/include/crypto
Christoph Müllner 86c69fe841 riscv: Clean up extension test macros
In RISC-V we have multiple extensions, that can be
used to accelerate processing.
The known extensions are defined in riscv_arch.def.
From that file test functions of the following
form are generated: RISCV_HAS_$ext().

In recent commits new ways to define the availability
of these test macros have been defined. E.g.:
  #define RV32I_ZKND_ZKNE_CAPABLE   \
          (RISCV_HAS_ZKND() && RISCV_HAS_ZKNE())
  [...]
  #define RV64I_ZKND_ZKNE_CAPABLE   \
          (RISCV_HAS_ZKND() && RISCV_HAS_ZKNE())

This leaves us with two different APIs to test capabilities.
Further, creating the same macros for RV32 and RV64 results
in duplicated code (see example above).

This inconsistent situation makes it hard to integrate
further code. So let's clean this up with the following steps:
* Replace RV32I_* and RV64I_* macros by RICSV_HAS_* macros
* Move all test macros into riscv_arch.h
* Use "AND" and "OR" to combine tests with more than one extension
* Rename include files for accelerated processing (remove extension
  postfix).

We end up with compile time tests for RV32/RV64 and run-time tests
for available extensions. Adding new routines (e.g. for vector crypto
instructions) should be straightforward.

Testing showed no regressions.

Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20078)
2023-03-16 13:12:19 +11:00
..
__DECC_INCLUDE_EPILOGUE.H
__DECC_INCLUDE_PROLOGUE.H
aes_platform.h riscv: Clean up extension test macros 2023-03-16 13:12:19 +11:00
aria.h
asn1_dsa.h
asn1.h libcrypto and test: rename asn1_string_to_time_t to ossl_asn1_string_to_time_t 2022-07-19 08:44:19 +02:00
asn1err.h
async.h
asyncerr.h
bioerr.h BIO_dgram support for BIO_sendmmsg/BIO_recvmmsg 2022-09-01 18:03:10 +10:00
bn_conf.h.in
bn_dh.h
bn_srp.h
bn.h S390x: Support ME and CRT offloading 2023-02-08 16:53:12 +01:00
bnerr.h RSA keygen update: Raise an error if no prime candidate q is found. 2022-06-13 10:56:31 +02:00
buffererr.h
chacha.h
cmll_platform.h
cmperr.h CMP+CRMF: fix formatting nits in crypto/, include/, and test/ 2022-11-24 13:45:06 +01:00
cmserr.h CMS sign digest 2022-04-02 10:42:16 -04:00
comperr.h
conferr.h
context.h Release the drbg in the global default context before engines 2022-11-02 11:01:20 +01:00
crmferr.h
cryptlib.h
cryptoerr.h
cterr.h
ctype.h tolower: refine the tolower code to avoid a memory access 2022-05-23 09:51:28 +10:00
decoder.h Remove the _fetch_by_number functions 2022-05-06 10:38:55 +10:00
decodererr.h
des_platform.h
dh.h Update copyright year 2022-05-03 13:34:51 +01:00
dherr.h Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
dsa.h Implement deterministic ECDSA sign (RFC6979) 2022-11-30 07:31:53 +00:00
dsaerr.h Fix infinite loops in DSA sign code. 2023-03-01 09:20:49 +11:00
dso_conf.h.in
ec.h Implement deterministic ECDSA sign (RFC6979) 2022-11-30 07:31:53 +00:00
ecerr.h Fix potential infinite loops in ECDSA signing. 2023-03-01 09:20:49 +11:00
ecx.h Support all five EdDSA instances from RFC 8032 2023-01-13 07:09:09 +00:00
encoder.h Remove the _fetch_by_number functions 2022-05-06 10:38:55 +10:00
encodererr.h
engine.h
engineerr.h
err.h
ess.h
esserr.h
evp.h Add a flag so finalised contexts are not reused 2023-03-15 08:42:59 +11:00
evperr.h
httperr.h
lhash.h
md32_common.h Add ROTATE inline asm support for SM3 2022-06-22 12:46:50 +02:00
modes.h providers: Add SM4 XTS implementation 2022-11-29 16:17:30 +01:00
objects.h
objectserr.h
ocsperr.h
pem.h
pemerr.h
pkcs7.h
pkcs7err.h
pkcs12err.h Allow PKCS12 export to set arbitrary bag attributes 2022-09-23 17:40:02 +01:00
poly1305.h
ppc_arch.h Update copyright year 2022-05-03 13:34:51 +01:00
punycode.h Add more punycode tests and remove ossl_a2ucompare() 2023-02-08 16:17:37 +01:00
rand_pool.h
rand.h Pre-declare all core dispatch table functions, and fix the internal ones 2022-07-13 07:56:51 +02:00
randerr.h
riscv_arch.def Add riscv scalar crypto extension capability 2022-06-10 11:45:41 +02:00
riscv_arch.h riscv: Clean up extension test macros 2023-03-16 13:12:19 +11:00
rsa.h Remove ossl_rsa_pss_params_30_set_maskgenalg(). 2023-03-01 20:04:10 +11:00
rsaerr.h
security_bits.h
sha.h
siphash.h
siv.h
sm2.h
sm2err.h
sm4_platform.h SM4 AESE optimization for ARMv8 2023-02-02 10:16:47 +11:00
sm4.h
sparc_arch.h
sparse_array.h
store.h Add method store cache flush and method removal to non-EVP operations 2022-05-05 15:06:12 +02:00
storeerr.h
tserr.h
types.h Internaly declare the DSA type for no-deprecated builds 2023-02-08 08:50:31 +01:00
uierr.h
x509.h Do not create DSA keys without parameters by decoder 2023-02-07 17:05:10 +01:00
x509err.h x509_att.c: improve error checking and reporting and coding style 2022-08-24 11:25:04 +02:00
x509v3err.h