openssl/providers/implementations/ciphers
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
..
build.info Remove AES SIV ciphers from the FIPS provider 2023-03-01 18:35:01 +11:00
cipher_aes_cbc_hmac_sha1_hw.c Update copyright year 2021-06-17 13:24:59 +01:00
cipher_aes_cbc_hmac_sha256_hw.c Update copyright year 2021-06-17 13:24:59 +01:00
cipher_aes_cbc_hmac_sha.c Move libssl related defines used by fips provider to prov_ssl.h 2021-06-04 17:06:47 +02:00
cipher_aes_cbc_hmac_sha.h prov: prefix all exposed 'cipher' symbols with ossl_ 2020-10-01 10:33:57 +10:00
cipher_aes_ccm_hw_aesni.inc Update copyright year 2021-03-11 13:27:36 +00:00
cipher_aes_ccm_hw_rv32i.inc riscv: Clean up extension test macros 2023-03-16 13:12:19 +11:00
cipher_aes_ccm_hw_rv64i.inc riscv: Clean up extension test macros 2023-03-16 13:12:19 +11:00
cipher_aes_ccm_hw_s390x.inc Update copyright year 2020-10-15 14:10:06 +01:00
cipher_aes_ccm_hw_t4.inc Update copyright year 2021-03-11 13:27:36 +00:00
cipher_aes_ccm_hw.c riscv: Clean up extension test macros 2023-03-16 13:12:19 +11:00
cipher_aes_ccm.c Update copyright year 2021-03-11 13:27:36 +00:00
cipher_aes_ccm.h Update copyright year 2020-10-15 14:10:06 +01:00
cipher_aes_cts.inc Refactor cipher aes_cts code so that it can be used by other 128bit ciphers 2021-08-18 08:38:40 +10:00
cipher_aes_gcm_hw_aesni.inc Update copyright year 2022-05-03 13:34:51 +01:00
cipher_aes_gcm_hw_armv8.inc Update copyright year 2022-05-03 13:34:51 +01:00
cipher_aes_gcm_hw_ppc.inc Fix AES-GCM on Power 8 CPUs 2022-09-13 14:41:39 +02:00
cipher_aes_gcm_hw_rv32i.inc riscv: Clean up extension test macros 2023-03-16 13:12:19 +11:00
cipher_aes_gcm_hw_rv64i.inc riscv: Clean up extension test macros 2023-03-16 13:12:19 +11:00
cipher_aes_gcm_hw_s390x.inc Update copyright year 2021-06-17 13:24:59 +01:00
cipher_aes_gcm_hw_t4.inc Update copyright year 2021-03-11 13:27:36 +00:00
cipher_aes_gcm_hw_vaes_avx512.inc Update copyright year 2022-05-03 13:34:51 +01:00
cipher_aes_gcm_hw.c riscv: Clean up extension test macros 2023-03-16 13:12:19 +11:00
cipher_aes_gcm_siv_hw.c Fix AES-GCM-SIV endian issues 2022-08-01 10:23:57 +02:00
cipher_aes_gcm_siv_polyval.c Fix AES-GCM-SIV endian issues 2022-08-01 10:23:57 +02:00
cipher_aes_gcm_siv.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_aes_gcm_siv.h Fix AES-GCM-SIV endian issues 2022-08-01 10:23:57 +02:00
cipher_aes_gcm.c Remove lower limit on GCM mode ciphers 2021-07-14 12:02:03 +02:00
cipher_aes_gcm.h Update copyright year 2021-06-17 13:24:59 +01:00
cipher_aes_hw_aesni.inc Update copyright year 2021-02-18 15:05:17 +00:00
cipher_aes_hw_rv32i.inc riscv: Clean up extension test macros 2023-03-16 13:12:19 +11:00
cipher_aes_hw_rv64i.inc riscv: Clean up extension test macros 2023-03-16 13:12:19 +11:00
cipher_aes_hw_s390x.inc Fix CipherInit on s390x. 2021-06-08 14:32:44 +10:00
cipher_aes_hw_t4.inc Update copyright year 2021-02-18 15:05:17 +00:00
cipher_aes_hw.c riscv: Clean up extension test macros 2023-03-16 13:12:19 +11:00
cipher_aes_ocb_hw.c riscv: Clean up extension test macros 2023-03-16 13:12:19 +11:00
cipher_aes_ocb.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_aes_ocb.h Update copyright year 2020-10-15 14:10:06 +01:00
cipher_aes_siv_hw.c Update copyright year 2021-04-08 13:04:41 +01:00
cipher_aes_siv.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_aes_siv.h Update copyright year 2021-02-18 15:05:17 +00:00
cipher_aes_wrp.c aes-wrap: improve error handling 2021-08-26 09:33:52 +10:00
cipher_aes_xts_fips.c Update copyright year 2021-04-08 13:04:41 +01:00
cipher_aes_xts_hw.c riscv: Clean up extension test macros 2023-03-16 13:12:19 +11:00
cipher_aes_xts.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_aes_xts.h Update copyright year 2021-04-08 13:04:41 +01:00
cipher_aes.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_aes.h Update copyright year 2020-10-15 14:10:06 +01:00
cipher_aria_ccm_hw.c Add ossl_aria symbols 2021-03-18 17:52:37 +10:00
cipher_aria_ccm.c Update copyright year 2021-03-11 13:27:36 +00:00
cipher_aria_ccm.h Update copyright year 2020-10-15 14:10:06 +01:00
cipher_aria_gcm_hw.c Add ossl_aria symbols 2021-03-18 17:52:37 +10:00
cipher_aria_gcm.c Remove lower limit on GCM mode ciphers 2021-07-14 12:02:03 +02:00
cipher_aria_gcm.h Update copyright year 2020-10-15 14:10:06 +01:00
cipher_aria_hw.c Add ossl_aria symbols 2021-03-18 17:52:37 +10:00
cipher_aria.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_aria.h Update copyright year 2020-10-15 14:10:06 +01:00
cipher_blowfish_hw.c prov: prefix provider internal functions with ossl_ 2020-09-29 16:33:16 +10:00
cipher_blowfish.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_blowfish.h Update copyright year 2020-10-15 14:10:06 +01:00
cipher_camellia_cts.inc Add support for camellia cbc cts mode 2021-08-18 08:38:40 +10:00
cipher_camellia_hw_t4.inc Update copyright year 2021-02-18 15:05:17 +00:00
cipher_camellia_hw.c Update copyright year 2021-02-18 15:05:17 +00:00
cipher_camellia.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_camellia.h Update copyright year 2021-06-17 13:24:59 +01:00
cipher_cast5_hw.c prov: prefix provider internal functions with ossl_ 2020-09-29 16:33:16 +10:00
cipher_cast5.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_cast.h Update copyright year 2020-10-15 14:10:06 +01:00
cipher_chacha20_hw.c Update copyright year 2021-01-28 13:54:57 +01:00
cipher_chacha20_poly1305_hw.c ChaCha20-Poly1305 no longer supports truncated IV's. 2023-01-30 09:48:50 +01:00
cipher_chacha20_poly1305.c ChaCha20-Poly1305 no longer supports truncated IV's. 2023-01-30 09:48:50 +01:00
cipher_chacha20_poly1305.h ChaCha20-Poly1305 no longer supports truncated IV's. 2023-01-30 09:48:50 +01:00
cipher_chacha20.c fix some code with obvious wrong coding style 2021-10-28 13:10:46 +10:00
cipher_chacha20.h Update copyright year 2021-03-11 13:27:36 +00:00
cipher_cts.c Update copyright year 2022-05-03 13:34:51 +01:00
cipher_cts.h Refactor cipher aes_cts code so that it can be used by other 128bit ciphers 2021-08-18 08:38:40 +10:00
cipher_des_hw.c Fix Coverity 1498605 & 1498606: uninitialised value 2022-07-06 10:37:12 +10:00
cipher_des.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_des.h Update copyright year 2021-02-18 15:05:17 +00:00
cipher_desx_hw.c prov: prefix provider internal functions with ossl_ 2020-09-29 16:33:16 +10:00
cipher_desx.c Update copyright year 2020-04-23 13:55:52 +01:00
cipher_idea_hw.c prov: prefix provider internal functions with ossl_ 2020-09-29 16:33:16 +10:00
cipher_idea.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_idea.h Update copyright year 2020-10-15 14:10:06 +01:00
cipher_null.c prov: support param argument to null cipher init calls 2021-03-12 08:27:21 +10:00
cipher_rc2_hw.c prov: prefix provider internal functions with ossl_ 2020-09-29 16:33:16 +10:00
cipher_rc2.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_rc2.h Update copyright year 2020-10-15 14:10:06 +01:00
cipher_rc4_hmac_md5_hw.c Fix RC4-MD5 based ciphersuites 2020-11-25 10:14:43 +00:00
cipher_rc4_hmac_md5.c Update copyright year 2022-05-03 13:34:51 +01:00
cipher_rc4_hmac_md5.h Update copyright year 2020-10-15 14:10:06 +01:00
cipher_rc4_hw.c prov: prefix provider internal functions with ossl_ 2020-09-29 16:33:16 +10:00
cipher_rc4.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_rc4.h Update copyright year 2020-10-15 14:10:06 +01:00
cipher_rc5_hw.c prov: prefix provider internal functions with ossl_ 2020-09-29 16:33:16 +10:00
cipher_rc5.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_rc5.h Fix PROV_RC5_CTX's original structure name 2022-09-12 08:38:48 +02:00
cipher_seed_hw.c prov: prefix provider internal functions with ossl_ 2020-09-29 16:33:16 +10:00
cipher_seed.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_seed.h Update copyright year 2020-10-15 14:10:06 +01:00
cipher_sm4_ccm_hw.c providers: Add SM4 GCM implementation 2021-09-28 19:27:58 +10:00
cipher_sm4_ccm.c providers: Add SM4 GCM implementation 2021-09-28 19:27:58 +10:00
cipher_sm4_ccm.h providers: Add SM4 GCM implementation 2021-09-28 19:27:58 +10:00
cipher_sm4_gcm_hw.c enable VPSM4_EX_CAPABLE for sm4_gcm 2023-03-15 12:59:04 +01:00
cipher_sm4_gcm.c providers: Add SM4 GCM implementation 2021-09-28 19:27:58 +10:00
cipher_sm4_gcm.h providers: Add SM4 GCM implementation 2021-09-28 19:27:58 +10:00
cipher_sm4_hw.c SM4 AESE optimization for ARMv8 2023-02-02 10:16:47 +11:00
cipher_sm4_xts_hw.c SM4 AESE optimization for ARMv8 2023-02-02 10:16:47 +11:00
cipher_sm4_xts.c SM4 AESE optimization for ARMv8 2023-02-02 10:16:47 +11:00
cipher_sm4_xts.h SM4 AESE optimization for ARMv8 2023-02-02 10:16:47 +11:00
cipher_sm4.c Stop raising ERR_R_MALLOC_FAILURE in most places 2022-10-05 14:02:03 +02:00
cipher_sm4.h Update copyright year 2022-05-03 13:34:51 +01:00
cipher_tdes_common.c des: prevent error when using two key triple DES with a random key 2023-02-08 21:54:24 +11:00
cipher_tdes_default_hw.c Fix Coverity 1498605 & 1498606: uninitialised value 2022-07-06 10:37:12 +10:00
cipher_tdes_default.c Update copyright year 2022-05-03 13:34:51 +01:00
cipher_tdes_default.h Update copyright year 2020-10-15 14:10:06 +01:00
cipher_tdes_hw.c prov: prefix all exposed 'cipher' symbols with ossl_ 2020-10-01 10:33:57 +10:00
cipher_tdes_wrap_hw.c prov: prefix all exposed 'cipher' symbols with ossl_ 2020-10-01 10:33:57 +10:00
cipher_tdes_wrap.c Add a gettable for provider ciphers to return the EVP_CIPH_RAND_KEY flag 2021-06-08 15:16:06 +10:00
cipher_tdes.c Update copyright year 2022-05-03 13:34:51 +01:00
cipher_tdes.h Add a gettable for provider ciphers to return the EVP_CIPH_RAND_KEY flag 2021-06-08 15:16:06 +10:00
ciphercommon_block.c Rationalize FIPS sources 2023-02-08 16:20:55 +01:00
ciphercommon_ccm_hw.c Update copyright year 2021-03-11 13:27:36 +00:00
ciphercommon_ccm.c prov: support params argument to common cipher init calls 2021-03-12 08:27:21 +10:00
ciphercommon_gcm_hw.c Update copyright year 2021-03-11 13:27:36 +00:00
ciphercommon_gcm.c GCM: record limit counter gets reset on AAD changes 2022-07-27 15:20:49 +02:00
ciphercommon_hw.c Fix param indentation in ciphercommon_hw.c 2021-06-01 15:22:30 +10:00
ciphercommon_local.h Update copyright year 2021-03-11 13:27:36 +00:00
ciphercommon.c Add a gettable for provider ciphers to return the EVP_CIPH_RAND_KEY flag 2021-06-08 15:16:06 +10:00