[openssl] master update

Dr. Paul Dale pauli at openssl.org
Tue Sep 29 06:33:59 UTC 2020


The branch master has been updated
       via  7d6766cb537e5cebc99e200bc537f744878a87a4 (commit)
      from  1be63951f87dfcbc98efe5d94a15298fea885890 (commit)


- Log -----------------------------------------------------------------
commit 7d6766cb537e5cebc99e200bc537f744878a87a4
Author: Pauli <paul.dale at oracle.com>
Date:   Mon Sep 28 12:47:04 2020 +1000

    prov: prefix provider internal functions with ossl_
    
    Also convert the names to lower case.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/13014)

-----------------------------------------------------------------------

Summary of changes:
 providers/baseprov.c                               | 15 ++++++------
 providers/common/bio_prov.c                        |  2 +-
 providers/common/include/prov/provider_ctx.h       | 18 +++++++-------
 providers/common/provider_ctx.c                    | 16 ++++++-------
 providers/defltprov.c                              | 15 ++++++------
 providers/fips/fipsprov.c                          | 22 +++++++++--------
 providers/fips/self_test_kats.c                    |  8 +++++--
 providers/implementations/ciphers/cipher_aes.h     | 18 +++++++-------
 .../ciphers/cipher_aes_cbc_hmac_sha.c              |  4 ++--
 .../ciphers/cipher_aes_cbc_hmac_sha.h              |  4 ++--
 .../ciphers/cipher_aes_cbc_hmac_sha1_hw.c          |  4 ++--
 .../ciphers/cipher_aes_cbc_hmac_sha256_hw.c        |  4 ++--
 providers/implementations/ciphers/cipher_aes_ccm.c |  2 +-
 providers/implementations/ciphers/cipher_aes_ccm.h |  2 +-
 .../implementations/ciphers/cipher_aes_ccm_hw.c    |  2 +-
 .../ciphers/cipher_aes_ccm_hw_aesni.inc            |  2 +-
 .../ciphers/cipher_aes_ccm_hw_s390x.inc            |  2 +-
 .../ciphers/cipher_aes_ccm_hw_t4.inc               |  2 +-
 providers/implementations/ciphers/cipher_aes_gcm.c |  2 +-
 providers/implementations/ciphers/cipher_aes_gcm.h |  2 +-
 .../implementations/ciphers/cipher_aes_gcm_hw.c    |  2 +-
 .../ciphers/cipher_aes_gcm_hw_aesni.inc            |  2 +-
 .../ciphers/cipher_aes_gcm_hw_armv8.inc            |  2 +-
 .../ciphers/cipher_aes_gcm_hw_s390x.inc            |  2 +-
 .../ciphers/cipher_aes_gcm_hw_t4.inc               |  2 +-
 providers/implementations/ciphers/cipher_aes_hw.c  |  2 +-
 providers/implementations/ciphers/cipher_aes_ocb.c |  2 +-
 providers/implementations/ciphers/cipher_aes_ocb.h |  2 +-
 .../implementations/ciphers/cipher_aes_ocb_hw.c    |  2 +-
 providers/implementations/ciphers/cipher_aes_siv.c |  2 +-
 providers/implementations/ciphers/cipher_aes_siv.h |  2 +-
 .../implementations/ciphers/cipher_aes_siv_hw.c    |  2 +-
 providers/implementations/ciphers/cipher_aes_xts.c |  2 +-
 providers/implementations/ciphers/cipher_aes_xts.h |  2 +-
 .../implementations/ciphers/cipher_aes_xts_hw.c    |  2 +-
 providers/implementations/ciphers/cipher_aria.h    | 18 +++++++-------
 .../implementations/ciphers/cipher_aria_ccm.c      |  2 +-
 .../implementations/ciphers/cipher_aria_ccm.h      |  2 +-
 .../implementations/ciphers/cipher_aria_ccm_hw.c   |  2 +-
 .../implementations/ciphers/cipher_aria_gcm.c      |  4 ++--
 .../implementations/ciphers/cipher_aria_gcm.h      |  2 +-
 .../implementations/ciphers/cipher_aria_gcm_hw.c   |  2 +-
 providers/implementations/ciphers/cipher_aria_hw.c |  2 +-
 .../implementations/ciphers/cipher_blowfish.h      |  8 +++----
 .../implementations/ciphers/cipher_blowfish_hw.c   |  2 +-
 .../implementations/ciphers/cipher_camellia.h      | 18 +++++++-------
 .../implementations/ciphers/cipher_camellia_hw.c   |  2 +-
 providers/implementations/ciphers/cipher_cast.h    |  8 +++----
 .../implementations/ciphers/cipher_cast5_hw.c      |  2 +-
 .../implementations/ciphers/cipher_chacha20.c      |  2 +-
 .../implementations/ciphers/cipher_chacha20.h      |  2 +-
 .../implementations/ciphers/cipher_chacha20_hw.c   |  2 +-
 .../ciphers/cipher_chacha20_poly1305.c             |  4 ++--
 .../ciphers/cipher_chacha20_poly1305.h             |  2 +-
 .../ciphers/cipher_chacha20_poly1305_hw.c          |  2 +-
 providers/implementations/ciphers/cipher_desx_hw.c |  3 ++-
 providers/implementations/ciphers/cipher_idea.h    |  8 +++----
 providers/implementations/ciphers/cipher_idea_hw.c |  2 +-
 providers/implementations/ciphers/cipher_rc2.c     |  3 ++-
 providers/implementations/ciphers/cipher_rc2.h     | 12 +++++-----
 providers/implementations/ciphers/cipher_rc2_hw.c  |  2 +-
 providers/implementations/ciphers/cipher_rc4.c     |  2 +-
 providers/implementations/ciphers/cipher_rc4.h     |  2 +-
 .../implementations/ciphers/cipher_rc4_hmac_md5.c  |  2 +-
 .../implementations/ciphers/cipher_rc4_hmac_md5.h  |  2 +-
 .../ciphers/cipher_rc4_hmac_md5_hw.c               |  3 ++-
 providers/implementations/ciphers/cipher_rc4_hw.c  |  2 +-
 providers/implementations/ciphers/cipher_rc5.c     |  3 ++-
 providers/implementations/ciphers/cipher_rc5.h     |  8 +++----
 providers/implementations/ciphers/cipher_rc5_hw.c  |  2 +-
 providers/implementations/ciphers/cipher_seed.h    |  8 +++----
 providers/implementations/ciphers/cipher_seed_hw.c |  2 +-
 providers/implementations/ciphers/cipher_sm4.h     | 10 ++++----
 providers/implementations/ciphers/cipher_sm4_hw.c  |  2 +-
 providers/implementations/ciphers/cipher_tdes.h    |  9 +++----
 .../implementations/ciphers/cipher_tdes_default.h  | 20 ++++++++--------
 .../implementations/ciphers/cipher_tdes_wrap.c     |  2 +-
 .../implementations/encode_decode/encode_key2any.c |  2 +-
 .../implementations/include/prov/ciphercommon.h    |  2 +-
 providers/implementations/rands/drbg.c             | 28 +++++++++++-----------
 providers/implementations/rands/drbg_ctr.c         | 14 +++++------
 providers/implementations/rands/drbg_hash.c        | 14 +++++------
 providers/implementations/rands/drbg_hmac.c        | 14 +++++------
 providers/implementations/rands/drbg_local.h       | 20 ++++++++--------
 providers/implementations/rands/test_rng.c         |  6 ++---
 providers/implementations/storemgmt/file_store.c   |  2 +-
 providers/legacyprov.c                             |  8 +++----
 87 files changed, 248 insertions(+), 235 deletions(-)

