From: Richard Levitte Date: Fri, 4 Oct 2019 12:44:42 +0000 (+0200) Subject: Providers: move all ciphers X-Git-Tag: openssl-3.0.0-alpha1~1169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=604e884bb8aba9b549c7e5effe01e406ccab3bcd;p=thirdparty%2Fopenssl.git Providers: move all ciphers From providers/{common,default}/ to providers/implementations/ Except for common code, which remains in providers/common/ciphers/. However, we do move providers/common/include/internal/ciphers/*.h to providers/common/include/prov/, and adjust all source including any of those header files. Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/10088) --- diff --git a/providers/common/ciphers/build.info b/providers/common/ciphers/build.info index 77376cce1e4..b76b8ba10af 100644 --- a/providers/common/ciphers/build.info +++ b/providers/common/ciphers/build.info @@ -1,26 +1,5 @@ -# This source is common building blockss for all ciphers in all our providers. +# This source is common building blocks for all ciphers in all our providers. SOURCE[../../libcommon.a]=\ cipher_common.c cipher_common_hw.c block.c \ cipher_gcm.c cipher_gcm_hw.c \ cipher_ccm.c cipher_ccm_hw.c - -# These are our implementations -$GOAL=../../libimplementations.a - -IF[{- !$disabled{des} -}] - $COMMON_DES=cipher_tdes.c cipher_tdes_hw.c -ENDIF - -SOURCE[$GOAL]=\ - cipher_aes.c cipher_aes_hw.c \ - cipher_aes_xts.c cipher_aes_xts_hw.c \ - cipher_aes_gcm.c cipher_aes_gcm_hw.c \ - cipher_aes_ccm.c cipher_aes_ccm_hw.c \ - cipher_aes_wrp.c \ - $COMMON_DES -# Because some default ciphers need it -INCLUDE[$GOAL]=. - -# Finally, we have a few things that aren't FIPS agnostic -SOURCE[../../libfips.a]=cipher_fips.c -SOURCE[../../libnonfips.a]=cipher_fips.c diff --git a/providers/common/ciphers/cipher_ccm.c b/providers/common/ciphers/cipher_ccm.c index 3fbaef9a466..60fade83e01 100644 --- a/providers/common/ciphers/cipher_ccm.c +++ b/providers/common/ciphers/cipher_ccm.c @@ -9,8 +9,8 @@ /* Dispatch functions for ccm mode */ -#include "cipher_local.h" -#include "internal/ciphers/cipher_ccm.h" +#include "prov/ciphercommon.h" +#include "prov/cipher_ccm.h" #include "internal/providercommonerr.h" static int ccm_cipher_internal(PROV_CCM_CTX *ctx, unsigned char *out, diff --git a/providers/common/ciphers/cipher_ccm_hw.c b/providers/common/ciphers/cipher_ccm_hw.c index b093b768e72..5503a41687c 100644 --- a/providers/common/ciphers/cipher_ccm_hw.c +++ b/providers/common/ciphers/cipher_ccm_hw.c @@ -7,8 +7,8 @@ * https://www.openssl.org/source/license.html */ -#include "internal/ciphers/ciphercommon.h" -#include "internal/ciphers/cipher_ccm.h" +#include "prov/ciphercommon.h" +#include "prov/cipher_ccm.h" int ccm_generic_setiv(PROV_CCM_CTX *ctx, const unsigned char *nonce, size_t nlen, size_t mlen) diff --git a/providers/common/ciphers/cipher_common_hw.c b/providers/common/ciphers/cipher_common_hw.c index 6f1b4babd87..f1c466edc8f 100644 --- a/providers/common/ciphers/cipher_common_hw.c +++ b/providers/common/ciphers/cipher_common_hw.c @@ -7,7 +7,7 @@ * https://www.openssl.org/source/license.html */ -#include "cipher_local.h" +#include "prov/ciphercommon.h" /*- * The generic cipher functions for cipher modes cbc, ecb, ofb, cfb and ctr. diff --git a/providers/common/ciphers/cipher_gcm.c b/providers/common/ciphers/cipher_gcm.c index 59368dc81e5..72d17d00733 100644 --- a/providers/common/ciphers/cipher_gcm.c +++ b/providers/common/ciphers/cipher_gcm.c @@ -9,8 +9,8 @@ /* Dispatch functions for gcm mode */ -#include "cipher_local.h" -#include "internal/ciphers/cipher_gcm.h" +#include "prov/ciphercommon.h" +#include "prov/cipher_gcm.h" #include "internal/providercommonerr.h" #include "crypto/rand.h" #include "internal/provider_ctx.h" diff --git a/providers/common/ciphers/cipher_gcm_hw.c b/providers/common/ciphers/cipher_gcm_hw.c index 1d9c3ea49ca..09e3c274008 100644 --- a/providers/common/ciphers/cipher_gcm_hw.c +++ b/providers/common/ciphers/cipher_gcm_hw.c @@ -7,8 +7,8 @@ * https://www.openssl.org/source/license.html */ -#include "cipher_local.h" -#include "internal/ciphers/cipher_gcm.h" +#include "prov/ciphercommon.h" +#include "prov/cipher_gcm.h" int gcm_setiv(PROV_GCM_CTX *ctx, const unsigned char *iv, size_t ivlen) diff --git a/providers/common/ciphers/cipher_local.h b/providers/common/ciphers/cipher_local.h index 898c99b1d3e..1c4716f357f 100644 --- a/providers/common/ciphers/cipher_local.h +++ b/providers/common/ciphers/cipher_local.h @@ -7,7 +7,7 @@ * https://www.openssl.org/source/license.html */ -#include "internal/ciphers/ciphercommon.h" +#include "prov/ciphercommon.h" void padblock(unsigned char *buf, size_t *buflen, size_t blocksize); int unpadblock(unsigned char *buf, size_t *buflen, size_t blocksize); diff --git a/providers/common/include/internal/ciphers/cipher_aead.h b/providers/common/include/prov/cipher_aead.h similarity index 100% rename from providers/common/include/internal/ciphers/cipher_aead.h rename to providers/common/include/prov/cipher_aead.h diff --git a/providers/common/include/internal/ciphers/cipher_ccm.h b/providers/common/include/prov/cipher_ccm.h similarity index 100% rename from providers/common/include/internal/ciphers/cipher_ccm.h rename to providers/common/include/prov/cipher_ccm.h diff --git a/providers/common/include/internal/ciphers/cipher_gcm.h b/providers/common/include/prov/cipher_gcm.h similarity index 100% rename from providers/common/include/internal/ciphers/cipher_gcm.h rename to providers/common/include/prov/cipher_gcm.h diff --git a/providers/common/include/internal/ciphers/ciphercommon.h b/providers/common/include/prov/ciphercommon.h similarity index 100% rename from providers/common/include/internal/ciphers/ciphercommon.h rename to providers/common/include/prov/ciphercommon.h diff --git a/providers/default/build.info b/providers/default/build.info index 9a9760b7999..139590ae457 100644 --- a/providers/default/build.info +++ b/providers/default/build.info @@ -1,4 +1,2 @@ -SUBDIRS=ciphers $GOAL=../../libcrypto SOURCE[$GOAL]=defltprov.c -INCLUDE[$GOAL]=include diff --git a/providers/implementations/build.info b/providers/implementations/build.info index 86c581d7f74..0fc08220748 100644 --- a/providers/implementations/build.info +++ b/providers/implementations/build.info @@ -1 +1 @@ -SUBDIRS=digests macs kdfs exchange keymgmt signature +SUBDIRS=digests ciphers macs kdfs exchange keymgmt signature diff --git a/providers/implementations/ciphers/build.info b/providers/implementations/ciphers/build.info new file mode 100644 index 00000000000..fb2b53e58ad --- /dev/null +++ b/providers/implementations/ciphers/build.info @@ -0,0 +1,102 @@ +# We make separate GOAL variables for each algorithm, to make it easy to +# switch each to the Legacy provider when needed. +# +# $TDES_1_GOAL and $TDES_2_GOAL separate FIPSable and non-FIPSable TDES. +# The latter may become legacy sooner, so it's comfortable to have two +# variables already now, to switch the non-FIPSable TDES to legacy if needed. + +$AES_GOAL=../../libimplementations.a +$TDES_1_GOAL=../../libimplementations.a +$TDES_2_GOAL=../../libimplementations.a +$DES_GOAL=../../libimplementations.a +$ARIA_GOAL=../../libimplementations.a +$CAMELLIA_GOAL=../../libimplementations.a +$BLOWFISH_GOAL=../../libimplementations.a +$IDEA_GOAL=../../libimplementations.a +$CAST5_GOAL=../../libimplementations.a +$SEED_GOAL=../../libimplementations.a +$SM4_GOAL=../../libimplementations.a +$RC4_GOAL=../../libimplementations.a +$RC5_GOAL=../../libimplementations.a +$RC2_GOAL=../../libimplementations.a + +IF[{- !$disabled{des} -}] + SOURCE[$TDES_1_GOAL]=cipher_tdes.c cipher_tdes_hw.c +ENDIF + +SOURCE[$AES_GOAL]=\ + cipher_aes.c cipher_aes_hw.c \ + cipher_aes_xts.c cipher_aes_xts_hw.c \ + cipher_aes_gcm.c cipher_aes_gcm_hw.c \ + cipher_aes_ccm.c cipher_aes_ccm_hw.c \ + cipher_aes_wrp.c +# Extra code to satisfy the FIPS and non-FIPS separation. +# When the AES-xxx-XTS moves to legacy, this can be removed. +SOURCE[../../libfips.a]=cipher_aes_xts_fips.c +SOURCE[../../libnonfips.a]=cipher_aes_xts_fips.c + +IF[{- !$disabled{des} -}] + SOURCE[$TDES_2_GOAL]=\ + cipher_tdes_default.c cipher_tdes_default_hw.c \ + cipher_tdes_wrap.c cipher_tdes_wrap_hw.c + SOURCE[$DES_GOAL]=\ + cipher_desx.c cipher_desx_hw.c \ + cipher_des.c cipher_des_hw.c +ENDIF + +IF[{- !$disabled{aria} -}] + SOURCE[$ARIA_GOAL]=\ + cipher_aria.c cipher_aria_hw.c \ + cipher_aria_gcm.c cipher_aria_gcm_hw.c \ + cipher_aria_ccm.c cipher_aria_ccm_hw.c +ENDIF + +IF[{- !$disabled{camellia} -}] + SOURCE[$CAMELLIA_GOAL]=\ + cipher_camellia.c cipher_camellia_hw.c +ENDIF + +IF[{- !$disabled{bf} -}] + SOURCE[$BLOWFISH_GOAL]=\ + cipher_blowfish.c cipher_blowfish_hw.c +ENDIF + +IF[{- !$disabled{idea} -}] + SOURCE[$IDEA_GOAL]=\ + cipher_idea.c cipher_idea_hw.c +ENDIF + +IF[{- !$disabled{cast} -}] + SOURCE[$CAST5_GOAL]=\ + cipher_cast5.c cipher_cast5_hw.c +ENDIF + +IF[{- !$disabled{seed} -}] + SOURCE[$SEED_GOAL]=\ + cipher_seed.c cipher_seed_hw.c +ENDIF + +IF[{- !$disabled{sm4} -}] + SOURCE[$SM4_GOAL]=\ + cipher_sm4.c cipher_sm4_hw.c +ENDIF + +IF[{- !$disabled{ocb} -}] + SOURCE[$AES_GOAL]=\ + cipher_aes_ocb.c cipher_aes_ocb_hw.c +ENDIF + +IF[{- !$disabled{rc4} -}] + SOURCE[$RC4_GOAL]=\ + cipher_rc4.c cipher_rc4_hw.c +ENDIF + +IF[{- !$disabled{rc5} -}] + SOURCE[$RC5_GOAL]=\ + cipher_rc5.c cipher_rc5_hw.c +ENDIF + +IF[{- !$disabled{rc2} -}] + SOURCE[$RC2_GOAL]=\ + cipher_rc2.c cipher_rc2_hw.c +ENDIF diff --git a/providers/common/ciphers/cipher_aes.c b/providers/implementations/ciphers/cipher_aes.c similarity index 100% rename from providers/common/ciphers/cipher_aes.c rename to providers/implementations/ciphers/cipher_aes.c diff --git a/providers/common/ciphers/cipher_aes.h b/providers/implementations/ciphers/cipher_aes.h similarity index 98% rename from providers/common/ciphers/cipher_aes.h rename to providers/implementations/ciphers/cipher_aes.h index 741b20f6e3a..d00fab13efd 100644 --- a/providers/common/ciphers/cipher_aes.h +++ b/providers/implementations/ciphers/cipher_aes.h @@ -8,7 +8,7 @@ */ #include -#include "internal/ciphers/ciphercommon.h" +#include "prov/ciphercommon.h" typedef struct prov_aes_ctx_st { PROV_CIPHER_CTX base; /* Must be first */ diff --git a/providers/common/ciphers/cipher_aes_ccm.c b/providers/implementations/ciphers/cipher_aes_ccm.c similarity index 94% rename from providers/common/ciphers/cipher_aes_ccm.c rename to providers/implementations/ciphers/cipher_aes_ccm.c index cffca06c80c..59fc7274c9d 100644 --- a/providers/common/ciphers/cipher_aes_ccm.c +++ b/providers/implementations/ciphers/cipher_aes_ccm.c @@ -9,8 +9,8 @@ /* Dispatch functions for AES CCM mode */ -#include "cipher_local.h" -#include "internal/ciphers/cipher_ccm.h" +#include "prov/ciphercommon.h" +#include "prov/cipher_ccm.h" #include "internal/provider_algs.h" static void *aes_ccm_newctx(void *provctx, size_t keybits) diff --git a/providers/common/ciphers/cipher_aes_ccm_hw.c b/providers/implementations/ciphers/cipher_aes_ccm_hw.c similarity index 96% rename from providers/common/ciphers/cipher_aes_ccm_hw.c rename to providers/implementations/ciphers/cipher_aes_ccm_hw.c index ba7ce4dcab1..ae200ebada6 100644 --- a/providers/common/ciphers/cipher_aes_ccm_hw.c +++ b/providers/implementations/ciphers/cipher_aes_ccm_hw.c @@ -9,8 +9,8 @@ /* AES CCM mode */ -#include "cipher_local.h" -#include "internal/ciphers/cipher_ccm.h" +#include "prov/ciphercommon.h" +#include "prov/cipher_ccm.h" #define AES_HW_CCM_SET_KEY_FN(fn_set_enc_key, fn_blk, fn_ccm_enc, fn_ccm_dec) \ fn_set_enc_key(key, keylen * 8, &actx->ccm.ks.ks); \ diff --git a/providers/common/ciphers/cipher_aes_ccm_hw_aesni.inc b/providers/implementations/ciphers/cipher_aes_ccm_hw_aesni.inc similarity index 100% rename from providers/common/ciphers/cipher_aes_ccm_hw_aesni.inc rename to providers/implementations/ciphers/cipher_aes_ccm_hw_aesni.inc diff --git a/providers/common/ciphers/cipher_aes_ccm_hw_s390x.inc b/providers/implementations/ciphers/cipher_aes_ccm_hw_s390x.inc similarity index 100% rename from providers/common/ciphers/cipher_aes_ccm_hw_s390x.inc rename to providers/implementations/ciphers/cipher_aes_ccm_hw_s390x.inc diff --git a/providers/common/ciphers/cipher_aes_ccm_hw_t4.inc b/providers/implementations/ciphers/cipher_aes_ccm_hw_t4.inc similarity index 100% rename from providers/common/ciphers/cipher_aes_ccm_hw_t4.inc rename to providers/implementations/ciphers/cipher_aes_ccm_hw_t4.inc diff --git a/providers/common/ciphers/cipher_aes_gcm.c b/providers/implementations/ciphers/cipher_aes_gcm.c similarity index 94% rename from providers/common/ciphers/cipher_aes_gcm.c rename to providers/implementations/ciphers/cipher_aes_gcm.c index ef015bff215..1df1c1dba9a 100644 --- a/providers/common/ciphers/cipher_aes_gcm.c +++ b/providers/implementations/ciphers/cipher_aes_gcm.c @@ -9,8 +9,8 @@ /* Dispatch functions for AES GCM mode */ -#include "cipher_local.h" -#include "internal/ciphers/cipher_gcm.h" +#include "prov/ciphercommon.h" +#include "prov/cipher_gcm.h" #include "internal/provider_algs.h" static void *aes_gcm_newctx(void *provctx, size_t keybits) diff --git a/providers/common/ciphers/cipher_aes_gcm_hw.c b/providers/implementations/ciphers/cipher_aes_gcm_hw.c similarity index 96% rename from providers/common/ciphers/cipher_aes_gcm_hw.c rename to providers/implementations/ciphers/cipher_aes_gcm_hw.c index 5263bdd6dd4..f5dc0c4eed3 100644 --- a/providers/common/ciphers/cipher_aes_gcm_hw.c +++ b/providers/implementations/ciphers/cipher_aes_gcm_hw.c @@ -9,8 +9,8 @@ /* Dispatch functions for AES GCM mode */ -#include "cipher_local.h" -#include "internal/ciphers/cipher_gcm.h" +#include "prov/ciphercommon.h" +#include "prov/cipher_gcm.h" static int generic_aes_gcm_initkey(PROV_GCM_CTX *ctx, const unsigned char *key, size_t keylen) diff --git a/providers/common/ciphers/cipher_aes_gcm_hw_aesni.inc b/providers/implementations/ciphers/cipher_aes_gcm_hw_aesni.inc similarity index 100% rename from providers/common/ciphers/cipher_aes_gcm_hw_aesni.inc rename to providers/implementations/ciphers/cipher_aes_gcm_hw_aesni.inc diff --git a/providers/common/ciphers/cipher_aes_gcm_hw_s390x.inc b/providers/implementations/ciphers/cipher_aes_gcm_hw_s390x.inc similarity index 100% rename from providers/common/ciphers/cipher_aes_gcm_hw_s390x.inc rename to providers/implementations/ciphers/cipher_aes_gcm_hw_s390x.inc diff --git a/providers/common/ciphers/cipher_aes_gcm_hw_t4.inc b/providers/implementations/ciphers/cipher_aes_gcm_hw_t4.inc similarity index 100% rename from providers/common/ciphers/cipher_aes_gcm_hw_t4.inc rename to providers/implementations/ciphers/cipher_aes_gcm_hw_t4.inc diff --git a/providers/common/ciphers/cipher_aes_hw.c b/providers/implementations/ciphers/cipher_aes_hw.c similarity index 100% rename from providers/common/ciphers/cipher_aes_hw.c rename to providers/implementations/ciphers/cipher_aes_hw.c diff --git a/providers/common/ciphers/cipher_aes_hw_aesni.inc b/providers/implementations/ciphers/cipher_aes_hw_aesni.inc similarity index 100% rename from providers/common/ciphers/cipher_aes_hw_aesni.inc rename to providers/implementations/ciphers/cipher_aes_hw_aesni.inc diff --git a/providers/common/ciphers/cipher_aes_hw_s390x.inc b/providers/implementations/ciphers/cipher_aes_hw_s390x.inc similarity index 100% rename from providers/common/ciphers/cipher_aes_hw_s390x.inc rename to providers/implementations/ciphers/cipher_aes_hw_s390x.inc diff --git a/providers/common/ciphers/cipher_aes_hw_t4.inc b/providers/implementations/ciphers/cipher_aes_hw_t4.inc similarity index 100% rename from providers/common/ciphers/cipher_aes_hw_t4.inc rename to providers/implementations/ciphers/cipher_aes_hw_t4.inc diff --git a/providers/default/ciphers/cipher_aes_ocb.c b/providers/implementations/ciphers/cipher_aes_ocb.c similarity index 99% rename from providers/default/ciphers/cipher_aes_ocb.c rename to providers/implementations/ciphers/cipher_aes_ocb.c index 95c0658fee8..5ab0b8fd150 100644 --- a/providers/default/ciphers/cipher_aes_ocb.c +++ b/providers/implementations/ciphers/cipher_aes_ocb.c @@ -9,7 +9,7 @@ #include "cipher_aes_ocb.h" #include "internal/providercommonerr.h" -#include "internal/ciphers/cipher_aead.h" +#include "prov/cipher_aead.h" #include "internal/provider_algs.h" #define AES_OCB_FLAGS AEAD_FLAGS diff --git a/providers/default/ciphers/cipher_aes_ocb.h b/providers/implementations/ciphers/cipher_aes_ocb.h similarity index 96% rename from providers/default/ciphers/cipher_aes_ocb.h rename to providers/implementations/ciphers/cipher_aes_ocb.h index 7750e976154..ba515241e22 100644 --- a/providers/default/ciphers/cipher_aes_ocb.h +++ b/providers/implementations/ciphers/cipher_aes_ocb.h @@ -8,7 +8,7 @@ */ #include -#include "internal/ciphers/ciphercommon.h" +#include "prov/ciphercommon.h" #define OCB_MAX_TAG_LEN AES_BLOCK_SIZE #define OCB_MAX_DATA_LEN AES_BLOCK_SIZE diff --git a/providers/default/ciphers/cipher_aes_ocb_hw.c b/providers/implementations/ciphers/cipher_aes_ocb_hw.c similarity index 100% rename from providers/default/ciphers/cipher_aes_ocb_hw.c rename to providers/implementations/ciphers/cipher_aes_ocb_hw.c diff --git a/providers/common/ciphers/cipher_aes_wrp.c b/providers/implementations/ciphers/cipher_aes_wrp.c similarity index 100% rename from providers/common/ciphers/cipher_aes_wrp.c rename to providers/implementations/ciphers/cipher_aes_wrp.c diff --git a/providers/common/ciphers/cipher_aes_xts.c b/providers/implementations/ciphers/cipher_aes_xts.c similarity index 100% rename from providers/common/ciphers/cipher_aes_xts.c rename to providers/implementations/ciphers/cipher_aes_xts.c diff --git a/providers/common/ciphers/cipher_aes_xts.h b/providers/implementations/ciphers/cipher_aes_xts.h similarity index 96% rename from providers/common/ciphers/cipher_aes_xts.h rename to providers/implementations/ciphers/cipher_aes_xts.h index 16fb8c34cde..615ee619059 100644 --- a/providers/common/ciphers/cipher_aes_xts.h +++ b/providers/implementations/ciphers/cipher_aes_xts.h @@ -8,7 +8,7 @@ */ #include -#include "internal/ciphers/ciphercommon.h" +#include "prov/ciphercommon.h" /* * Available in cipher_fips.c, and compiled with different values depending diff --git a/providers/common/ciphers/cipher_fips.c b/providers/implementations/ciphers/cipher_aes_xts_fips.c similarity index 100% rename from providers/common/ciphers/cipher_fips.c rename to providers/implementations/ciphers/cipher_aes_xts_fips.c diff --git a/providers/common/ciphers/cipher_aes_xts_hw.c b/providers/implementations/ciphers/cipher_aes_xts_hw.c similarity index 100% rename from providers/common/ciphers/cipher_aes_xts_hw.c rename to providers/implementations/ciphers/cipher_aes_xts_hw.c diff --git a/providers/default/ciphers/cipher_aria.c b/providers/implementations/ciphers/cipher_aria.c similarity index 100% rename from providers/default/ciphers/cipher_aria.c rename to providers/implementations/ciphers/cipher_aria.c diff --git a/providers/default/ciphers/cipher_aria.h b/providers/implementations/ciphers/cipher_aria.h similarity index 96% rename from providers/default/ciphers/cipher_aria.h rename to providers/implementations/ciphers/cipher_aria.h index e95e4ca93c7..282408c58ed 100644 --- a/providers/default/ciphers/cipher_aria.h +++ b/providers/implementations/ciphers/cipher_aria.h @@ -8,7 +8,7 @@ */ #include "crypto/aria.h" -#include "internal/ciphers/ciphercommon.h" +#include "prov/ciphercommon.h" typedef struct prov_aria_ctx_st { PROV_CIPHER_CTX base; /* Must be first */ diff --git a/providers/default/ciphers/cipher_aria_ccm.c b/providers/implementations/ciphers/cipher_aria_ccm.c similarity index 100% rename from providers/default/ciphers/cipher_aria_ccm.c rename to providers/implementations/ciphers/cipher_aria_ccm.c diff --git a/providers/default/ciphers/cipher_aria_ccm.h b/providers/implementations/ciphers/cipher_aria_ccm.h similarity index 88% rename from providers/default/ciphers/cipher_aria_ccm.h rename to providers/implementations/ciphers/cipher_aria_ccm.h index fe0a3908bc0..301ce14306b 100644 --- a/providers/default/ciphers/cipher_aria_ccm.h +++ b/providers/implementations/ciphers/cipher_aria_ccm.h @@ -8,8 +8,8 @@ */ #include "crypto/aria.h" -#include "internal/ciphers/ciphercommon.h" -#include "internal/ciphers/cipher_ccm.h" +#include "prov/ciphercommon.h" +#include "prov/cipher_ccm.h" typedef struct prov_aria_ccm_ctx_st { PROV_CCM_CTX base; /* Must be first */ diff --git a/providers/default/ciphers/cipher_aria_ccm_hw.c b/providers/implementations/ciphers/cipher_aria_ccm_hw.c similarity index 100% rename from providers/default/ciphers/cipher_aria_ccm_hw.c rename to providers/implementations/ciphers/cipher_aria_ccm_hw.c diff --git a/providers/default/ciphers/cipher_aria_gcm.c b/providers/implementations/ciphers/cipher_aria_gcm.c similarity index 100% rename from providers/default/ciphers/cipher_aria_gcm.c rename to providers/implementations/ciphers/cipher_aria_gcm.c diff --git a/providers/default/ciphers/cipher_aria_gcm.h b/providers/implementations/ciphers/cipher_aria_gcm.h similarity index 87% rename from providers/default/ciphers/cipher_aria_gcm.h rename to providers/implementations/ciphers/cipher_aria_gcm.h index ac5c248201b..13fbe175d93 100644 --- a/providers/default/ciphers/cipher_aria_gcm.h +++ b/providers/implementations/ciphers/cipher_aria_gcm.h @@ -8,8 +8,8 @@ */ #include "crypto/aria.h" -#include "internal/ciphers/ciphercommon.h" -#include "internal/ciphers/cipher_gcm.h" +#include "prov/ciphercommon.h" +#include "prov/cipher_gcm.h" typedef struct prov_aria_gcm_ctx_st { PROV_GCM_CTX base; /* must be first entry in struct */ diff --git a/providers/default/ciphers/cipher_aria_gcm_hw.c b/providers/implementations/ciphers/cipher_aria_gcm_hw.c similarity index 100% rename from providers/default/ciphers/cipher_aria_gcm_hw.c rename to providers/implementations/ciphers/cipher_aria_gcm_hw.c diff --git a/providers/default/ciphers/cipher_aria_hw.c b/providers/implementations/ciphers/cipher_aria_hw.c similarity index 100% rename from providers/default/ciphers/cipher_aria_hw.c rename to providers/implementations/ciphers/cipher_aria_hw.c diff --git a/providers/default/ciphers/cipher_blowfish.c b/providers/implementations/ciphers/cipher_blowfish.c similarity index 100% rename from providers/default/ciphers/cipher_blowfish.c rename to providers/implementations/ciphers/cipher_blowfish.c diff --git a/providers/default/ciphers/cipher_blowfish.h b/providers/implementations/ciphers/cipher_blowfish.h similarity index 94% rename from providers/default/ciphers/cipher_blowfish.h rename to providers/implementations/ciphers/cipher_blowfish.h index 819a61f140f..2d66d1bc0e3 100644 --- a/providers/default/ciphers/cipher_blowfish.h +++ b/providers/implementations/ciphers/cipher_blowfish.h @@ -8,7 +8,7 @@ */ #include -#include "internal/ciphers/ciphercommon.h" +#include "prov/ciphercommon.h" typedef struct prov_blowfish_ctx_st { PROV_CIPHER_CTX base; /* Must be first */ diff --git a/providers/default/ciphers/cipher_blowfish_hw.c b/providers/implementations/ciphers/cipher_blowfish_hw.c similarity index 100% rename from providers/default/ciphers/cipher_blowfish_hw.c rename to providers/implementations/ciphers/cipher_blowfish_hw.c diff --git a/providers/default/ciphers/cipher_camellia.c b/providers/implementations/ciphers/cipher_camellia.c similarity index 100% rename from providers/default/ciphers/cipher_camellia.c rename to providers/implementations/ciphers/cipher_camellia.c diff --git a/providers/default/ciphers/cipher_camellia.h b/providers/implementations/ciphers/cipher_camellia.h similarity index 96% rename from providers/default/ciphers/cipher_camellia.h rename to providers/implementations/ciphers/cipher_camellia.h index 521c03e2613..58636f1d323 100644 --- a/providers/default/ciphers/cipher_camellia.h +++ b/providers/implementations/ciphers/cipher_camellia.h @@ -8,7 +8,7 @@ */ #include "openssl/camellia.h" -#include "internal/ciphers/ciphercommon.h" +#include "prov/ciphercommon.h" typedef struct prov_camellia_ctx_st { PROV_CIPHER_CTX base; /* Must be first */ diff --git a/providers/default/ciphers/cipher_camellia_hw.c b/providers/implementations/ciphers/cipher_camellia_hw.c similarity index 100% rename from providers/default/ciphers/cipher_camellia_hw.c rename to providers/implementations/ciphers/cipher_camellia_hw.c diff --git a/providers/default/ciphers/cipher_camellia_hw_t4.inc b/providers/implementations/ciphers/cipher_camellia_hw_t4.inc similarity index 100% rename from providers/default/ciphers/cipher_camellia_hw_t4.inc rename to providers/implementations/ciphers/cipher_camellia_hw_t4.inc diff --git a/providers/default/ciphers/cipher_cast.h b/providers/implementations/ciphers/cipher_cast.h similarity index 94% rename from providers/default/ciphers/cipher_cast.h rename to providers/implementations/ciphers/cipher_cast.h index 279f92216f2..218f5c4fb54 100644 --- a/providers/default/ciphers/cipher_cast.h +++ b/providers/implementations/ciphers/cipher_cast.h @@ -8,7 +8,7 @@ */ #include -#include "internal/ciphers/ciphercommon.h" +#include "prov/ciphercommon.h" typedef struct prov_cast_ctx_st { PROV_CIPHER_CTX base; /* Must be first */ diff --git a/providers/default/ciphers/cipher_cast5.c b/providers/implementations/ciphers/cipher_cast5.c similarity index 100% rename from providers/default/ciphers/cipher_cast5.c rename to providers/implementations/ciphers/cipher_cast5.c diff --git a/providers/default/ciphers/cipher_cast5_hw.c b/providers/implementations/ciphers/cipher_cast5_hw.c similarity index 100% rename from providers/default/ciphers/cipher_cast5_hw.c rename to providers/implementations/ciphers/cipher_cast5_hw.c diff --git a/providers/default/ciphers/cipher_des.c b/providers/implementations/ciphers/cipher_des.c similarity index 99% rename from providers/default/ciphers/cipher_des.c rename to providers/implementations/ciphers/cipher_des.c index 4530114187a..5781aa47063 100644 --- a/providers/default/ciphers/cipher_des.c +++ b/providers/implementations/ciphers/cipher_des.c @@ -7,7 +7,7 @@ * https://www.openssl.org/source/license.html */ -#include "cipher_local.h" +#include "prov/ciphercommon.h" #include "cipher_des.h" #include "crypto/rand.h" #include "internal/provider_algs.h" diff --git a/providers/default/ciphers/cipher_des.h b/providers/implementations/ciphers/cipher_des.h similarity index 100% rename from providers/default/ciphers/cipher_des.h rename to providers/implementations/ciphers/cipher_des.h diff --git a/providers/default/ciphers/cipher_des_hw.c b/providers/implementations/ciphers/cipher_des_hw.c similarity index 99% rename from providers/default/ciphers/cipher_des_hw.c rename to providers/implementations/ciphers/cipher_des_hw.c index 78107062a56..c3a67080fd1 100644 --- a/providers/default/ciphers/cipher_des_hw.c +++ b/providers/implementations/ciphers/cipher_des_hw.c @@ -7,7 +7,7 @@ * https://www.openssl.org/source/license.html */ -#include "internal/ciphers/ciphercommon.h" +#include "prov/ciphercommon.h" #include "cipher_des.h" static int cipher_hw_des_initkey(PROV_CIPHER_CTX *ctx, diff --git a/providers/default/ciphers/cipher_desx.c b/providers/implementations/ciphers/cipher_desx.c similarity index 100% rename from providers/default/ciphers/cipher_desx.c rename to providers/implementations/ciphers/cipher_desx.c diff --git a/providers/default/ciphers/cipher_desx_hw.c b/providers/implementations/ciphers/cipher_desx_hw.c similarity index 100% rename from providers/default/ciphers/cipher_desx_hw.c rename to providers/implementations/ciphers/cipher_desx_hw.c diff --git a/providers/default/ciphers/cipher_idea.c b/providers/implementations/ciphers/cipher_idea.c similarity index 100% rename from providers/default/ciphers/cipher_idea.c rename to providers/implementations/ciphers/cipher_idea.c diff --git a/providers/default/ciphers/cipher_idea.h b/providers/implementations/ciphers/cipher_idea.h similarity index 94% rename from providers/default/ciphers/cipher_idea.h rename to providers/implementations/ciphers/cipher_idea.h index 8e096bfe9f1..ebe590b93c4 100644 --- a/providers/default/ciphers/cipher_idea.h +++ b/providers/implementations/ciphers/cipher_idea.h @@ -8,7 +8,7 @@ */ #include -#include "internal/ciphers/ciphercommon.h" +#include "prov/ciphercommon.h" typedef struct prov_idea_ctx_st { PROV_CIPHER_CTX base; /* Must be first */ diff --git a/providers/default/ciphers/cipher_idea_hw.c b/providers/implementations/ciphers/cipher_idea_hw.c similarity index 100% rename from providers/default/ciphers/cipher_idea_hw.c rename to providers/implementations/ciphers/cipher_idea_hw.c diff --git a/providers/default/ciphers/cipher_rc2.c b/providers/implementations/ciphers/cipher_rc2.c similarity index 100% rename from providers/default/ciphers/cipher_rc2.c rename to providers/implementations/ciphers/cipher_rc2.c diff --git a/providers/default/ciphers/cipher_rc2.h b/providers/implementations/ciphers/cipher_rc2.h similarity index 95% rename from providers/default/ciphers/cipher_rc2.h rename to providers/implementations/ciphers/cipher_rc2.h index 7a7928925bd..82f0f6ca74e 100644 --- a/providers/default/ciphers/cipher_rc2.h +++ b/providers/implementations/ciphers/cipher_rc2.h @@ -8,7 +8,7 @@ */ #include -#include "internal/ciphers/ciphercommon.h" +#include "prov/ciphercommon.h" typedef struct prov_rc2_ctx_st { PROV_CIPHER_CTX base; /* Must be first */ diff --git a/providers/default/ciphers/cipher_rc2_hw.c b/providers/implementations/ciphers/cipher_rc2_hw.c similarity index 100% rename from providers/default/ciphers/cipher_rc2_hw.c rename to providers/implementations/ciphers/cipher_rc2_hw.c diff --git a/providers/default/ciphers/cipher_rc4.c b/providers/implementations/ciphers/cipher_rc4.c similarity index 100% rename from providers/default/ciphers/cipher_rc4.c rename to providers/implementations/ciphers/cipher_rc4.c diff --git a/providers/default/ciphers/cipher_rc4.h b/providers/implementations/ciphers/cipher_rc4.h similarity index 93% rename from providers/default/ciphers/cipher_rc4.h rename to providers/implementations/ciphers/cipher_rc4.h index df61f7c265b..a2d0a50f219 100644 --- a/providers/default/ciphers/cipher_rc4.h +++ b/providers/implementations/ciphers/cipher_rc4.h @@ -8,7 +8,7 @@ */ #include -#include "internal/ciphers/ciphercommon.h" +#include "prov/ciphercommon.h" typedef struct prov_rc4_ctx_st { PROV_CIPHER_CTX base; /* Must be first */ diff --git a/providers/default/ciphers/cipher_rc4_hw.c b/providers/implementations/ciphers/cipher_rc4_hw.c similarity index 100% rename from providers/default/ciphers/cipher_rc4_hw.c rename to providers/implementations/ciphers/cipher_rc4_hw.c diff --git a/providers/default/ciphers/cipher_rc5.c b/providers/implementations/ciphers/cipher_rc5.c similarity index 100% rename from providers/default/ciphers/cipher_rc5.c rename to providers/implementations/ciphers/cipher_rc5.c diff --git a/providers/default/ciphers/cipher_rc5.h b/providers/implementations/ciphers/cipher_rc5.h similarity index 95% rename from providers/default/ciphers/cipher_rc5.h rename to providers/implementations/ciphers/cipher_rc5.h index c415e18c599..fe0d09f710b 100644 --- a/providers/default/ciphers/cipher_rc5.h +++ b/providers/implementations/ciphers/cipher_rc5.h @@ -8,7 +8,7 @@ */ #include -#include "internal/ciphers/ciphercommon.h" +#include "prov/ciphercommon.h" typedef struct prov_blowfish_ctx_st { PROV_CIPHER_CTX base; /* Must be first */ diff --git a/providers/default/ciphers/cipher_rc5_hw.c b/providers/implementations/ciphers/cipher_rc5_hw.c similarity index 100% rename from providers/default/ciphers/cipher_rc5_hw.c rename to providers/implementations/ciphers/cipher_rc5_hw.c diff --git a/providers/default/ciphers/cipher_seed.c b/providers/implementations/ciphers/cipher_seed.c similarity index 100% rename from providers/default/ciphers/cipher_seed.c rename to providers/implementations/ciphers/cipher_seed.c diff --git a/providers/default/ciphers/cipher_seed.h b/providers/implementations/ciphers/cipher_seed.h similarity index 94% rename from providers/default/ciphers/cipher_seed.h rename to providers/implementations/ciphers/cipher_seed.h index 093cd3bb5d3..976af35005e 100644 --- a/providers/default/ciphers/cipher_seed.h +++ b/providers/implementations/ciphers/cipher_seed.h @@ -8,7 +8,7 @@ */ #include -#include "internal/ciphers/ciphercommon.h" +#include "prov/ciphercommon.h" typedef struct prov_seed_ctx_st { PROV_CIPHER_CTX base; /* Must be first */ diff --git a/providers/default/ciphers/cipher_seed_hw.c b/providers/implementations/ciphers/cipher_seed_hw.c similarity index 100% rename from providers/default/ciphers/cipher_seed_hw.c rename to providers/implementations/ciphers/cipher_seed_hw.c diff --git a/providers/default/ciphers/cipher_sm4.c b/providers/implementations/ciphers/cipher_sm4.c similarity index 100% rename from providers/default/ciphers/cipher_sm4.c rename to providers/implementations/ciphers/cipher_sm4.c diff --git a/providers/default/ciphers/cipher_sm4.h b/providers/implementations/ciphers/cipher_sm4.h similarity index 95% rename from providers/default/ciphers/cipher_sm4.h rename to providers/implementations/ciphers/cipher_sm4.h index 4740bb33559..d5c9633552a 100644 --- a/providers/default/ciphers/cipher_sm4.h +++ b/providers/implementations/ciphers/cipher_sm4.h @@ -7,7 +7,7 @@ * https://www.openssl.org/source/license.html */ -#include "internal/ciphers/ciphercommon.h" +#include "prov/ciphercommon.h" #include "crypto/sm4.h" typedef struct prov_cast_ctx_st { diff --git a/providers/default/ciphers/cipher_sm4_hw.c b/providers/implementations/ciphers/cipher_sm4_hw.c similarity index 100% rename from providers/default/ciphers/cipher_sm4_hw.c rename to providers/implementations/ciphers/cipher_sm4_hw.c diff --git a/providers/common/ciphers/cipher_tdes.c b/providers/implementations/ciphers/cipher_tdes.c similarity index 97% rename from providers/common/ciphers/cipher_tdes.c rename to providers/implementations/ciphers/cipher_tdes.c index e5fa16358ce..9c032902e94 100644 --- a/providers/common/ciphers/cipher_tdes.c +++ b/providers/implementations/ciphers/cipher_tdes.c @@ -7,8 +7,8 @@ * https://www.openssl.org/source/license.html */ -#include "cipher_local.h" -#include "internal/ciphers/cipher_tdes.h" +#include "prov/ciphercommon.h" +#include "cipher_tdes.h" #include "crypto/rand.h" #include "internal/provider_algs.h" #include "internal/providercommonerr.h" diff --git a/providers/common/include/internal/ciphers/cipher_tdes.h b/providers/implementations/ciphers/cipher_tdes.h similarity index 100% rename from providers/common/include/internal/ciphers/cipher_tdes.h rename to providers/implementations/ciphers/cipher_tdes.h diff --git a/providers/default/ciphers/cipher_tdes_default.c b/providers/implementations/ciphers/cipher_tdes_default.c similarity index 100% rename from providers/default/ciphers/cipher_tdes_default.c rename to providers/implementations/ciphers/cipher_tdes_default.c diff --git a/providers/default/ciphers/cipher_tdes_default.h b/providers/implementations/ciphers/cipher_tdes_default.h similarity index 91% rename from providers/default/ciphers/cipher_tdes_default.h rename to providers/implementations/ciphers/cipher_tdes_default.h index c8099937953..0bc499fc86b 100644 --- a/providers/default/ciphers/cipher_tdes_default.h +++ b/providers/implementations/ciphers/cipher_tdes_default.h @@ -7,8 +7,8 @@ * https://www.openssl.org/source/license.html */ -#include "internal/ciphers/ciphercommon.h" -#include "internal/ciphers/cipher_tdes.h" +#include "prov/ciphercommon.h" +#include "cipher_tdes.h" const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede3_ofb(void); const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede3_cfb(void); diff --git a/providers/default/ciphers/cipher_tdes_default_hw.c b/providers/implementations/ciphers/cipher_tdes_default_hw.c similarity index 100% rename from providers/default/ciphers/cipher_tdes_default_hw.c rename to providers/implementations/ciphers/cipher_tdes_default_hw.c diff --git a/providers/common/ciphers/cipher_tdes_hw.c b/providers/implementations/ciphers/cipher_tdes_hw.c similarity index 97% rename from providers/common/ciphers/cipher_tdes_hw.c rename to providers/implementations/ciphers/cipher_tdes_hw.c index 10ba5a24dab..208e83df0f4 100644 --- a/providers/common/ciphers/cipher_tdes_hw.c +++ b/providers/implementations/ciphers/cipher_tdes_hw.c @@ -7,8 +7,8 @@ * https://www.openssl.org/source/license.html */ -#include "cipher_local.h" -#include "internal/ciphers/cipher_tdes.h" +#include "prov/ciphercommon.h" +#include "cipher_tdes.h" #define ks1 tks.ks[0] #define ks2 tks.ks[1] diff --git a/providers/default/ciphers/cipher_tdes_wrap.c b/providers/implementations/ciphers/cipher_tdes_wrap.c similarity index 100% rename from providers/default/ciphers/cipher_tdes_wrap.c rename to providers/implementations/ciphers/cipher_tdes_wrap.c diff --git a/providers/default/ciphers/cipher_tdes_wrap_hw.c b/providers/implementations/ciphers/cipher_tdes_wrap_hw.c similarity index 100% rename from providers/default/ciphers/cipher_tdes_wrap_hw.c rename to providers/implementations/ciphers/cipher_tdes_wrap_hw.c