Providers: move all ciphers
authorRichard Levitte <levitte@openssl.org>
Fri, 4 Oct 2019 12:44:42 +0000 (14:44 +0200)
committerRichard Levitte <levitte@openssl.org>
Thu, 10 Oct 2019 12:12:15 +0000 (14:12 +0200)
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 <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10088)

88 files changed:
providers/common/ciphers/build.info
providers/common/ciphers/cipher_ccm.c
providers/common/ciphers/cipher_ccm_hw.c
providers/common/ciphers/cipher_common_hw.c
providers/common/ciphers/cipher_gcm.c
providers/common/ciphers/cipher_gcm_hw.c
providers/common/ciphers/cipher_local.h
providers/common/include/prov/cipher_aead.h [moved from providers/common/include/internal/ciphers/cipher_aead.h with 100% similarity]
providers/common/include/prov/cipher_ccm.h [moved from providers/common/include/internal/ciphers/cipher_ccm.h with 100% similarity]
providers/common/include/prov/cipher_gcm.h [moved from providers/common/include/internal/ciphers/cipher_gcm.h with 100% similarity]
providers/common/include/prov/ciphercommon.h [moved from providers/common/include/internal/ciphers/ciphercommon.h with 100% similarity]
providers/default/build.info
providers/implementations/build.info
providers/implementations/ciphers/build.info [new file with mode: 0644]
providers/implementations/ciphers/cipher_aes.c [moved from providers/common/ciphers/cipher_aes.c with 100% similarity]
providers/implementations/ciphers/cipher_aes.h [moved from providers/common/ciphers/cipher_aes.h with 98% similarity]
providers/implementations/ciphers/cipher_aes_ccm.c [moved from providers/common/ciphers/cipher_aes_ccm.c with 94% similarity]
providers/implementations/ciphers/cipher_aes_ccm_hw.c [moved from providers/common/ciphers/cipher_aes_ccm_hw.c with 96% similarity]
providers/implementations/ciphers/cipher_aes_ccm_hw_aesni.inc [moved from providers/common/ciphers/cipher_aes_ccm_hw_aesni.inc with 100% similarity]
providers/implementations/ciphers/cipher_aes_ccm_hw_s390x.inc [moved from providers/common/ciphers/cipher_aes_ccm_hw_s390x.inc with 100% similarity]
providers/implementations/ciphers/cipher_aes_ccm_hw_t4.inc [moved from providers/common/ciphers/cipher_aes_ccm_hw_t4.inc with 100% similarity]
providers/implementations/ciphers/cipher_aes_gcm.c [moved from providers/common/ciphers/cipher_aes_gcm.c with 94% similarity]
providers/implementations/ciphers/cipher_aes_gcm_hw.c [moved from providers/common/ciphers/cipher_aes_gcm_hw.c with 96% similarity]
providers/implementations/ciphers/cipher_aes_gcm_hw_aesni.inc [moved from providers/common/ciphers/cipher_aes_gcm_hw_aesni.inc with 100% similarity]
providers/implementations/ciphers/cipher_aes_gcm_hw_s390x.inc [moved from providers/common/ciphers/cipher_aes_gcm_hw_s390x.inc with 100% similarity]
providers/implementations/ciphers/cipher_aes_gcm_hw_t4.inc [moved from providers/common/ciphers/cipher_aes_gcm_hw_t4.inc with 100% similarity]
providers/implementations/ciphers/cipher_aes_hw.c [moved from providers/common/ciphers/cipher_aes_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_aes_hw_aesni.inc [moved from providers/common/ciphers/cipher_aes_hw_aesni.inc with 100% similarity]
providers/implementations/ciphers/cipher_aes_hw_s390x.inc [moved from providers/common/ciphers/cipher_aes_hw_s390x.inc with 100% similarity]
providers/implementations/ciphers/cipher_aes_hw_t4.inc [moved from providers/common/ciphers/cipher_aes_hw_t4.inc with 100% similarity]
providers/implementations/ciphers/cipher_aes_ocb.c [moved from providers/default/ciphers/cipher_aes_ocb.c with 99% similarity]
providers/implementations/ciphers/cipher_aes_ocb.h [moved from providers/default/ciphers/cipher_aes_ocb.h with 96% similarity]
providers/implementations/ciphers/cipher_aes_ocb_hw.c [moved from providers/default/ciphers/cipher_aes_ocb_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_aes_wrp.c [moved from providers/common/ciphers/cipher_aes_wrp.c with 100% similarity]
providers/implementations/ciphers/cipher_aes_xts.c [moved from providers/common/ciphers/cipher_aes_xts.c with 100% similarity]
providers/implementations/ciphers/cipher_aes_xts.h [moved from providers/common/ciphers/cipher_aes_xts.h with 96% similarity]
providers/implementations/ciphers/cipher_aes_xts_fips.c [moved from providers/common/ciphers/cipher_fips.c with 100% similarity]
providers/implementations/ciphers/cipher_aes_xts_hw.c [moved from providers/common/ciphers/cipher_aes_xts_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_aria.c [moved from providers/default/ciphers/cipher_aria.c with 100% similarity]
providers/implementations/ciphers/cipher_aria.h [moved from providers/default/ciphers/cipher_aria.h with 96% similarity]
providers/implementations/ciphers/cipher_aria_ccm.c [moved from providers/default/ciphers/cipher_aria_ccm.c with 100% similarity]
providers/implementations/ciphers/cipher_aria_ccm.h [moved from providers/default/ciphers/cipher_aria_ccm.h with 88% similarity]
providers/implementations/ciphers/cipher_aria_ccm_hw.c [moved from providers/default/ciphers/cipher_aria_ccm_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_aria_gcm.c [moved from providers/default/ciphers/cipher_aria_gcm.c with 100% similarity]
providers/implementations/ciphers/cipher_aria_gcm.h [moved from providers/default/ciphers/cipher_aria_gcm.h with 87% similarity]
providers/implementations/ciphers/cipher_aria_gcm_hw.c [moved from providers/default/ciphers/cipher_aria_gcm_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_aria_hw.c [moved from providers/default/ciphers/cipher_aria_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_blowfish.c [moved from providers/default/ciphers/cipher_blowfish.c with 100% similarity]
providers/implementations/ciphers/cipher_blowfish.h [moved from providers/default/ciphers/cipher_blowfish.h with 94% similarity]
providers/implementations/ciphers/cipher_blowfish_hw.c [moved from providers/default/ciphers/cipher_blowfish_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_camellia.c [moved from providers/default/ciphers/cipher_camellia.c with 100% similarity]
providers/implementations/ciphers/cipher_camellia.h [moved from providers/default/ciphers/cipher_camellia.h with 96% similarity]
providers/implementations/ciphers/cipher_camellia_hw.c [moved from providers/default/ciphers/cipher_camellia_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_camellia_hw_t4.inc [moved from providers/default/ciphers/cipher_camellia_hw_t4.inc with 100% similarity]
providers/implementations/ciphers/cipher_cast.h [moved from providers/default/ciphers/cipher_cast.h with 94% similarity]
providers/implementations/ciphers/cipher_cast5.c [moved from providers/default/ciphers/cipher_cast5.c with 100% similarity]
providers/implementations/ciphers/cipher_cast5_hw.c [moved from providers/default/ciphers/cipher_cast5_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_des.c [moved from providers/default/ciphers/cipher_des.c with 99% similarity]
providers/implementations/ciphers/cipher_des.h [moved from providers/default/ciphers/cipher_des.h with 100% similarity]
providers/implementations/ciphers/cipher_des_hw.c [moved from providers/default/ciphers/cipher_des_hw.c with 99% similarity]
providers/implementations/ciphers/cipher_desx.c [moved from providers/default/ciphers/cipher_desx.c with 100% similarity]
providers/implementations/ciphers/cipher_desx_hw.c [moved from providers/default/ciphers/cipher_desx_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_idea.c [moved from providers/default/ciphers/cipher_idea.c with 100% similarity]
providers/implementations/ciphers/cipher_idea.h [moved from providers/default/ciphers/cipher_idea.h with 94% similarity]
providers/implementations/ciphers/cipher_idea_hw.c [moved from providers/default/ciphers/cipher_idea_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_rc2.c [moved from providers/default/ciphers/cipher_rc2.c with 100% similarity]
providers/implementations/ciphers/cipher_rc2.h [moved from providers/default/ciphers/cipher_rc2.h with 95% similarity]
providers/implementations/ciphers/cipher_rc2_hw.c [moved from providers/default/ciphers/cipher_rc2_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_rc4.c [moved from providers/default/ciphers/cipher_rc4.c with 100% similarity]
providers/implementations/ciphers/cipher_rc4.h [moved from providers/default/ciphers/cipher_rc4.h with 93% similarity]
providers/implementations/ciphers/cipher_rc4_hw.c [moved from providers/default/ciphers/cipher_rc4_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_rc5.c [moved from providers/default/ciphers/cipher_rc5.c with 100% similarity]
providers/implementations/ciphers/cipher_rc5.h [moved from providers/default/ciphers/cipher_rc5.h with 95% similarity]
providers/implementations/ciphers/cipher_rc5_hw.c [moved from providers/default/ciphers/cipher_rc5_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_seed.c [moved from providers/default/ciphers/cipher_seed.c with 100% similarity]
providers/implementations/ciphers/cipher_seed.h [moved from providers/default/ciphers/cipher_seed.h with 94% similarity]
providers/implementations/ciphers/cipher_seed_hw.c [moved from providers/default/ciphers/cipher_seed_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_sm4.c [moved from providers/default/ciphers/cipher_sm4.c with 100% similarity]
providers/implementations/ciphers/cipher_sm4.h [moved from providers/default/ciphers/cipher_sm4.h with 95% similarity]
providers/implementations/ciphers/cipher_sm4_hw.c [moved from providers/default/ciphers/cipher_sm4_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_tdes.c [moved from providers/common/ciphers/cipher_tdes.c with 97% similarity]
providers/implementations/ciphers/cipher_tdes.h [moved from providers/common/include/internal/ciphers/cipher_tdes.h with 100% similarity]
providers/implementations/ciphers/cipher_tdes_default.c [moved from providers/default/ciphers/cipher_tdes_default.c with 100% similarity]
providers/implementations/ciphers/cipher_tdes_default.h [moved from providers/default/ciphers/cipher_tdes_default.h with 91% similarity]
providers/implementations/ciphers/cipher_tdes_default_hw.c [moved from providers/default/ciphers/cipher_tdes_default_hw.c with 100% similarity]
providers/implementations/ciphers/cipher_tdes_hw.c [moved from providers/common/ciphers/cipher_tdes_hw.c with 97% similarity]
providers/implementations/ciphers/cipher_tdes_wrap.c [moved from providers/default/ciphers/cipher_tdes_wrap.c with 100% similarity]
providers/implementations/ciphers/cipher_tdes_wrap_hw.c [moved from providers/default/ciphers/cipher_tdes_wrap_hw.c with 100% similarity]

index 77376cce1e4d8632116cecd7463a66a1ec4d0fde..b76b8ba10af1986e9b44cd50dc88ac2398ba234b 100644 (file)
@@ -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
index 3fbaef9a466fcc5306a7fa57ac5016645a1a2a67..60fade83e0148ac47efe118e656fd30abb3f8f92 100644 (file)
@@ -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,
index b093b768e72b714c6db7e14debae66d4cdb5382b..5503a41687c94c152a9f8efa099e55b4ab0d34d1 100644 (file)
@@ -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)
index 6f1b4babd872ed7fce0d0e28fd1d27070f1b71d9..f1c466edc8faa7b5ad714221b0da7f2c5354974f 100644 (file)
@@ -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.
index 59368dc81e513fbd3fe3dfc7bacb2eba7d11ddf3..72d17d00733d9a596c731a974d4d818c6f397148 100644 (file)
@@ -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"
index 1d9c3ea49cada18ee8d02f7330d27c72da1e1da4..09e3c2740086d43a036ee437e597bb1579ac16e0 100644 (file)
@@ -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)
index 898c99b1d3e7299e6d3eaf2c01cca2b8dddac387..1c4716f357ff973052e4f48c408365e12e750e1f 100644 (file)
@@ -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);
index 9a9760b7999824972016546cb6dfb49cd1d80bf5..139590ae457bef425547485a14326a79e1b90721 100644 (file)
@@ -1,4 +1,2 @@
-SUBDIRS=ciphers
 $GOAL=../../libcrypto
 SOURCE[$GOAL]=defltprov.c
-INCLUDE[$GOAL]=include
index 86c581d7f740b4adcc64c8048d1053ea0afa154d..0fc08220748f4eb0063f7ee361b0369852ba9994 100644 (file)
@@ -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 (file)
index 0000000..fb2b53e
--- /dev/null
@@ -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
similarity index 98%
rename from providers/common/ciphers/cipher_aes.h
rename to providers/implementations/ciphers/cipher_aes.h
index 741b20f6e3af18db7cf223a126ace3f412b5e1c6..d00fab13efd409ccf846a34c0fc8a6cea4dd4476 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/aes.h>
-#include "internal/ciphers/ciphercommon.h"
+#include "prov/ciphercommon.h"
 
 typedef struct prov_aes_ctx_st {
     PROV_CIPHER_CTX base;      /* Must be first */
similarity index 94%
rename from providers/common/ciphers/cipher_aes_ccm.c
rename to providers/implementations/ciphers/cipher_aes_ccm.c
index cffca06c80c6f5bdf5aeb754c28d7a39366e5532..59fc7274c9d6836ed9a07401c6a19ed4a73c79e8 100644 (file)
@@ -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)
similarity index 96%
rename from providers/common/ciphers/cipher_aes_ccm_hw.c
rename to providers/implementations/ciphers/cipher_aes_ccm_hw.c
index ba7ce4dcab16e8fe59eef3493123660754549584..ae200ebada6bb6bcc60734d280e5dcb679726d32 100644 (file)
@@ -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);                         \
similarity index 94%
rename from providers/common/ciphers/cipher_aes_gcm.c
rename to providers/implementations/ciphers/cipher_aes_gcm.c
index ef015bff21544ea5b6cef44ff2a869e945fd0d06..1df1c1dba9a0d7707cfd195aa8d476aa5a4031b6 100644 (file)
@@ -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)
similarity index 96%
rename from providers/common/ciphers/cipher_aes_gcm_hw.c
rename to providers/implementations/ciphers/cipher_aes_gcm_hw.c
index 5263bdd6dd46e44d961f6d43b52e0a3e8196e143..f5dc0c4eed37ecec1617d9d3b85d1bf1d04ce692 100644 (file)
@@ -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)
similarity index 99%
rename from providers/default/ciphers/cipher_aes_ocb.c
rename to providers/implementations/ciphers/cipher_aes_ocb.c
index 95c0658fee88fe6f6b97b87637ff2f4d9fa466ac..5ab0b8fd1502b72f1a2b3c5818b6b14c54889c26 100644 (file)
@@ -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
similarity index 96%
rename from providers/default/ciphers/cipher_aes_ocb.h
rename to providers/implementations/ciphers/cipher_aes_ocb.h
index 7750e976154d2ddfd8892e0c975c06e70d0c4ecb..ba515241e222adc8f46131b65cb456f2498b7660 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/aes.h>
-#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
similarity index 96%
rename from providers/common/ciphers/cipher_aes_xts.h
rename to providers/implementations/ciphers/cipher_aes_xts.h
index 16fb8c34cde4ee5fb2b9bed625b7c8dbfc818463..615ee6190592ef4b8623785dc2e7c2df0f6135a7 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/aes.h>
-#include "internal/ciphers/ciphercommon.h"
+#include "prov/ciphercommon.h"
 
 /*
  * Available in cipher_fips.c, and compiled with different values depending
similarity index 96%
rename from providers/default/ciphers/cipher_aria.h
rename to providers/implementations/ciphers/cipher_aria.h
index e95e4ca93c7bfad2c99026b9d324e37113d96085..282408c58edb0a1fcb8b07c9553684c77ab17991 100644 (file)
@@ -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 */
similarity index 88%
rename from providers/default/ciphers/cipher_aria_ccm.h
rename to providers/implementations/ciphers/cipher_aria_ccm.h
index fe0a3908bc02686a3b64ff539bbafeb36694cff7..301ce14306b31684a05f31e298429fbea0dcf4fd 100644 (file)
@@ -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 */
similarity index 87%
rename from providers/default/ciphers/cipher_aria_gcm.h
rename to providers/implementations/ciphers/cipher_aria_gcm.h
index ac5c248201b3529c8c1f62828cac52c20e087ef3..13fbe175d93ae43b22ddecc16b817a8da2b51c9e 100644 (file)
@@ -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 */
similarity index 94%
rename from providers/default/ciphers/cipher_blowfish.h
rename to providers/implementations/ciphers/cipher_blowfish.h
index 819a61f140ff9e4c7371d0244fe4d730790a564b..2d66d1bc0e3cbbbe78ba8a92638d47e428fe79ba 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/blowfish.h>
-#include "internal/ciphers/ciphercommon.h"
+#include "prov/ciphercommon.h"
 
 typedef struct prov_blowfish_ctx_st {
     PROV_CIPHER_CTX base;      /* Must be first */
similarity index 96%
rename from providers/default/ciphers/cipher_camellia.h
rename to providers/implementations/ciphers/cipher_camellia.h
index 521c03e26131616b5c89eafefd09d1e3b07c5d86..58636f1d3239a4af6c66f1cbfb75e2957548388c 100644 (file)
@@ -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 */
similarity index 94%
rename from providers/default/ciphers/cipher_cast.h
rename to providers/implementations/ciphers/cipher_cast.h
index 279f92216f20adeaf468f3aa8c781aa983abffe8..218f5c4fb5483f72556f45ac556be842f3fb9055 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/cast.h>
-#include "internal/ciphers/ciphercommon.h"
+#include "prov/ciphercommon.h"
 
 typedef struct prov_cast_ctx_st {
     PROV_CIPHER_CTX base;      /* Must be first */
similarity index 99%
rename from providers/default/ciphers/cipher_des.c
rename to providers/implementations/ciphers/cipher_des.c
index 4530114187a6979be86409f2e5b1f40b9c80d95d..5781aa47063a4d86ed43113a2e5269e3732f9b80 100644 (file)
@@ -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"
similarity index 99%
rename from providers/default/ciphers/cipher_des_hw.c
rename to providers/implementations/ciphers/cipher_des_hw.c
index 78107062a56b49279b9028f2b9d553df21ea2fd7..c3a67080fd144a5f01b93d6cc067a33ac5a7de3b 100644 (file)
@@ -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,
similarity index 94%
rename from providers/default/ciphers/cipher_idea.h
rename to providers/implementations/ciphers/cipher_idea.h
index 8e096bfe9f18a0a40b7e5cd56eb69675cbcd102d..ebe590b93c4f580667b72a04338deda1a5c88485 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/idea.h>
-#include "internal/ciphers/ciphercommon.h"
+#include "prov/ciphercommon.h"
 
 typedef struct prov_idea_ctx_st {
     PROV_CIPHER_CTX base;      /* Must be first */
similarity index 95%
rename from providers/default/ciphers/cipher_rc2.h
rename to providers/implementations/ciphers/cipher_rc2.h
index 7a7928925bda1a5f290b115c1d28ff1f04914238..82f0f6ca74e30fb110dcfa33061911212000d829 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/rc2.h>
-#include "internal/ciphers/ciphercommon.h"
+#include "prov/ciphercommon.h"
 
 typedef struct prov_rc2_ctx_st {
     PROV_CIPHER_CTX base;      /* Must be first */
similarity index 93%
rename from providers/default/ciphers/cipher_rc4.h
rename to providers/implementations/ciphers/cipher_rc4.h
index df61f7c265be4c0337a729e5625a0691b76c76db..a2d0a50f219961de198cf3a7b8e6b77c2d737be6 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/rc4.h>
-#include "internal/ciphers/ciphercommon.h"
+#include "prov/ciphercommon.h"
 
 typedef struct prov_rc4_ctx_st {
     PROV_CIPHER_CTX base;      /* Must be first */
similarity index 95%
rename from providers/default/ciphers/cipher_rc5.h
rename to providers/implementations/ciphers/cipher_rc5.h
index c415e18c599d86f1fce53d1ad20011ae8430d05b..fe0d09f710b8132f4b0eceff84d77d02533c8527 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/rc5.h>
-#include "internal/ciphers/ciphercommon.h"
+#include "prov/ciphercommon.h"
 
 typedef struct prov_blowfish_ctx_st {
     PROV_CIPHER_CTX base;      /* Must be first */
similarity index 94%
rename from providers/default/ciphers/cipher_seed.h
rename to providers/implementations/ciphers/cipher_seed.h
index 093cd3bb5d3085c6e36d1a27382ec3b061cbd84a..976af35005e84788b6f59b07386a6a7a216d1c5d 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/seed.h>
-#include "internal/ciphers/ciphercommon.h"
+#include "prov/ciphercommon.h"
 
 typedef struct prov_seed_ctx_st {
     PROV_CIPHER_CTX base;      /* Must be first */
similarity index 95%
rename from providers/default/ciphers/cipher_sm4.h
rename to providers/implementations/ciphers/cipher_sm4.h
index 4740bb33559f9734728ae05104ec32a6f7f50415..d5c9633552a176ff6c53006173fb053f69531403 100644 (file)
@@ -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 {
similarity index 97%
rename from providers/common/ciphers/cipher_tdes.c
rename to providers/implementations/ciphers/cipher_tdes.c
index e5fa16358ce11955f77c5d8ff65a1d062510d77d..9c032902e943ceafb6407918653ed4a82bdba5c3 100644 (file)
@@ -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"
similarity index 91%
rename from providers/default/ciphers/cipher_tdes_default.h
rename to providers/implementations/ciphers/cipher_tdes_default.h
index c809993795389bb38f2cc4d8983671a49652d9c6..0bc499fc86b92ba3d73037942376908f07162c51 100644 (file)
@@ -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);
similarity index 97%
rename from providers/common/ciphers/cipher_tdes_hw.c
rename to providers/implementations/ciphers/cipher_tdes_hw.c
index 10ba5a24dab7d2de9898338c33881991b231c0b9..208e83df0f4ab540e43eb896f4585e509bd5e456 100644 (file)
@@ -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]