diff --git a/providers/baseprov.c b/providers/baseprov.c
index aeb81e27e3..41dc65655e 100644
--- a/providers/baseprov.c
+++ b/providers/baseprov.c
@@ -116,8 +116,8 @@ static const OSSL_ALGORITHM *base_query(void *provctx, int operation_id,
 
 static void base_teardown(void *provctx)
 {
-    BIO_meth_free(PROV_CTX_get0_core_bio_method(provctx));
-    PROV_CTX_free(provctx);
+    BIO_meth_free(ossl_prov_ctx_get0_core_bio_method(provctx));
+    ossl_prov_ctx_free(provctx);
 }
 
 /* Functions we provide to the core */
@@ -169,15 +169,16 @@ int ossl_base_provider_init(const OSSL_CORE_HANDLE *handle,
      * This only works for built-in providers.  Most providers should
      * create their own library context.
      */
-    if ((*provctx = PROV_CTX_new()) == NULL
+    if ((*provctx = ossl_prov_ctx_new()) == NULL
             || (corebiometh = bio_prov_init_bio_method()) == NULL) {
-        PROV_CTX_free(*provctx);
+        ossl_prov_ctx_free(*provctx);
         *provctx = NULL;
         return 0;
     }
-    PROV_CTX_set0_library_context(*provctx, (OPENSSL_CTX *)c_get_libctx(handle));
-    PROV_CTX_set0_handle(*provctx, handle);
-    PROV_CTX_set0_core_bio_method(*provctx, corebiometh);
+    ossl_prov_ctx_set0_library_context(*provctx,
+                                       (OPENSSL_CTX *)c_get_libctx(handle));
+    ossl_prov_ctx_set0_handle(*provctx, handle);
+    ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);
 
     *out = base_dispatch_table;
 
diff --git a/providers/common/bio_prov.c b/providers/common/bio_prov.c
index c049795cd1..afdeb80d80 100644
--- a/providers/common/bio_prov.c
+++ b/providers/common/bio_prov.c
@@ -213,7 +213,7 @@ BIO_METHOD *bio_prov_init_bio_method(void)
 BIO *bio_new_from_core_bio(PROV_CTX *provctx, OSSL_CORE_BIO *corebio)
 {
     BIO *outbio;
-    BIO_METHOD *corebiometh = PROV_CTX_get0_core_bio_method(provctx);
+    BIO_METHOD *corebiometh = ossl_prov_ctx_get0_core_bio_method(provctx);
 
     if (corebiometh == NULL)
         return NULL;
diff --git a/providers/common/include/prov/provider_ctx.h b/providers/common/include/prov/provider_ctx.h
index a252143e81..c650777280 100644
--- a/providers/common/include/prov/provider_ctx.h
+++ b/providers/common/include/prov/provider_ctx.h
@@ -26,15 +26,15 @@ typedef struct prov_ctx_st {
  * fetching functions.
  */
 # define PROV_LIBRARY_CONTEXT_OF(provctx)        \
-    PROV_CTX_get0_library_context((provctx))
+    ossl_prov_ctx_get0_library_context((provctx))
 
-PROV_CTX *PROV_CTX_new(void);
-void PROV_CTX_free(PROV_CTX *ctx);
-void PROV_CTX_set0_library_context(PROV_CTX *ctx, OPENSSL_CTX *libctx);
-void PROV_CTX_set0_handle(PROV_CTX *ctx, const OSSL_CORE_HANDLE *handle);
-void PROV_CTX_set0_core_bio_method(PROV_CTX *ctx, BIO_METHOD *corebiometh);
-OPENSSL_CTX *PROV_CTX_get0_library_context(PROV_CTX *ctx);
-const OSSL_CORE_HANDLE *PROV_CTX_get0_handle(PROV_CTX *ctx);
-BIO_METHOD *PROV_CTX_get0_core_bio_method(PROV_CTX *ctx);
+PROV_CTX *ossl_prov_ctx_new(void);
+void ossl_prov_ctx_free(PROV_CTX *ctx);
+void ossl_prov_ctx_set0_library_context(PROV_CTX *ctx, OPENSSL_CTX *libctx);
+void ossl_prov_ctx_set0_handle(PROV_CTX *ctx, const OSSL_CORE_HANDLE *handle);
+void ossl_prov_ctx_set0_core_bio_method(PROV_CTX *ctx, BIO_METHOD *corebiometh);
+OPENSSL_CTX *ossl_prov_ctx_get0_library_context(PROV_CTX *ctx);
+const OSSL_CORE_HANDLE *ossl_prov_ctx_get0_handle(PROV_CTX *ctx);
+BIO_METHOD *ossl_prov_ctx_get0_core_bio_method(PROV_CTX *ctx);
 
 #endif
diff --git a/providers/common/provider_ctx.c b/providers/common/provider_ctx.c
index 04cca1f23e..6d81c20981 100644
--- a/providers/common/provider_ctx.c
+++ b/providers/common/provider_ctx.c
@@ -11,49 +11,49 @@
 #include "prov/provider_ctx.h"
 #include "prov/bio.h"
 
-PROV_CTX *PROV_CTX_new(void)
+PROV_CTX *ossl_prov_ctx_new(void)
 {
     return OPENSSL_zalloc(sizeof(PROV_CTX));
 }
 
-void PROV_CTX_free(PROV_CTX *ctx)
+void ossl_prov_ctx_free(PROV_CTX *ctx)
 {
     OPENSSL_free(ctx);
 }
 
-void PROV_CTX_set0_library_context(PROV_CTX *ctx, OPENSSL_CTX *libctx)
+void ossl_prov_ctx_set0_library_context(PROV_CTX *ctx, OPENSSL_CTX *libctx)
 {
     if (ctx != NULL)
         ctx->libctx = libctx;
 }
 
-void PROV_CTX_set0_handle(PROV_CTX *ctx, const OSSL_CORE_HANDLE *handle)
+void ossl_prov_ctx_set0_handle(PROV_CTX *ctx, const OSSL_CORE_HANDLE *handle)
 {
     if (ctx != NULL)
         ctx->handle = handle;
 }
 
-void PROV_CTX_set0_core_bio_method(PROV_CTX *ctx, BIO_METHOD *corebiometh)
+void ossl_prov_ctx_set0_core_bio_method(PROV_CTX *ctx, BIO_METHOD *corebiometh)
 {
     if (ctx != NULL)
         ctx->corebiometh = corebiometh;
 }
 
-OPENSSL_CTX *PROV_CTX_get0_library_context(PROV_CTX *ctx)
+OPENSSL_CTX *ossl_prov_ctx_get0_library_context(PROV_CTX *ctx)
 {
     if (ctx == NULL)
         return NULL;
     return ctx->libctx;
 }
 
-const OSSL_CORE_HANDLE *PROV_CTX_get0_handle(PROV_CTX *ctx)
+const OSSL_CORE_HANDLE *ossl_prov_ctx_get0_handle(PROV_CTX *ctx)
 {
     if (ctx == NULL)
         return NULL;
     return ctx->handle;
 }
 
-BIO_METHOD *PROV_CTX_get0_core_bio_method(PROV_CTX *ctx)
+BIO_METHOD *ossl_prov_ctx_get0_core_bio_method(PROV_CTX *ctx)
 {
     if (ctx == NULL)
         return NULL;
diff --git a/providers/defltprov.c b/providers/defltprov.c
index 542e120c8f..06ce516041 100644
--- a/providers/defltprov.c
+++ b/providers/defltprov.c
@@ -502,8 +502,8 @@ static const OSSL_ALGORITHM *deflt_query(void *provctx, int operation_id,
 
 static void deflt_teardown(void *provctx)
 {
-    BIO_meth_free(PROV_CTX_get0_core_bio_method(provctx));
-    PROV_CTX_free(provctx);
+    BIO_meth_free(ossl_prov_ctx_get0_core_bio_method(provctx));
+    ossl_prov_ctx_free(provctx);
 }
 
 /* Functions we provide to the core */
@@ -556,15 +556,16 @@ int ossl_default_provider_init(const OSSL_CORE_HANDLE *handle,
      * This only works for built-in providers.  Most providers should
      * create their own library context.
      */
-    if ((*provctx = PROV_CTX_new()) == NULL
+    if ((*provctx = ossl_prov_ctx_new()) == NULL
             || (corebiometh = bio_prov_init_bio_method()) == NULL) {
-        PROV_CTX_free(*provctx);
+        ossl_prov_ctx_free(*provctx);
         *provctx = NULL;
         return 0;
     }
-    PROV_CTX_set0_library_context(*provctx, (OPENSSL_CTX *)c_get_libctx(handle));
-    PROV_CTX_set0_handle(*provctx, handle);
-    PROV_CTX_set0_core_bio_method(*provctx, corebiometh);
+    ossl_prov_ctx_set0_library_context(*provctx,
+                                       (OPENSSL_CTX *)c_get_libctx(handle));
+    ossl_prov_ctx_set0_handle(*provctx, handle);
+    ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);
 
     *out = deflt_dispatch_table;
 
diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c
index 3425133c60..1cbe5ed454 100644
--- a/providers/fips/fipsprov.c
+++ b/providers/fips/fipsprov.c
@@ -519,7 +519,8 @@ static const OSSL_ALGORITHM *fips_query(void *provctx, int operation_id,
     case OSSL_OP_DIGEST:
         return fips_digests;
     case OSSL_OP_CIPHER:
-        ossl_prov_cache_exported_algorithms(fips_ciphers, exported_fips_ciphers);
+        ossl_prov_cache_exported_algorithms(fips_ciphers,
+                                            exported_fips_ciphers);
         return exported_fips_ciphers;
     case OSSL_OP_MAC:
         return fips_macs;
@@ -544,7 +545,7 @@ static const OSSL_ALGORITHM *fips_query(void *provctx, int operation_id,
 static void fips_teardown(void *provctx)
 {
     OPENSSL_CTX_free(PROV_LIBRARY_CONTEXT_OF(provctx));
-    PROV_CTX_free(provctx);
+    ossl_prov_ctx_free(provctx);
 }
 
 static void fips_intern_teardown(void *provctx)
@@ -553,7 +554,7 @@ static void fips_intern_teardown(void *provctx)
      * We know that the library context is the same as for the outer provider,
      * so no need to destroy it here.
      */
-    PROV_CTX_free(provctx);
+    ossl_prov_ctx_free(provctx);
 }
 
 /* Functions we provide to the core */
@@ -690,7 +691,7 @@ int OSSL_provider_init(const OSSL_CORE_HANDLE *handle,
         fips_security_checks = 0;
 
     /*  Create a context. */
-    if ((*provctx = PROV_CTX_new()) == NULL
+    if ((*provctx = ossl_prov_ctx_new()) == NULL
         || (libctx = OPENSSL_CTX_new()) == NULL) {
         /*
          * We free libctx separately here and only here because it hasn't
@@ -700,8 +701,8 @@ int OSSL_provider_init(const OSSL_CORE_HANDLE *handle,
         OPENSSL_CTX_free(libctx);
         goto err;
     }
-    PROV_CTX_set0_library_context(*provctx, libctx);
-    PROV_CTX_set0_handle(*provctx, handle);
+    ossl_prov_ctx_set0_library_context(*provctx, libctx);
+    ossl_prov_ctx_set0_handle(*provctx, handle);
 
     if ((fgbl = openssl_ctx_get_data(libctx, OPENSSL_CTX_FIPS_PROV_INDEX,
                                      &fips_prov_ossl_ctx_method)) == NULL)
@@ -754,7 +755,7 @@ int fips_intern_provider_init(const OSSL_CORE_HANDLE *handle,
     if (c_internal_get_libctx == NULL)
         return 0;
 
-    if ((*provctx = PROV_CTX_new()) == NULL)
+    if ((*provctx = ossl_prov_ctx_new()) == NULL)
         return 0;
 
     /*
@@ -762,9 +763,10 @@ int fips_intern_provider_init(const OSSL_CORE_HANDLE *handle,
      * internal provider. This is not something that most providers would be
      * able to do.
      */
-    PROV_CTX_set0_library_context(*provctx,
-                                  (OPENSSL_CTX *)c_internal_get_libctx(handle));
-    PROV_CTX_set0_handle(*provctx, handle);
+    ossl_prov_ctx_set0_library_context(
+        *provctx, (OPENSSL_CTX *)c_internal_get_libctx(handle)
+    );
+    ossl_prov_ctx_set0_handle(*provctx, handle);
 
     *out = intern_dispatch_table;
     return 1;
diff --git a/providers/fips/self_test_kats.c b/providers/fips/self_test_kats.c
index 50a0a69609..5e76a1c84d 100644
--- a/providers/fips/self_test_kats.c
+++ b/providers/fips/self_test_kats.c
@@ -315,7 +315,10 @@ static int self_test_drbg(const ST_KAT_DRBG *t, OSSL_SELF_TEST *st,
     if (!EVP_RAND_set_ctx_params(test, drbg_params))
         goto err;
 
-    /* This calls PROV_DRBG_reseed() internally when prediction_resistance = 1 */
+    /*
+     * This calls ossl_prov_drbg_reseed() internally when
+     * prediction_resistance = 1
+     */
     if (!EVP_RAND_generate(drbg, out, t->expectedlen, strength,
                            prediction_resistance,
                            t->entropyaddin2, t->entropyaddin2len))
@@ -329,7 +332,8 @@ static int self_test_drbg(const ST_KAT_DRBG *t, OSSL_SELF_TEST *st,
     if (!EVP_RAND_uninstantiate(drbg))
         goto err;
     /*
-     * Check that the DRBG data has been zeroized after PROV_DRBG_uninstantiate.
+     * Check that the DRBG data has been zeroized after
+     * ossl_prov_drbg_uninstantiate.
      */
     if (!EVP_RAND_verify_zeroization(drbg))
         goto err;
diff --git a/providers/implementations/ciphers/cipher_aes.h b/providers/implementations/ciphers/cipher_aes.h
index f2ee746295..2fa96582ce 100644
--- a/providers/implementations/ciphers/cipher_aes.h
+++ b/providers/implementations/ciphers/cipher_aes.h
@@ -51,12 +51,12 @@ typedef struct prov_aes_ctx_st {
 
 } PROV_AES_CTX;
 
-#define PROV_CIPHER_HW_aes_ofb PROV_CIPHER_HW_aes_ofb128
-#define PROV_CIPHER_HW_aes_cfb PROV_CIPHER_HW_aes_cfb128
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_ofb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_cfb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_cfb1(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_cfb8(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_ctr(size_t keybits);
+#define ossl_prov_cipher_hw_aes_ofb ossl_prov_cipher_hw_aes_ofb128
+#define ossl_prov_cipher_hw_aes_cfb ossl_prov_cipher_hw_aes_cfb128
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ofb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cfb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cfb1(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cfb8(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ctr(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c
index 1d499d9555..16916fdc47 100644
--- a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c
+++ b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c
@@ -308,7 +308,7 @@ static void *aes_cbc_hmac_sha1_newctx(void *provctx, size_t kbits,
     ctx = OPENSSL_zalloc(sizeof(*ctx));
     if (ctx != NULL)
         base_init(provctx, &ctx->base_ctx,
-                  PROV_CIPHER_HW_aes_cbc_hmac_sha1(), kbits, blkbits,
+                  ossl_prov_cipher_hw_aes_cbc_hmac_sha1(), kbits, blkbits,
                   ivbits, flags);
     return ctx;
 }
@@ -335,7 +335,7 @@ static void *aes_cbc_hmac_sha256_newctx(void *provctx, size_t kbits,
     ctx = OPENSSL_zalloc(sizeof(*ctx));
     if (ctx != NULL)
         base_init(provctx, &ctx->base_ctx,
-                  PROV_CIPHER_HW_aes_cbc_hmac_sha256(), kbits, blkbits,
+                  ossl_prov_cipher_hw_aes_cbc_hmac_sha256(), kbits, blkbits,
                   ivbits, flags);
     return ctx;
 }
diff --git a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.h b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.h
index 73d39bbc42..75c450c350 100644
--- a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.h
+++ b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.h
@@ -26,8 +26,8 @@ typedef struct prov_cipher_hw_aes_hmac_sha_ctx_st {
 # endif /* OPENSSL_NO_MULTIBLOCK) */
 } PROV_CIPHER_HW_AES_HMAC_SHA;
 
-const PROV_CIPHER_HW_AES_HMAC_SHA *PROV_CIPHER_HW_aes_cbc_hmac_sha1(void);
-const PROV_CIPHER_HW_AES_HMAC_SHA *PROV_CIPHER_HW_aes_cbc_hmac_sha256(void);
+const PROV_CIPHER_HW_AES_HMAC_SHA *ossl_prov_cipher_hw_aes_cbc_hmac_sha1(void);
+const PROV_CIPHER_HW_AES_HMAC_SHA *ossl_prov_cipher_hw_aes_cbc_hmac_sha256(void);
 
 #ifdef AES_CBC_HMAC_SHA_CAPABLE
 # include <openssl/aes.h>
diff --git a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c
index 12644e780f..b3aebbe052 100644
--- a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c
+++ b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c
@@ -22,7 +22,7 @@ int cipher_capable_aes_cbc_hmac_sha1(void)
     return 0;
 }
 
-const PROV_CIPHER_HW_AES_HMAC_SHA *PROV_CIPHER_HW_aes_cbc_hmac_sha1(void)
+const PROV_CIPHER_HW_AES_HMAC_SHA *ossl_prov_cipher_hw_aes_cbc_hmac_sha1(void)
 {
     return NULL;
 }
@@ -788,7 +788,7 @@ static const PROV_CIPHER_HW_AES_HMAC_SHA cipher_hw_aes_hmac_sha1 = {
 # endif
 };
 
-const PROV_CIPHER_HW_AES_HMAC_SHA *PROV_CIPHER_HW_aes_cbc_hmac_sha1(void)
+const PROV_CIPHER_HW_AES_HMAC_SHA *ossl_prov_cipher_hw_aes_cbc_hmac_sha1(void)
 {
     return &cipher_hw_aes_hmac_sha1;
 }
diff --git a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c
index 35106e0171..8e738bcd10 100644
--- a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c
+++ b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c
@@ -22,7 +22,7 @@ int cipher_capable_aes_cbc_hmac_sha256(void)
     return 0;
 }
 
-const PROV_CIPHER_HW_AES_HMAC_SHA *PROV_CIPHER_HW_aes_cbc_hmac_sha256(void)
+const PROV_CIPHER_HW_AES_HMAC_SHA *ossl_prov_cipher_hw_aes_cbc_hmac_sha256(void)
 {
     return NULL;
 }
@@ -837,7 +837,7 @@ static const PROV_CIPHER_HW_AES_HMAC_SHA cipher_hw_aes_hmac_sha256 = {
 # endif
 };
 
-const PROV_CIPHER_HW_AES_HMAC_SHA *PROV_CIPHER_HW_aes_cbc_hmac_sha256(void)
+const PROV_CIPHER_HW_AES_HMAC_SHA *ossl_prov_cipher_hw_aes_cbc_hmac_sha256(void)
 {
     return &cipher_hw_aes_hmac_sha256;
 }
diff --git a/providers/implementations/ciphers/cipher_aes_ccm.c b/providers/implementations/ciphers/cipher_aes_ccm.c
index 52bdd784d0..5913b2ce0c 100644
--- a/providers/implementations/ciphers/cipher_aes_ccm.c
+++ b/providers/implementations/ciphers/cipher_aes_ccm.c
@@ -29,7 +29,7 @@ static void *aes_ccm_newctx(void *provctx, size_t keybits)
 
     ctx = OPENSSL_zalloc(sizeof(*ctx));
     if (ctx != NULL)
-        ccm_initctx(&ctx->base, keybits, PROV_AES_HW_ccm(keybits));
+        ccm_initctx(&ctx->base, keybits, ossl_prov_aes_hw_ccm(keybits));
     return ctx;
 }
 
diff --git a/providers/implementations/ciphers/cipher_aes_ccm.h b/providers/implementations/ciphers/cipher_aes_ccm.h
index ee0257c5f6..2c3ebd0950 100644
--- a/providers/implementations/ciphers/cipher_aes_ccm.h
+++ b/providers/implementations/ciphers/cipher_aes_ccm.h
@@ -45,4 +45,4 @@ typedef struct prov_aes_ccm_ctx_st {
     } ccm;
 } PROV_AES_CCM_CTX;
 
-const PROV_CCM_HW *PROV_AES_HW_ccm(size_t keylen);
+const PROV_CCM_HW *ossl_prov_aes_hw_ccm(size_t keylen);
diff --git a/providers/implementations/ciphers/cipher_aes_ccm_hw.c b/providers/implementations/ciphers/cipher_aes_ccm_hw.c
index db2e3f2742..db50187ea9 100644
--- a/providers/implementations/ciphers/cipher_aes_ccm_hw.c
+++ b/providers/implementations/ciphers/cipher_aes_ccm_hw.c
@@ -62,7 +62,7 @@ static const PROV_CCM_HW aes_ccm = {
 #elif defined(SPARC_AES_CAPABLE)
 # include "cipher_aes_ccm_hw_t4.inc"
 #else
-const PROV_CCM_HW *PROV_AES_HW_ccm(size_t keybits)
+const PROV_CCM_HW *ossl_prov_aes_hw_ccm(size_t keybits)
 {
     return &aes_ccm;
 }
diff --git a/providers/implementations/ciphers/cipher_aes_ccm_hw_aesni.inc b/providers/implementations/ciphers/cipher_aes_ccm_hw_aesni.inc
index 7e83565809..12b2bfe96b 100644
--- a/providers/implementations/ciphers/cipher_aes_ccm_hw_aesni.inc
+++ b/providers/implementations/ciphers/cipher_aes_ccm_hw_aesni.inc
@@ -32,7 +32,7 @@ static const PROV_CCM_HW aesni_ccm = {
     ccm_generic_gettag
 };
 
-const PROV_CCM_HW *PROV_AES_HW_ccm(size_t keybits)
+const PROV_CCM_HW *ossl_prov_aes_hw_ccm(size_t keybits)
 {
     return AESNI_CAPABLE ? &aesni_ccm : &aes_ccm;
 }
diff --git a/providers/implementations/ciphers/cipher_aes_ccm_hw_s390x.inc b/providers/implementations/ciphers/cipher_aes_ccm_hw_s390x.inc
index cec7c96902..9a9f12875f 100644
--- a/providers/implementations/ciphers/cipher_aes_ccm_hw_s390x.inc
+++ b/providers/implementations/ciphers/cipher_aes_ccm_hw_s390x.inc
@@ -258,7 +258,7 @@ static const PROV_CCM_HW s390x_aes_ccm = {
     s390x_aes_ccm_gettag
 };
 
-const PROV_CCM_HW *PROV_AES_HW_ccm(size_t keybits)
+const PROV_CCM_HW *ossl_prov_aes_hw_ccm(size_t keybits)
 {
     if ((keybits == 128 && S390X_aes_128_ccm_CAPABLE)
          || (keybits == 192 && S390X_aes_192_ccm_CAPABLE)
diff --git a/providers/implementations/ciphers/cipher_aes_ccm_hw_t4.inc b/providers/implementations/ciphers/cipher_aes_ccm_hw_t4.inc
index c4b6d15ed9..f81f422d5a 100644
--- a/providers/implementations/ciphers/cipher_aes_ccm_hw_t4.inc
+++ b/providers/implementations/ciphers/cipher_aes_ccm_hw_t4.inc
@@ -30,7 +30,7 @@ static const PROV_CCM_HW t4_aes_ccm = {
     ccm_generic_gettag
 };
 
-const PROV_CCM_HW *PROV_AES_HW_ccm(size_t keybits)
+const PROV_CCM_HW *ossl_prov_aes_hw_ccm(size_t keybits)
 {
     return SPARC_AES_CAPABLE ? &t4_aes_ccm : &aes_ccm;
 }
diff --git a/providers/implementations/ciphers/cipher_aes_gcm.c b/providers/implementations/ciphers/cipher_aes_gcm.c
index b5c7e8472b..6e97b1f9d9 100644
--- a/providers/implementations/ciphers/cipher_aes_gcm.c
+++ b/providers/implementations/ciphers/cipher_aes_gcm.c
@@ -32,7 +32,7 @@ static void *aes_gcm_newctx(void *provctx, size_t keybits)
 
     ctx = OPENSSL_zalloc(sizeof(*ctx));
     if (ctx != NULL)
-        gcm_initctx(provctx, &ctx->base, keybits, PROV_AES_HW_gcm(keybits),
+        gcm_initctx(provctx, &ctx->base, keybits, ossl_prov_aes_hw_gcm(keybits),
                     AES_GCM_IV_MIN_SIZE);
     return ctx;
 }
diff --git a/providers/implementations/ciphers/cipher_aes_gcm.h b/providers/implementations/ciphers/cipher_aes_gcm.h
index d7006408de..2fe5e5499e 100644
--- a/providers/implementations/ciphers/cipher_aes_gcm.h
+++ b/providers/implementations/ciphers/cipher_aes_gcm.h
@@ -41,4 +41,4 @@ typedef struct prov_aes_gcm_ctx_st {
     } plat;
 } PROV_AES_GCM_CTX;
 
-const PROV_GCM_HW *PROV_AES_HW_gcm(size_t keybits);
+const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_aes_gcm_hw.c b/providers/implementations/ciphers/cipher_aes_gcm_hw.c
index c662887272..f29a280643 100644
--- a/providers/implementations/ciphers/cipher_aes_gcm_hw.c
+++ b/providers/implementations/ciphers/cipher_aes_gcm_hw.c
@@ -142,7 +142,7 @@ static const PROV_GCM_HW aes_gcm = {
 #elif defined(AES_PMULL_CAPABLE) && defined(AES_GCM_ASM)
 # include "cipher_aes_gcm_hw_armv8.inc"
 #else
-const PROV_GCM_HW *PROV_AES_HW_gcm(size_t keybits)
+const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits)
 {
     return &aes_gcm;
 }
diff --git a/providers/implementations/ciphers/cipher_aes_gcm_hw_aesni.inc b/providers/implementations/ciphers/cipher_aes_gcm_hw_aesni.inc
index 9e2504a343..c25bd617c2 100644
--- a/providers/implementations/ciphers/cipher_aes_gcm_hw_aesni.inc
+++ b/providers/implementations/ciphers/cipher_aes_gcm_hw_aesni.inc
@@ -31,7 +31,7 @@ static const PROV_GCM_HW aesni_gcm = {
     gcm_one_shot
 };
 
-const PROV_GCM_HW *PROV_AES_HW_gcm(size_t keybits)
+const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits)
 {
     return AESNI_CAPABLE ? &aesni_gcm : &aes_gcm;
 }
diff --git a/providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc b/providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc
index f44ada0faf..5c84bf31fd 100644
--- a/providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc
+++ b/providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc
@@ -77,7 +77,7 @@ static const PROV_GCM_HW armv8_aes_gcm = {
     gcm_one_shot
 };
 
-const PROV_GCM_HW *PROV_AES_HW_gcm(size_t keybits)
+const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits)
 {
     return AES_PMULL_CAPABLE ? &armv8_aes_gcm : &aes_gcm;
 }
diff --git a/providers/implementations/ciphers/cipher_aes_gcm_hw_s390x.inc b/providers/implementations/ciphers/cipher_aes_gcm_hw_s390x.inc
index e13771a449..256b9cb91c 100644
--- a/providers/implementations/ciphers/cipher_aes_gcm_hw_s390x.inc
+++ b/providers/implementations/ciphers/cipher_aes_gcm_hw_s390x.inc
@@ -290,7 +290,7 @@ static const PROV_GCM_HW s390x_aes_gcm = {
     s390x_aes_gcm_one_shot
 };
 
-const PROV_GCM_HW *PROV_AES_HW_gcm(size_t keybits)
+const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits)
 {
     if ((keybits == 128 && S390X_aes_128_gcm_CAPABLE)
          || (keybits == 192 && S390X_aes_192_gcm_CAPABLE)
diff --git a/providers/implementations/ciphers/cipher_aes_gcm_hw_t4.inc b/providers/implementations/ciphers/cipher_aes_gcm_hw_t4.inc
index 0a477128d3..1ad3ea465d 100644
--- a/providers/implementations/ciphers/cipher_aes_gcm_hw_t4.inc
+++ b/providers/implementations/ciphers/cipher_aes_gcm_hw_t4.inc
@@ -46,7 +46,7 @@ static const PROV_GCM_HW t4_aes_gcm = {
     gcm_cipher_final,
     gcm_one_shot
 };
-const PROV_GCM_HW *PROV_AES_HW_gcm(size_t keybits)
+const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits)
 {
     return SPARC_AES_CAPABLE ? &t4_aes_gcm : &aes_gcm;
 }
diff --git a/providers/implementations/ciphers/cipher_aes_hw.c b/providers/implementations/ciphers/cipher_aes_hw.c
index e0bd4db6d3..50809313ec 100644
--- a/providers/implementations/ciphers/cipher_aes_hw.c
+++ b/providers/implementations/ciphers/cipher_aes_hw.c
@@ -130,7 +130,7 @@ static const PROV_CIPHER_HW aes_##mode = {                                     \
     cipher_hw_aes_copyctx                                                      \
 };                                                                             \
 PROV_CIPHER_HW_declare(mode)                                                   \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_##mode(size_t keybits)                \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_##mode(size_t keybits)           \
 {                                                                              \
     PROV_CIPHER_HW_select(mode)                                                \
     return &aes_##mode;                                                        \
diff --git a/providers/implementations/ciphers/cipher_aes_ocb.c b/providers/implementations/ciphers/cipher_aes_ocb.c
index 3728711828..c96718bf22 100644
--- a/providers/implementations/ciphers/cipher_aes_ocb.c
+++ b/providers/implementations/ciphers/cipher_aes_ocb.c
@@ -308,7 +308,7 @@ static void *aes_ocb_newctx(void *provctx, size_t kbits, size_t blkbits,
     ctx = OPENSSL_zalloc(sizeof(*ctx));
     if (ctx != NULL) {
         cipher_generic_initkey(ctx, kbits, blkbits, ivbits, mode, flags,
-                               PROV_CIPHER_HW_aes_ocb(kbits), NULL);
+                               ossl_prov_cipher_hw_aes_ocb(kbits), NULL);
         ctx->taglen = OCB_DEFAULT_TAG_LEN;
     }
     return ctx;
diff --git a/providers/implementations/ciphers/cipher_aes_ocb.h b/providers/implementations/ciphers/cipher_aes_ocb.h
index 94d8183167..674f4bbccc 100644
--- a/providers/implementations/ciphers/cipher_aes_ocb.h
+++ b/providers/implementations/ciphers/cipher_aes_ocb.h
@@ -36,4 +36,4 @@ typedef struct prov_aes_ocb_ctx_st {
     unsigned char aad_buf[OCB_MAX_AAD_LEN];   /* Store partial AAD blocks */
 } PROV_AES_OCB_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_ocb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ocb(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_aes_ocb_hw.c b/providers/implementations/ciphers/cipher_aes_ocb_hw.c
index 5caca0b1df..7aa97dc77e 100644
--- a/providers/implementations/ciphers/cipher_aes_ocb_hw.c
+++ b/providers/implementations/ciphers/cipher_aes_ocb_hw.c
@@ -113,7 +113,7 @@ static const PROV_CIPHER_HW aes_generic_ocb = {
     NULL
 };
 PROV_CIPHER_HW_declare()
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_ocb(size_t keybits)
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ocb(size_t keybits)
 {
     PROV_CIPHER_HW_select()
     return &aes_generic_ocb;
diff --git a/providers/implementations/ciphers/cipher_aes_siv.c b/providers/implementations/ciphers/cipher_aes_siv.c
index cac71eea9a..e427c6baf3 100644
--- a/providers/implementations/ciphers/cipher_aes_siv.c
+++ b/providers/implementations/ciphers/cipher_aes_siv.c
@@ -39,7 +39,7 @@ static void *aes_siv_newctx(void *provctx, size_t keybits, unsigned int mode,
         ctx->mode = mode;
         ctx->flags = flags;
         ctx->keylen = keybits / 8;
-        ctx->hw = PROV_CIPHER_HW_aes_siv(keybits);
+        ctx->hw = ossl_prov_cipher_hw_aes_siv(keybits);
         ctx->libctx = PROV_LIBRARY_CONTEXT_OF(provctx);
     }
     return ctx;
diff --git a/providers/implementations/ciphers/cipher_aes_siv.h b/providers/implementations/ciphers/cipher_aes_siv.h
index 3179943f0e..b407b407e6 100644
--- a/providers/implementations/ciphers/cipher_aes_siv.h
+++ b/providers/implementations/ciphers/cipher_aes_siv.h
@@ -34,4 +34,4 @@ typedef struct prov_siv_ctx_st {
     OPENSSL_CTX *libctx;
 } PROV_AES_SIV_CTX;
 
-const PROV_CIPHER_HW_AES_SIV *PROV_CIPHER_HW_aes_siv(size_t keybits);
+const PROV_CIPHER_HW_AES_SIV *ossl_prov_cipher_hw_aes_siv(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_aes_siv_hw.c b/providers/implementations/ciphers/cipher_aes_siv_hw.c
index 547eb1a4c4..ddd88e00c9 100644
--- a/providers/implementations/ciphers/cipher_aes_siv_hw.c
+++ b/providers/implementations/ciphers/cipher_aes_siv_hw.c
@@ -130,7 +130,7 @@ static const PROV_CIPHER_HW_AES_SIV aes_siv_hw =
     aes_siv_dupctx,
 };
 
-const PROV_CIPHER_HW_AES_SIV *PROV_CIPHER_HW_aes_siv(size_t keybits)
+const PROV_CIPHER_HW_AES_SIV *ossl_prov_cipher_hw_aes_siv(size_t keybits)
 {
     return &aes_siv_hw;
 }
diff --git a/providers/implementations/ciphers/cipher_aes_xts.c b/providers/implementations/ciphers/cipher_aes_xts.c
index e28008b773..ca40bbde0e 100644
--- a/providers/implementations/ciphers/cipher_aes_xts.c
+++ b/providers/implementations/ciphers/cipher_aes_xts.c
@@ -116,7 +116,7 @@ static void *aes_xts_newctx(void *provctx, unsigned int mode, uint64_t flags,
 
     if (ctx != NULL) {
         cipher_generic_initkey(&ctx->base, kbits, blkbits, ivbits, mode, flags,
-                               PROV_CIPHER_HW_aes_xts(kbits), NULL);
+                               ossl_prov_cipher_hw_aes_xts(kbits), NULL);
     }
     return ctx;
 }
diff --git a/providers/implementations/ciphers/cipher_aes_xts.h b/providers/implementations/ciphers/cipher_aes_xts.h
index 23ae696197..3e2bbebba3 100644
--- a/providers/implementations/ciphers/cipher_aes_xts.h
+++ b/providers/implementations/ciphers/cipher_aes_xts.h
@@ -32,4 +32,4 @@ typedef struct prov_aes_xts_ctx_st {
     OSSL_xts_stream_fn stream;
 } PROV_AES_XTS_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_xts(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_xts(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_aes_xts_hw.c b/providers/implementations/ciphers/cipher_aes_xts_hw.c
index 028d1608d2..15c136bafd 100644
--- a/providers/implementations/ciphers/cipher_aes_xts_hw.c
+++ b/providers/implementations/ciphers/cipher_aes_xts_hw.c
@@ -169,7 +169,7 @@ static const PROV_CIPHER_HW aes_generic_xts = {
     cipher_hw_aes_xts_copyctx
 };
 PROV_CIPHER_HW_declare_xts()
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_xts(size_t keybits)
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_xts(size_t keybits)
 {
     PROV_CIPHER_HW_select_xts()
     return &aes_generic_xts;
diff --git a/providers/implementations/ciphers/cipher_aria.h b/providers/implementations/ciphers/cipher_aria.h
index 282408c58e..7a5986087e 100644
--- a/providers/implementations/ciphers/cipher_aria.h
+++ b/providers/implementations/ciphers/cipher_aria.h
@@ -19,12 +19,12 @@ typedef struct prov_aria_ctx_st {
 } PROV_ARIA_CTX;
 
 
-# define PROV_CIPHER_HW_aria_ofb PROV_CIPHER_HW_aria_ofb128
-# define PROV_CIPHER_HW_aria_cfb PROV_CIPHER_HW_aria_cfb128
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_ofb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_cfb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_cfb1(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_cfb8(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_ctr(size_t keybits);
+#define ossl_prov_cipher_hw_aria_ofb ossl_prov_cipher_hw_aria_ofb128
+#define ossl_prov_cipher_hw_aria_cfb ossl_prov_cipher_hw_aria_cfb128
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_ofb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_cfb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_cfb1(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_cfb8(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_ctr(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_aria_ccm.c b/providers/implementations/ciphers/cipher_aria_ccm.c
index 7f89b223f1..a19ad65b62 100644
--- a/providers/implementations/ciphers/cipher_aria_ccm.c
+++ b/providers/implementations/ciphers/cipher_aria_ccm.c
@@ -24,7 +24,7 @@ static void *aria_ccm_newctx(void *provctx, size_t keybits)
 
     ctx = OPENSSL_zalloc(sizeof(*ctx));
     if (ctx != NULL)
-        ccm_initctx(&ctx->base, keybits, PROV_ARIA_HW_ccm(keybits));
+        ccm_initctx(&ctx->base, keybits, ossl_prov_aria_hw_ccm(keybits));
     return ctx;
 }
 
diff --git a/providers/implementations/ciphers/cipher_aria_ccm.h b/providers/implementations/ciphers/cipher_aria_ccm.h
index a85cf899ef..c1865ce5e0 100644
--- a/providers/implementations/ciphers/cipher_aria_ccm.h
+++ b/providers/implementations/ciphers/cipher_aria_ccm.h
@@ -19,4 +19,4 @@ typedef struct prov_aria_ccm_ctx_st {
     } ks;                       /* ARIA key schedule to use */
 } PROV_ARIA_CCM_CTX;
 
-const PROV_CCM_HW *PROV_ARIA_HW_ccm(size_t keylen);
+const PROV_CCM_HW *ossl_prov_aria_hw_ccm(size_t keylen);
diff --git a/providers/implementations/ciphers/cipher_aria_ccm_hw.c b/providers/implementations/ciphers/cipher_aria_ccm_hw.c
index db3a9c8ea8..bfdb75be81 100644
--- a/providers/implementations/ciphers/cipher_aria_ccm_hw.c
+++ b/providers/implementations/ciphers/cipher_aria_ccm_hw.c
@@ -34,7 +34,7 @@ static const PROV_CCM_HW ccm_aria = {
     ccm_generic_auth_decrypt,
     ccm_generic_gettag
 };
-const PROV_CCM_HW *PROV_ARIA_HW_ccm(size_t keybits)
+const PROV_CCM_HW *ossl_prov_aria_hw_ccm(size_t keybits)
 {
     return &ccm_aria;
 }
diff --git a/providers/implementations/ciphers/cipher_aria_gcm.c b/providers/implementations/ciphers/cipher_aria_gcm.c
index 4e934febac..ad667ae27a 100644
--- a/providers/implementations/ciphers/cipher_aria_gcm.c
+++ b/providers/implementations/ciphers/cipher_aria_gcm.c
@@ -24,8 +24,8 @@ static void *aria_gcm_newctx(void *provctx, size_t keybits)
 
     ctx = OPENSSL_zalloc(sizeof(*ctx));
     if (ctx != NULL)
-        gcm_initctx(provctx, &ctx->base, keybits, PROV_ARIA_HW_gcm(keybits),
-                    ARIA_GCM_IV_MIN_SIZE);
+        gcm_initctx(provctx, &ctx->base, keybits,
+                    ossl_prov_aria_hw_gcm(keybits), ARIA_GCM_IV_MIN_SIZE);
     return ctx;
 }
 
diff --git a/providers/implementations/ciphers/cipher_aria_gcm.h b/providers/implementations/ciphers/cipher_aria_gcm.h
index 2d08a59029..973586bdec 100644
--- a/providers/implementations/ciphers/cipher_aria_gcm.h
+++ b/providers/implementations/ciphers/cipher_aria_gcm.h
@@ -19,4 +19,4 @@ typedef struct prov_aria_gcm_ctx_st {
     } ks;
 } PROV_ARIA_GCM_CTX;
 
-const PROV_GCM_HW *PROV_ARIA_HW_gcm(size_t keybits);
+const PROV_GCM_HW *ossl_prov_aria_hw_gcm(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_aria_gcm_hw.c b/providers/implementations/ciphers/cipher_aria_gcm_hw.c
index 1d8e470b20..54c635e4bf 100644
--- a/providers/implementations/ciphers/cipher_aria_gcm_hw.c
+++ b/providers/implementations/ciphers/cipher_aria_gcm_hw.c
@@ -31,7 +31,7 @@ static const PROV_GCM_HW aria_gcm = {
     gcm_cipher_final,
     gcm_one_shot
 };
-const PROV_GCM_HW *PROV_ARIA_HW_gcm(size_t keybits)
+const PROV_GCM_HW *ossl_prov_aria_hw_gcm(size_t keybits)
 {
     return &aria_gcm;
 }
diff --git a/providers/implementations/ciphers/cipher_aria_hw.c b/providers/implementations/ciphers/cipher_aria_hw.c
index b0c5675f1b..6486474ec2 100644
--- a/providers/implementations/ciphers/cipher_aria_hw.c
+++ b/providers/implementations/ciphers/cipher_aria_hw.c
@@ -37,7 +37,7 @@ static const PROV_CIPHER_HW aria_##mode = {                                    \
     cipher_hw_chunked_##mode,                                                  \
     cipher_hw_aria_copyctx                                                     \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_##mode(size_t keybits)               \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_##mode(size_t keybits)          \
 {                                                                              \
     return &aria_##mode;                                                       \
 }
diff --git a/providers/implementations/ciphers/cipher_blowfish.h b/providers/implementations/ciphers/cipher_blowfish.h
index 2d66d1bc0e..3fa86eeac6 100644
--- a/providers/implementations/ciphers/cipher_blowfish.h
+++ b/providers/implementations/ciphers/cipher_blowfish.h
@@ -18,7 +18,7 @@ typedef struct prov_blowfish_ctx_st {
     } ks;
 } PROV_BLOWFISH_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_blowfish_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_blowfish_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_blowfish_ofb64(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_blowfish_cfb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_blowfish_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_blowfish_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_blowfish_ofb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_blowfish_cfb64(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_blowfish_hw.c b/providers/implementations/ciphers/cipher_blowfish_hw.c
index 3ff43e4c27..4855a71f68 100644
--- a/providers/implementations/ciphers/cipher_blowfish_hw.c
+++ b/providers/implementations/ciphers/cipher_blowfish_hw.c
@@ -31,7 +31,7 @@ static const PROV_CIPHER_HW bf_##mode = {                                      \
     cipher_hw_blowfish_initkey,                                                \
     cipher_hw_blowfish_##mode##_cipher                                         \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_blowfish_##mode(size_t keybits)           \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_blowfish_##mode(size_t keybits)      \
 {                                                                              \
     return &bf_##mode;                                                         \
 }
diff --git a/providers/implementations/ciphers/cipher_camellia.h b/providers/implementations/ciphers/cipher_camellia.h
index 07f67dbad8..2dd658f00e 100644
--- a/providers/implementations/ciphers/cipher_camellia.h
+++ b/providers/implementations/ciphers/cipher_camellia.h
@@ -19,12 +19,12 @@ typedef struct prov_camellia_ctx_st {
     } ks;
 } PROV_CAMELLIA_CTX;
 
-#define PROV_CIPHER_HW_camellia_ofb PROV_CIPHER_HW_camellia_ofb128
-#define PROV_CIPHER_HW_camellia_cfb PROV_CIPHER_HW_camellia_cfb128
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_ofb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_cfb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_cfb1(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_cfb8(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_ctr(size_t keybits);
+#define ossl_prov_cipher_hw_camellia_ofb ossl_prov_cipher_hw_camellia_ofb128
+#define ossl_prov_cipher_hw_camellia_cfb ossl_prov_cipher_hw_camellia_cfb128
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_ofb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_cfb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_cfb1(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_cfb8(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_ctr(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_camellia_hw.c b/providers/implementations/ciphers/cipher_camellia_hw.c
index 3a8fa282c3..af4db4405a 100644
--- a/providers/implementations/ciphers/cipher_camellia_hw.c
+++ b/providers/implementations/ciphers/cipher_camellia_hw.c
@@ -58,7 +58,7 @@ static const PROV_CIPHER_HW camellia_##mode = {                                \
     cipher_hw_camellia_copyctx                                                 \
 };                                                                             \
 PROV_CIPHER_HW_declare(mode)                                                   \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_##mode(size_t keybits)           \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_##mode(size_t keybits)      \
 {                                                                              \
     PROV_CIPHER_HW_select(mode)                                                \
     return &camellia_##mode;                                                   \
diff --git a/providers/implementations/ciphers/cipher_cast.h b/providers/implementations/ciphers/cipher_cast.h
index 218f5c4fb5..fdba630f09 100644
--- a/providers/implementations/ciphers/cipher_cast.h
+++ b/providers/implementations/ciphers/cipher_cast.h
@@ -18,7 +18,7 @@ typedef struct prov_cast_ctx_st {
     } ks;
 } PROV_CAST_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_cast5_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_cast5_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_cast5_ofb64(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_cast5_cfb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_cast5_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_cast5_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_cast5_ofb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_cast5_cfb64(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_cast5_hw.c b/providers/implementations/ciphers/cipher_cast5_hw.c
index 2257b405f0..73f0628e57 100644
--- a/providers/implementations/ciphers/cipher_cast5_hw.c
+++ b/providers/implementations/ciphers/cipher_cast5_hw.c
@@ -31,7 +31,7 @@ static const PROV_CIPHER_HW cast5_##mode = {                                   \
     cipher_hw_cast5_initkey,                                                   \
     cipher_hw_cast5_##mode##_cipher                                            \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_cast5_##mode(size_t keybits)              \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_cast5_##mode(size_t keybits)         \
 {                                                                              \
     return &cast5_##mode;                                                      \
 }
diff --git a/providers/implementations/ciphers/cipher_chacha20.c b/providers/implementations/ciphers/cipher_chacha20.c
index 1f44601c61..89493c3fbc 100644
--- a/providers/implementations/ciphers/cipher_chacha20.c
+++ b/providers/implementations/ciphers/cipher_chacha20.c
@@ -38,7 +38,7 @@ void chacha20_initctx(PROV_CHACHA20_CTX *ctx)
                            CHACHA20_BLKLEN * 8,
                            CHACHA20_IVLEN * 8,
                            0, CHACHA20_FLAGS,
-                           PROV_CIPHER_HW_chacha20(CHACHA20_KEYLEN * 8),
+                           ossl_prov_cipher_hw_chacha20(CHACHA20_KEYLEN * 8),
                            NULL);
 }
 
diff --git a/providers/implementations/ciphers/cipher_chacha20.h b/providers/implementations/ciphers/cipher_chacha20.h
index 808570f6dc..c494de7d85 100644
--- a/providers/implementations/ciphers/cipher_chacha20.h
+++ b/providers/implementations/ciphers/cipher_chacha20.h
@@ -27,7 +27,7 @@ typedef struct prov_cipher_hw_chacha20_st {
 
 } PROV_CIPHER_HW_CHACHA20;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_chacha20(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_chacha20(size_t keybits);
 
 OSSL_FUNC_cipher_encrypt_init_fn chacha20_einit;
 OSSL_FUNC_cipher_decrypt_init_fn chacha20_dinit;
diff --git a/providers/implementations/ciphers/cipher_chacha20_hw.c b/providers/implementations/ciphers/cipher_chacha20_hw.c
index dce0a6c11c..c298c6f0a3 100644
--- a/providers/implementations/ciphers/cipher_chacha20_hw.c
+++ b/providers/implementations/ciphers/cipher_chacha20_hw.c
@@ -114,7 +114,7 @@ static const PROV_CIPHER_HW_CHACHA20 chacha20_hw = {
     chacha20_initiv
 };
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_chacha20(size_t keybits)
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_chacha20(size_t keybits)
 {
     return (PROV_CIPHER_HW *)&chacha20_hw;
 }
diff --git a/providers/implementations/ciphers/cipher_chacha20_poly1305.c b/providers/implementations/ciphers/cipher_chacha20_poly1305.c
index e2aa691378..474d43b7fe 100644
--- a/providers/implementations/ciphers/cipher_chacha20_poly1305.c
+++ b/providers/implementations/ciphers/cipher_chacha20_poly1305.c
@@ -56,9 +56,9 @@ static void *chacha20_poly1305_newctx(void *provctx)
                                CHACHA20_POLY1305_IVLEN * 8,
                                CHACHA20_POLY1305_MODE,
                                CHACHA20_POLY1305_FLAGS,
-                               PROV_CIPHER_HW_chacha20_poly1305(
+                               ossl_prov_cipher_hw_chacha20_poly1305(
                                    CHACHA20_POLY1305_KEYLEN * 8),
-                               NULL);
+                                   NULL);
         ctx->nonce_len = CHACHA20_POLY1305_IVLEN;
         ctx->tls_payload_length = NO_TLS_PAYLOAD_LENGTH;
         chacha20_initctx(&ctx->chacha);
diff --git a/providers/implementations/ciphers/cipher_chacha20_poly1305.h b/providers/implementations/ciphers/cipher_chacha20_poly1305.h
index 00b173d1ed..c7c3e88741 100644
--- a/providers/implementations/ciphers/cipher_chacha20_poly1305.h
+++ b/providers/implementations/ciphers/cipher_chacha20_poly1305.h
@@ -40,4 +40,4 @@ typedef struct prov_cipher_hw_chacha_aead_st {
                             size_t flen);
 } PROV_CIPHER_HW_CHACHA20_POLY1305;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_chacha20_poly1305(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_chacha20_poly1305(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c b/providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c
index d9f314c9b6..8bbae6529a 100644
--- a/providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c
+++ b/providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c
@@ -399,7 +399,7 @@ static const PROV_CIPHER_HW_CHACHA20_POLY1305 chacha20poly1305_hw =
     chacha_poly1305_tls_iv_set_fixed
 };
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_chacha20_poly1305(size_t keybits)
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_chacha20_poly1305(size_t keybits)
 {
     return (PROV_CIPHER_HW *)&chacha20poly1305_hw;
 }
diff --git a/providers/implementations/ciphers/cipher_desx_hw.c b/providers/implementations/ciphers/cipher_desx_hw.c
index dac6c396b1..7dc4c50ef5 100644
--- a/providers/implementations/ciphers/cipher_desx_hw.c
+++ b/providers/implementations/ciphers/cipher_desx_hw.c
@@ -73,7 +73,8 @@ static const PROV_CIPHER_HW desx_cbc =
     cipher_hw_desx_cbc,
     cipher_hw_desx_copyctx
 };
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_desx_cbc(void)
+
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_desx_cbc(void)
 {
     return &desx_cbc;
 }
diff --git a/providers/implementations/ciphers/cipher_idea.h b/providers/implementations/ciphers/cipher_idea.h
index ebe590b93c..cb3541a031 100644
--- a/providers/implementations/ciphers/cipher_idea.h
+++ b/providers/implementations/ciphers/cipher_idea.h
@@ -18,7 +18,7 @@ typedef struct prov_idea_ctx_st {
     } ks;
 } PROV_IDEA_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_idea_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_idea_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_idea_ofb64(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_idea_cfb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_idea_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_idea_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_idea_ofb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_idea_cfb64(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_idea_hw.c b/providers/implementations/ciphers/cipher_idea_hw.c
index 009ef358d0..1c451b77ed 100644
--- a/providers/implementations/ciphers/cipher_idea_hw.c
+++ b/providers/implementations/ciphers/cipher_idea_hw.c
@@ -43,7 +43,7 @@ static const PROV_CIPHER_HW idea_##mode = {                                    \
     cipher_hw_idea_initkey,                                                    \
     cipher_hw_idea_##mode##_cipher                                             \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_idea_##mode(size_t keybits)               \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_idea_##mode(size_t keybits)          \
 {                                                                              \
     return &idea_##mode;                                                       \
 }
diff --git a/providers/implementations/ciphers/cipher_rc2.c b/providers/implementations/ciphers/cipher_rc2.c
index 022f4c66a3..2a303ceef4 100644
--- a/providers/implementations/ciphers/cipher_rc2.c
+++ b/providers/implementations/ciphers/cipher_rc2.c
@@ -210,7 +210,8 @@ static void * alg##_##kbits##_##lcmode##_newctx(void *provctx)                 \
      if (ctx != NULL) {                                                        \
          cipher_generic_initkey(ctx, kbits, blkbits, ivbits,                   \
                                 EVP_CIPH_##UCMODE##_MODE, flags,               \
-                                PROV_CIPHER_HW_##alg##_##lcmode(kbits), NULL); \
+                                ossl_prov_cipher_hw_##alg##_##lcmode(kbits),   \
+                                NULL);                                         \
          ctx->key_bits = kbits;                                                \
      }                                                                         \
      return ctx;                                                               \
diff --git a/providers/implementations/ciphers/cipher_rc2.h b/providers/implementations/ciphers/cipher_rc2.h
index 82f0f6ca74..fca1e95271 100644
--- a/providers/implementations/ciphers/cipher_rc2.h
+++ b/providers/implementations/ciphers/cipher_rc2.h
@@ -19,10 +19,10 @@ typedef struct prov_rc2_ctx_st {
     size_t key_bits;
 } PROV_RC2_CTX;
 
-#define PROV_CIPHER_HW_rc2_ofb128 PROV_CIPHER_HW_rc2_ofb64
-#define PROV_CIPHER_HW_rc2_cfb128 PROV_CIPHER_HW_rc2_cfb64
+#define ossl_prov_cipher_hw_rc2_ofb128 ossl_prov_cipher_hw_rc2_ofb64
+#define ossl_prov_cipher_hw_rc2_cfb128 ossl_prov_cipher_hw_rc2_cfb64
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc2_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc2_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc2_ofb64(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc2_cfb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc2_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc2_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc2_ofb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc2_cfb64(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_rc2_hw.c b/providers/implementations/ciphers/cipher_rc2_hw.c
index 2583172bd8..da9ff729cd 100644
--- a/providers/implementations/ciphers/cipher_rc2_hw.c
+++ b/providers/implementations/ciphers/cipher_rc2_hw.c
@@ -32,7 +32,7 @@ static const PROV_CIPHER_HW rc2_##mode = {                                     \
     cipher_hw_rc2_initkey,                                                     \
     cipher_hw_rc2_##mode##_cipher                                              \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc2_##mode(size_t keybits)                \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc2_##mode(size_t keybits)           \
 {                                                                              \
     return &rc2_##mode;                                                        \
 }
diff --git a/providers/implementations/ciphers/cipher_rc4.c b/providers/implementations/ciphers/cipher_rc4.c
index f9086fbfc5..d92d036ab5 100644
--- a/providers/implementations/ciphers/cipher_rc4.c
+++ b/providers/implementations/ciphers/cipher_rc4.c
@@ -67,7 +67,7 @@ static void * alg##_##kbits##_newctx(void *provctx)                            \
      ctx = OPENSSL_zalloc(sizeof(*ctx));                                       \
      if (ctx != NULL) {                                                        \
          cipher_generic_initkey(ctx, kbits, blkbits, ivbits, 0, flags,         \
-                                PROV_CIPHER_HW_##alg(kbits), NULL);            \
+                                ossl_prov_cipher_hw_##alg(kbits), NULL);       \
      }                                                                         \
      return ctx;                                                               \
 }                                                                              \
diff --git a/providers/implementations/ciphers/cipher_rc4.h b/providers/implementations/ciphers/cipher_rc4.h
index a2d0a50f21..ec038bdde5 100644
--- a/providers/implementations/ciphers/cipher_rc4.h
+++ b/providers/implementations/ciphers/cipher_rc4.h
@@ -18,4 +18,4 @@ typedef struct prov_rc4_ctx_st {
     } ks;
 } PROV_RC4_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc4(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc4(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_rc4_hmac_md5.c b/providers/implementations/ciphers/cipher_rc4_hmac_md5.c
index 60d0eea3dd..964597beba 100644
--- a/providers/implementations/ciphers/cipher_rc4_hmac_md5.c
+++ b/providers/implementations/ciphers/cipher_rc4_hmac_md5.c
@@ -58,7 +58,7 @@ static void *rc4_hmac_md5_newctx(void *provctx)
                                RC4_HMAC_MD5_BLOCK_BITS,
                                RC4_HMAC_MD5_IV_BITS,
                                RC4_HMAC_MD5_MODE, RC4_HMAC_MD5_FLAGS,
-                               PROV_CIPHER_HW_rc4_hmac_md5(RC4_HMAC_MD5_KEY_BITS),
+                               ossl_prov_cipher_hw_rc4_hmac_md5(RC4_HMAC_MD5_KEY_BITS),
                                NULL);
      return ctx;
 }
diff --git a/providers/implementations/ciphers/cipher_rc4_hmac_md5.h b/providers/implementations/ciphers/cipher_rc4_hmac_md5.h
index ff7ed7ef86..042f5f13df 100644
--- a/providers/implementations/ciphers/cipher_rc4_hmac_md5.h
+++ b/providers/implementations/ciphers/cipher_rc4_hmac_md5.h
@@ -30,4 +30,4 @@ typedef struct prov_cipher_hw_rc4_hmac_md5_st {
 
 } PROV_CIPHER_HW_RC4_HMAC_MD5;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc4_hmac_md5(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc4_hmac_md5(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_rc4_hmac_md5_hw.c b/providers/implementations/ciphers/cipher_rc4_hmac_md5_hw.c
index 54b8f08628..73233a2de7 100644
--- a/providers/implementations/ciphers/cipher_rc4_hmac_md5_hw.c
+++ b/providers/implementations/ciphers/cipher_rc4_hmac_md5_hw.c
@@ -225,7 +225,8 @@ static const PROV_CIPHER_HW_RC4_HMAC_MD5 rc4_hmac_md5_hw = {
     cipher_hw_rc4_hmac_md5_tls_init,
     cipher_hw_rc4_hmac_md5_init_mackey
 };
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc4_hmac_md5(size_t keybits)
+
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc4_hmac_md5(size_t keybits)
 {
     return (PROV_CIPHER_HW *)&rc4_hmac_md5_hw;
 }
diff --git a/providers/implementations/ciphers/cipher_rc4_hw.c b/providers/implementations/ciphers/cipher_rc4_hw.c
index 8d88aca73c..09192b5d5e 100644
--- a/providers/implementations/ciphers/cipher_rc4_hw.c
+++ b/providers/implementations/ciphers/cipher_rc4_hw.c
@@ -37,7 +37,7 @@ static const PROV_CIPHER_HW rc4_hw = {
     cipher_hw_rc4_initkey,
     cipher_hw_rc4_cipher
 };
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc4(size_t keybits)
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc4(size_t keybits)
 {
     return &rc4_hw;
 }
diff --git a/providers/implementations/ciphers/cipher_rc5.c b/providers/implementations/ciphers/cipher_rc5.c
index 0078b32e02..dba0a3aaae 100644
--- a/providers/implementations/ciphers/cipher_rc5.c
+++ b/providers/implementations/ciphers/cipher_rc5.c
@@ -121,7 +121,8 @@ static void * alg##_##kbits##_##lcmode##_newctx(void *provctx)                 \
      if (ctx != NULL) {                                                        \
          cipher_generic_initkey(ctx, kbits, blkbits, ivbits,                   \
                                 EVP_CIPH_##UCMODE##_MODE, flags,               \
-                                PROV_CIPHER_HW_##alg##_##lcmode(kbits), NULL); \
+                                ossl_prov_cipher_hw_##alg##_##lcmode(kbits),   \
+                                NULL);                                         \
          ctx->rounds = RC5_12_ROUNDS;                                          \
      }                                                                         \
      return ctx;                                                               \
diff --git a/providers/implementations/ciphers/cipher_rc5.h b/providers/implementations/ciphers/cipher_rc5.h
index fe0d09f710..508b662cfe 100644
--- a/providers/implementations/ciphers/cipher_rc5.h
+++ b/providers/implementations/ciphers/cipher_rc5.h
@@ -19,7 +19,7 @@ typedef struct prov_blowfish_ctx_st {
     unsigned int rounds;       /* number of rounds */
 } PROV_RC5_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc5_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc5_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc5_ofb64(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc5_cfb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_ofb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_cfb64(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_rc5_hw.c b/providers/implementations/ciphers/cipher_rc5_hw.c
index 0d3d513148..898bd383f9 100644
--- a/providers/implementations/ciphers/cipher_rc5_hw.c
+++ b/providers/implementations/ciphers/cipher_rc5_hw.c
@@ -30,7 +30,7 @@ static const PROV_CIPHER_HW rc5_##mode = {                                     \
     cipher_hw_rc5_initkey,                                                     \
     cipher_hw_rc5_##mode##_cipher                                              \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc5_##mode(size_t keybits)                \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_##mode(size_t keybits)           \
 {                                                                              \
     return &rc5_##mode;                                                        \
 }
diff --git a/providers/implementations/ciphers/cipher_seed.h b/providers/implementations/ciphers/cipher_seed.h
index 976af35005..21f8b6e384 100644
--- a/providers/implementations/ciphers/cipher_seed.h
+++ b/providers/implementations/ciphers/cipher_seed.h
@@ -18,7 +18,7 @@ typedef struct prov_seed_ctx_st {
     } ks;
 } PROV_SEED_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_seed_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_seed_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_seed_ofb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_seed_cfb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_seed_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_seed_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_seed_ofb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_seed_cfb128(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_seed_hw.c b/providers/implementations/ciphers/cipher_seed_hw.c
index 016b3bc221..2d1dba92bc 100644
--- a/providers/implementations/ciphers/cipher_seed_hw.c
+++ b/providers/implementations/ciphers/cipher_seed_hw.c
@@ -31,7 +31,7 @@ static const PROV_CIPHER_HW seed_##mode = {                                    \
     cipher_hw_seed_initkey,                                                    \
     cipher_hw_seed_##mode##_cipher                                             \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_seed_##mode(size_t keybits)               \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_seed_##mode(size_t keybits)          \
 {                                                                              \
     return &seed_##mode;                                                       \
 }
diff --git a/providers/implementations/ciphers/cipher_sm4.h b/providers/implementations/ciphers/cipher_sm4.h
index d5c9633552..e1b3363a40 100644
--- a/providers/implementations/ciphers/cipher_sm4.h
+++ b/providers/implementations/ciphers/cipher_sm4.h
@@ -18,8 +18,8 @@ typedef struct prov_cast_ctx_st {
     } ks;
 } PROV_SM4_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_sm4_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_sm4_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_sm4_ctr(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_sm4_ofb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_sm4_cfb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_sm4_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_sm4_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_sm4_ctr(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_sm4_ofb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_sm4_cfb128(size_t keybits);
diff --git a/providers/implementations/ciphers/cipher_sm4_hw.c b/providers/implementations/ciphers/cipher_sm4_hw.c
index 73e88280c2..bc13517186 100644
--- a/providers/implementations/ciphers/cipher_sm4_hw.c
+++ b/providers/implementations/ciphers/cipher_sm4_hw.c
@@ -34,7 +34,7 @@ static const PROV_CIPHER_HW sm4_##mode = {                                     \
     cipher_hw_chunked_##mode,                                                  \
     cipher_hw_sm4_copyctx                                                      \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_sm4_##mode(size_t keybits)                \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_sm4_##mode(size_t keybits)           \
 {                                                                              \
     return &sm4_##mode;                                                        \
 }
diff --git a/providers/implementations/ciphers/cipher_tdes.h b/providers/implementations/ciphers/cipher_tdes.h
index 902f80e25e..d3500e71ce 100644
--- a/providers/implementations/ciphers/cipher_tdes.h
+++ b/providers/implementations/ciphers/cipher_tdes.h
@@ -36,7 +36,8 @@ static OSSL_FUNC_cipher_newctx_fn tdes_##type##_##lcmode##_newctx;
 static void *tdes_##type##_##lcmode##_newctx(void *provctx)                    \
 {                                                                              \
     return tdes_newctx(provctx, EVP_CIPH_##UCMODE##_MODE, kbits, blkbits,      \
-                       ivbits, flags, PROV_CIPHER_HW_tdes_##type##_##lcmode());\
+                       ivbits, flags,                                          \
+                       ossl_prov_cipher_hw_tdes_##type##_##lcmode());          \
 }                                                                              \
 static OSSL_FUNC_cipher_get_params_fn tdes_##type##_##lcmode##_get_params;       \
 static int tdes_##type##_##lcmode##_get_params(OSSL_PARAM params[])            \
@@ -84,7 +85,7 @@ static const PROV_CIPHER_HW type##_##mode = {                                  \
     cipher_hw_tdes_##mode,                                                     \
     cipher_hw_tdes_copyctx                                                     \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_##type##_##mode(void)                \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_##type##_##mode(void)           \
 {                                                                              \
     return &type##_##mode;                                                     \
 }
@@ -97,5 +98,5 @@ int cipher_hw_tdes_cbc(PROV_CIPHER_CTX *ctx, unsigned char *out,
 int cipher_hw_tdes_ecb(PROV_CIPHER_CTX *ctx, unsigned char *out,
                        const unsigned char *in, size_t len);
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede3_cbc(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede3_ecb(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede3_cbc(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede3_ecb(void);
diff --git a/providers/implementations/ciphers/cipher_tdes_default.h b/providers/implementations/ciphers/cipher_tdes_default.h
index 0bc499fc86..7d2f1cb034 100644
--- a/providers/implementations/ciphers/cipher_tdes_default.h
+++ b/providers/implementations/ciphers/cipher_tdes_default.h
@@ -10,16 +10,16 @@
 #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);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede3_cfb1(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede3_cfb8(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede3_ofb(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede3_cfb(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede3_cfb1(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede3_cfb8(void);
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede2_cbc(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede2_ecb(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede2_ofb(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede2_cfb(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede2_cbc(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede2_ecb(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede2_ofb(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede2_cfb(void);
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_desx_cbc(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_desx_cbc(void);
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_wrap_cbc(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_wrap_cbc(void);
diff --git a/providers/implementations/ciphers/cipher_tdes_wrap.c b/providers/implementations/ciphers/cipher_tdes_wrap.c
index 9007e403a4..2c8450586a 100644
--- a/providers/implementations/ciphers/cipher_tdes_wrap.c
+++ b/providers/implementations/ciphers/cipher_tdes_wrap.c
@@ -175,7 +175,7 @@ static OSSL_FUNC_cipher_newctx_fn tdes_wrap_newctx;                            \
 static void *tdes_wrap_newctx(void *provctx)                                   \
 {                                                                              \
     return tdes_newctx(provctx, EVP_CIPH_WRAP_MODE, kbits, blkbits, ivbits,    \
-                       flags, PROV_CIPHER_HW_tdes_wrap_cbc());                 \
+                       flags, ossl_prov_cipher_hw_tdes_wrap_cbc());            \
 }                                                                              \
 static OSSL_FUNC_cipher_get_params_fn tdes_wrap_get_params;                    \
 static int tdes_wrap_get_params(OSSL_PARAM params[])                           \
diff --git a/providers/implementations/encode_decode/encode_key2any.c b/providers/implementations/encode_decode/encode_key2any.c
index dc7ccbc2c0..c3402c875c 100644
--- a/providers/implementations/encode_decode/encode_key2any.c
+++ b/providers/implementations/encode_decode/encode_key2any.c
@@ -778,7 +778,7 @@ static const OSSL_PARAM *key2any_settable_ctx_params(ossl_unused void *provctx)
 static int key2any_set_ctx_params(void *vctx, const OSSL_PARAM params[])
 {
     struct key2any_ctx_st *ctx = vctx;
-    OPENSSL_CTX *libctx = PROV_CTX_get0_library_context(ctx->provctx);
+    OPENSSL_CTX *libctx = ossl_prov_ctx_get0_library_context(ctx->provctx);
     const OSSL_PARAM *cipherp =
         OSSL_PARAM_locate_const(params, OSSL_ENCODER_PARAM_CIPHER);
     const OSSL_PARAM *propsp =
diff --git a/providers/implementations/include/prov/ciphercommon.h b/providers/implementations/include/prov/ciphercommon.h
index 4c7eb3171e..137836d7ab 100644
--- a/providers/implementations/include/prov/ciphercommon.h
+++ b/providers/implementations/include/prov/ciphercommon.h
@@ -186,7 +186,7 @@ static void * alg##_##kbits##_##lcmode##_newctx(void *provctx)                 \
      if (ctx != NULL) {                                                        \
          cipher_generic_initkey(ctx, kbits, blkbits, ivbits,                   \
                                 EVP_CIPH_##UCMODE##_MODE, flags,               \
-                                PROV_CIPHER_HW_##alg##_##lcmode(kbits),        \
+                                ossl_prov_cipher_hw_##alg##_##lcmode(kbits),   \
                                 provctx);                                      \
      }                                                                         \
      return ctx;                                                               \
diff --git a/providers/implementations/rands/drbg.c b/providers/implementations/rands/drbg.c
index f97d830478..022e8e3794 100644
--- a/providers/implementations/rands/drbg.c
+++ b/providers/implementations/rands/drbg.c
@@ -136,7 +136,7 @@ static unsigned int get_parent_reseed_count(PROV_DRBG *drbg)
  * Implements the get_entropy() callback
  *
  * If the DRBG has a parent, then the required amount of entropy input
- * is fetched using the parent's PROV_DRBG_generate().
+ * is fetched using the parent's ossl_prov_drbg_generate().
  *
  * Otherwise, the entropy is polled from the system entropy sources
  * using prov_pool_acquire_entropy().
@@ -390,9 +390,9 @@ static void prov_drbg_clear_nonce(PROV_DRBG *drbg, unsigned char *nonce,
  *
  * Returns 1 on success, 0 on failure.
  */
-int PROV_DRBG_instantiate(PROV_DRBG *drbg, unsigned int strength,
-                          int prediction_resistance,
-                          const unsigned char *pers, size_t perslen)
+int ossl_prov_drbg_instantiate(PROV_DRBG *drbg, unsigned int strength,
+                               int prediction_resistance,
+                               const unsigned char *pers, size_t perslen)
 {
     unsigned char *nonce = NULL, *entropy = NULL;
     size_t noncelen = 0, entropylen = 0;
@@ -520,7 +520,7 @@ int PROV_DRBG_instantiate(PROV_DRBG *drbg, unsigned int strength,
  *
  * Returns 1 on success, 0 on failure.
  */
-int PROV_DRBG_uninstantiate(PROV_DRBG *drbg)
+int ossl_prov_drbg_uninstantiate(PROV_DRBG *drbg)
 {
     drbg->state = EVP_RAND_STATE_UNINITIALISED;
     return 1;
@@ -533,9 +533,9 @@ int PROV_DRBG_uninstantiate(PROV_DRBG *drbg)
  *
  * Returns 1 on success, 0 on failure.
  */
-int PROV_DRBG_reseed(PROV_DRBG *drbg, int prediction_resistance,
-                     const unsigned char *ent, size_t ent_len,
-                     const unsigned char *adin, size_t adinlen)
+int ossl_prov_drbg_reseed(PROV_DRBG *drbg, int prediction_resistance,
+                          const unsigned char *ent, size_t ent_len,
+                          const unsigned char *adin, size_t adinlen)
 {
     unsigned char *entropy = NULL;
     size_t entropylen = 0;
@@ -647,9 +647,9 @@ int PROV_DRBG_reseed(PROV_DRBG *drbg, int prediction_resistance,
  * Returns 1 on success, 0 on failure.
  *
  */
-int PROV_DRBG_generate(PROV_DRBG *drbg, unsigned char *out, size_t outlen,
-                       unsigned int strength, int prediction_resistance,
-                       const unsigned char *adin, size_t adinlen)
+int ossl_prov_drbg_generate(PROV_DRBG *drbg, unsigned char *out, size_t outlen,
+                            unsigned int strength, int prediction_resistance,
+                            const unsigned char *adin, size_t adinlen)
 {
     int fork_id;
     int reseed_required = 0;
@@ -706,8 +706,8 @@ int PROV_DRBG_generate(PROV_DRBG *drbg, unsigned char *out, size_t outlen,
         reseed_required = 1;
 
     if (reseed_required || prediction_resistance) {
-        if (!PROV_DRBG_reseed(drbg, prediction_resistance, NULL, 0,
-                              adin, adinlen)) {
+        if (!ossl_prov_drbg_reseed(drbg, prediction_resistance, NULL, 0,
+                                   adin, adinlen)) {
             PROVerr(0, PROV_R_RESEED_ERROR);
             return 0;
         }
@@ -760,7 +760,7 @@ static int rand_drbg_restart(PROV_DRBG *drbg)
     /* repair uninitialized state */
     if (drbg->state == EVP_RAND_STATE_UNINITIALISED)
         /* reinstantiate drbg */
-        PROV_DRBG_instantiate(drbg, drbg->strength, 0, NULL, 0);
+        ossl_prov_drbg_instantiate(drbg, drbg->strength, 0, NULL, 0);
 
     rand_pool_free(drbg->seed_pool);
     drbg->seed_pool = NULL;
diff --git a/providers/implementations/rands/drbg_ctr.c b/providers/implementations/rands/drbg_ctr.c
index a13582f6a2..990fac3e7b 100644
--- a/providers/implementations/rands/drbg_ctr.c
+++ b/providers/implementations/rands/drbg_ctr.c
@@ -330,8 +330,8 @@ static int drbg_ctr_instantiate_wrapper(void *vdrbg, unsigned int strength,
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_instantiate(drbg, strength, prediction_resistance,
-                                 pstr, pstr_len);
+    return ossl_prov_drbg_instantiate(drbg, strength, prediction_resistance,
+                                      pstr, pstr_len);
 }
 
 static int drbg_ctr_reseed(PROV_DRBG *drbg,
@@ -355,8 +355,8 @@ static int drbg_ctr_reseed_wrapper(void *vdrbg, int prediction_resistance,
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_reseed(drbg, prediction_resistance, ent, ent_len,
-                            adin, adin_len);
+    return ossl_prov_drbg_reseed(drbg, prediction_resistance, ent, ent_len,
+                                 adin, adin_len);
 }
 
 static void ctr96_inc(unsigned char *counter)
@@ -452,8 +452,8 @@ static int drbg_ctr_generate_wrapper
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_generate(drbg, out, outlen, strength,
-                              prediction_resistance, adin, adin_len);
+    return ossl_prov_drbg_generate(drbg, out, outlen, strength,
+                                   prediction_resistance, adin, adin_len);
 }
 
 static int drbg_ctr_uninstantiate(PROV_DRBG *drbg)
@@ -465,7 +465,7 @@ static int drbg_ctr_uninstantiate(PROV_DRBG *drbg)
     OPENSSL_cleanse(ctr->bltmp, sizeof(ctr->bltmp));
     OPENSSL_cleanse(ctr->KX, sizeof(ctr->KX));
     ctr->bltmp_pos = 0;
-    return PROV_DRBG_uninstantiate(drbg);
+    return ossl_prov_drbg_uninstantiate(drbg);
 }
 
 static int drbg_ctr_uninstantiate_wrapper(void *vdrbg)
diff --git a/providers/implementations/rands/drbg_hash.c b/providers/implementations/rands/drbg_hash.c
index e420d70d55..cf05188968 100644
--- a/providers/implementations/rands/drbg_hash.c
+++ b/providers/implementations/rands/drbg_hash.c
@@ -270,8 +270,8 @@ static int drbg_hash_instantiate_wrapper(void *vdrbg, unsigned int strength,
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_instantiate(drbg, strength, prediction_resistance,
-                                 pstr, pstr_len);
+    return ossl_prov_drbg_instantiate(drbg, strength, prediction_resistance,
+                                      pstr, pstr_len);
 }
 
 /*
@@ -304,8 +304,8 @@ static int drbg_hash_reseed_wrapper(void *vdrbg, int prediction_resistance,
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_reseed(drbg, prediction_resistance, ent, ent_len,
-                            adin, adin_len);
+    return ossl_prov_drbg_reseed(drbg, prediction_resistance, ent, ent_len,
+                                 adin, adin_len);
 }
 
 /*
@@ -352,8 +352,8 @@ static int drbg_hash_generate_wrapper
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_generate(drbg, out, outlen, strength,
-                              prediction_resistance, adin, adin_len);
+    return ossl_prov_drbg_generate(drbg, out, outlen, strength,
+                                   prediction_resistance, adin, adin_len);
 }
 
 static int drbg_hash_uninstantiate(PROV_DRBG *drbg)
@@ -363,7 +363,7 @@ static int drbg_hash_uninstantiate(PROV_DRBG *drbg)
     OPENSSL_cleanse(hash->V, sizeof(hash->V));
     OPENSSL_cleanse(hash->C, sizeof(hash->C));
     OPENSSL_cleanse(hash->vtmp, sizeof(hash->vtmp));
-    return PROV_DRBG_uninstantiate(drbg);
+    return ossl_prov_drbg_uninstantiate(drbg);
 }
 
 static int drbg_hash_uninstantiate_wrapper(void *vdrbg)
diff --git a/providers/implementations/rands/drbg_hmac.c b/providers/implementations/rands/drbg_hmac.c
index 9b6ce0a9cc..57b9ac63f1 100644
--- a/providers/implementations/rands/drbg_hmac.c
+++ b/providers/implementations/rands/drbg_hmac.c
@@ -154,8 +154,8 @@ static int drbg_hmac_instantiate_wrapper(void *vdrbg, unsigned int strength,
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_instantiate(drbg, strength, prediction_resistance,
-                                 pstr, pstr_len);
+    return ossl_prov_drbg_instantiate(drbg, strength, prediction_resistance,
+                                      pstr, pstr_len);
 }
 
 /*
@@ -182,8 +182,8 @@ static int drbg_hmac_reseed_wrapper(void *vdrbg, int prediction_resistance,
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_reseed(drbg, prediction_resistance, ent, ent_len,
-                            adin, adin_len);
+    return ossl_prov_drbg_reseed(drbg, prediction_resistance, ent, ent_len,
+                                 adin, adin_len);
 }
 
 /*
@@ -251,8 +251,8 @@ static int drbg_hmac_generate_wrapper
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_generate(drbg, out, outlen, strength,
-                              prediction_resistance, adin, adin_len);
+    return ossl_prov_drbg_generate(drbg, out, outlen, strength,
+                                   prediction_resistance, adin, adin_len);
 }
 
 static int drbg_hmac_uninstantiate(PROV_DRBG *drbg)
@@ -261,7 +261,7 @@ static int drbg_hmac_uninstantiate(PROV_DRBG *drbg)
 
     OPENSSL_cleanse(hmac->K, sizeof(hmac->K));
     OPENSSL_cleanse(hmac->V, sizeof(hmac->V));
-    return PROV_DRBG_uninstantiate(drbg);
+    return ossl_prov_drbg_uninstantiate(drbg);
 }
 
 static int drbg_hmac_uninstantiate_wrapper(void *vdrbg)
diff --git a/providers/implementations/rands/drbg_local.h b/providers/implementations/rands/drbg_local.h
index 66539def42..40ca6fadaa 100644
--- a/providers/implementations/rands/drbg_local.h
+++ b/providers/implementations/rands/drbg_local.h
@@ -205,19 +205,19 @@ PROV_DRBG *prov_rand_drbg_new
                      const unsigned char *adin, size_t adin_len));
 void prov_rand_drbg_free(PROV_DRBG *drbg);
 
-int PROV_DRBG_instantiate(PROV_DRBG *drbg, unsigned int strength,
-                          int prediction_resistance,
-                          const unsigned char *pers, size_t perslen);
+int ossl_prov_drbg_instantiate(PROV_DRBG *drbg, unsigned int strength,
+                               int prediction_resistance,
+                               const unsigned char *pers, size_t perslen);
 
-int PROV_DRBG_uninstantiate(PROV_DRBG *drbg);
+int ossl_prov_drbg_uninstantiate(PROV_DRBG *drbg);
 
-int PROV_DRBG_reseed(PROV_DRBG *drbg, int prediction_resistance,
-                     const unsigned char *ent, size_t ent_len,
-                     const unsigned char *adin, size_t adinlen);
+int ossl_prov_drbg_reseed(PROV_DRBG *drbg, int prediction_resistance,
+                          const unsigned char *ent, size_t ent_len,
+                          const unsigned char *adin, size_t adinlen);
 
-int PROV_DRBG_generate(PROV_DRBG *drbg, unsigned char *out, size_t outlen,
-                       unsigned int strength, int prediction_resistance,
-                       const unsigned char *adin, size_t adinlen);
+int ossl_prov_drbg_generate(PROV_DRBG *drbg, unsigned char *out, size_t outlen,
+                            unsigned int strength, int prediction_resistance,
+                            const unsigned char *adin, size_t adinlen);
 
 /* Verify that an array of numeric values is all zero */
 #define PROV_DRBG_VERYIFY_ZEROIZATION(v)    \
diff --git a/providers/implementations/rands/test_rng.c b/providers/implementations/rands/test_rng.c
index b6ec7b104a..bb0d2a46a9 100644
--- a/providers/implementations/rands/test_rng.c
+++ b/providers/implementations/rands/test_rng.c
@@ -94,8 +94,8 @@ static int test_rng_instantiate_wrapper(void *vdrbg, unsigned int strength,
     if (pstr != NULL && pstr_len >= drbg->max_perslen)
         return 0;
 
-    return PROV_DRBG_instantiate(drbg, strength, prediction_resistance,
-                                 pstr, pstr_len);
+    return ossl_prov_drbg_instantiate(drbg, strength, prediction_resistance,
+                                      pstr, pstr_len);
 }
 
 static int test_rng_uninstantiate(PROV_DRBG *drbg)
@@ -103,7 +103,7 @@ static int test_rng_uninstantiate(PROV_DRBG *drbg)
     PROV_TEST_RNG *t = (PROV_TEST_RNG *)drbg->data;
 
     t->entropy_pos = 0;
-    return PROV_DRBG_uninstantiate(drbg);
+    return ossl_prov_drbg_uninstantiate(drbg);
 }
 
 static int test_rng_uninstantiate_wrapper(void *vdrbg)
diff --git a/providers/implementations/storemgmt/file_store.c b/providers/implementations/storemgmt/file_store.c
index 9fd65149ff..5b0616e26a 100644
--- a/providers/implementations/storemgmt/file_store.c
+++ b/providers/implementations/storemgmt/file_store.c
@@ -530,7 +530,7 @@ void file_load_cleanup(void *construct_data)
 static int file_setup_decoders(struct file_ctx_st *ctx)
 {
     EVP_PKEY *dummy; /* for OSSL_DECODER_CTX_new_by_EVP_PKEY() */
-    OPENSSL_CTX *libctx = PROV_CTX_get0_library_context(ctx->provctx);
+    OPENSSL_CTX *libctx = ossl_prov_ctx_get0_library_context(ctx->provctx);
     OSSL_DECODER *to_obj = NULL; /* Last resort decoder */
     OSSL_DECODER_INSTANCE *to_obj_inst = NULL;
     OSSL_DECODER_CLEANUP *old_cleanup = NULL;
diff --git a/providers/legacyprov.c b/providers/legacyprov.c
index f6e9db06f6..2085f4d4b3 100644
--- a/providers/legacyprov.c
+++ b/providers/legacyprov.c
@@ -162,7 +162,7 @@ static const OSSL_ALGORITHM *legacy_query(void *provctx, int operation_id,
 static void legacy_teardown(void *provctx)
 {
     OPENSSL_CTX_free(PROV_LIBRARY_CONTEXT_OF(provctx));
-    PROV_CTX_free(provctx);
+    ossl_prov_ctx_free(provctx);
 }
 
 /* Functions we provide to the core */
@@ -202,15 +202,15 @@ int OSSL_provider_init(const OSSL_CORE_HANDLE *handle,
     if (c_get_libctx == NULL)
         return 0;
 
-    if ((*provctx = PROV_CTX_new()) == NULL
+    if ((*provctx = ossl_prov_ctx_new()) == NULL
         || (libctx = OPENSSL_CTX_new()) == NULL) {
         OPENSSL_CTX_free(libctx);
         legacy_teardown(*provctx);
         *provctx = NULL;
         return 0;
     }
-    PROV_CTX_set0_library_context(*provctx, libctx);
-    PROV_CTX_set0_handle(*provctx, handle);
+    ossl_prov_ctx_set0_library_context(*provctx, libctx);
+    ossl_prov_ctx_set0_handle(*provctx, handle);
 
     *out = legacy_dispatch_table;
 


More information about the openssl-commits mailing list