summaryrefslogtreecommitdiffstats
path: root/providers
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2021-02-17 17:54:29 +1000
committerPauli <ppzgs1@gmail.com>2021-02-18 19:32:20 +1000
commite36b3c2f757cc7d68dc24174a00476104428b099 (patch)
tree8aa14c5549e04063cdc39a322f0aeb193f147792 /providers
parentadc11e1b9cf12df3c67de165a2b42ac72266cbca (diff)
Fix external symbols in the provider cipher implementations.
Partial fix for #12964 This add ossl_ names for the following symbols. chacha20_dinit, chacha20_einit, chacha20_initctx, ccm_cipher, ccm_dinit, ccm_einit, ccm_generic_auth_decrypt, ccm_generic_auth_encrypt, ccm_generic_gettag, ccm_generic_setaad, ccm_generic_setiv, ccm_get_ctx_params, ccm_initctx, ccm_set_ctx_params, ccm_stream_final, ccm_stream_update gcm_aad_update, gcm_cipher, gcm_cipher_final, gcm_cipher_update gcm_dinit, gcm_einit, gcm_get_ctx_params, gcm_initctx, gcm_one_shot gcm_set_ctx_params, gcm_setiv, gcm_stream_final, gcm_stream_update tdes_dinit, tdes_dupctx, tdes_einit, tdes_freectx tdes_get_ctx_params, tdes_gettable_ctx_params, tdes_newctx PROV_CIPHER_HW_des_*, padblock, unpadblock, tlsunpadblock, fillblock, trailingdata Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/14209)
Diffstat (limited to 'providers')
-rw-r--r--providers/implementations/ciphers/cipher_aes_ccm.c2
-rw-r--r--providers/implementations/ciphers/cipher_aes_ccm_hw.c10
-rw-r--r--providers/implementations/ciphers/cipher_aes_ccm_hw_aesni.inc10
-rw-r--r--providers/implementations/ciphers/cipher_aes_ccm_hw_t4.inc10
-rw-r--r--providers/implementations/ciphers/cipher_aes_gcm.c4
-rw-r--r--providers/implementations/ciphers/cipher_aes_gcm_hw.c8
-rw-r--r--providers/implementations/ciphers/cipher_aes_gcm_hw_aesni.inc8
-rw-r--r--providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc8
-rw-r--r--providers/implementations/ciphers/cipher_aes_gcm_hw_t4.inc8
-rw-r--r--providers/implementations/ciphers/cipher_aes_ocb.c5
-rw-r--r--providers/implementations/ciphers/cipher_aria_ccm.c2
-rw-r--r--providers/implementations/ciphers/cipher_aria_ccm_hw.c10
-rw-r--r--providers/implementations/ciphers/cipher_aria_gcm.c4
-rw-r--r--providers/implementations/ciphers/cipher_aria_gcm_hw.c10
-rw-r--r--providers/implementations/ciphers/cipher_chacha20.c16
-rw-r--r--providers/implementations/ciphers/cipher_chacha20.h6
-rw-r--r--providers/implementations/ciphers/cipher_chacha20_poly1305.c2
-rw-r--r--providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c10
-rw-r--r--providers/implementations/ciphers/cipher_des.c2
-rw-r--r--providers/implementations/ciphers/cipher_des.h12
-rw-r--r--providers/implementations/ciphers/cipher_des_hw.c2
-rw-r--r--providers/implementations/ciphers/cipher_tdes.h34
-rw-r--r--providers/implementations/ciphers/cipher_tdes_common.c22
-rw-r--r--providers/implementations/ciphers/cipher_tdes_wrap.c19
-rw-r--r--providers/implementations/ciphers/ciphercommon.c17
-rw-r--r--providers/implementations/ciphers/ciphercommon_block.c23
-rw-r--r--providers/implementations/ciphers/ciphercommon_ccm.c29
-rw-r--r--providers/implementations/ciphers/ciphercommon_ccm_hw.c22
-rw-r--r--providers/implementations/ciphers/ciphercommon_gcm.c31
-rw-r--r--providers/implementations/ciphers/ciphercommon_gcm_hw.c17
-rw-r--r--providers/implementations/ciphers/ciphercommon_local.h10
-rw-r--r--providers/implementations/include/prov/ciphercommon.h11
-rw-r--r--providers/implementations/include/prov/ciphercommon_aead.h16
-rw-r--r--providers/implementations/include/prov/ciphercommon_ccm.h37
-rw-r--r--providers/implementations/include/prov/ciphercommon_gcm.h36
35 files changed, 244 insertions, 229 deletions
diff --git a/providers/implementations/ciphers/cipher_aes_ccm.c b/providers/implementations/ciphers/cipher_aes_ccm.c
index 5913b2ce0c..8da044bd95 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, ossl_prov_aes_hw_ccm(keybits));
+ ossl_ccm_initctx(&ctx->base, keybits, ossl_prov_aes_hw_ccm(keybits));
return ctx;
}
diff --git a/providers/implementations/ciphers/cipher_aes_ccm_hw.c b/providers/implementations/ciphers/cipher_aes_ccm_hw.c
index db50187ea9..c9a7d18d7a 100644
--- a/providers/implementations/ciphers/cipher_aes_ccm_hw.c
+++ b/providers/implementations/ciphers/cipher_aes_ccm_hw.c
@@ -48,11 +48,11 @@ static int ccm_generic_aes_initkey(PROV_CCM_CTX *ctx, const unsigned char *key,
static const PROV_CCM_HW aes_ccm = {
ccm_generic_aes_initkey,
- ccm_generic_setiv,
- ccm_generic_setaad,
- ccm_generic_auth_encrypt,
- ccm_generic_auth_decrypt,
- ccm_generic_gettag
+ ossl_ccm_generic_setiv,
+ ossl_ccm_generic_setaad,
+ ossl_ccm_generic_auth_encrypt,
+ ossl_ccm_generic_auth_decrypt,
+ ossl_ccm_generic_gettag
};
#if defined(S390X_aes_128_CAPABLE)
diff --git a/providers/implementations/ciphers/cipher_aes_ccm_hw_aesni.inc b/providers/implementations/ciphers/cipher_aes_ccm_hw_aesni.inc
index 1860f3f701..4772a42f21 100644
--- a/providers/implementations/ciphers/cipher_aes_ccm_hw_aesni.inc
+++ b/providers/implementations/ciphers/cipher_aes_ccm_hw_aesni.inc
@@ -25,11 +25,11 @@ static int ccm_aesni_initkey(PROV_CCM_CTX *ctx, const unsigned char *key,
static const PROV_CCM_HW aesni_ccm = {
ccm_aesni_initkey,
- ccm_generic_setiv,
- ccm_generic_setaad,
- ccm_generic_auth_encrypt,
- ccm_generic_auth_decrypt,
- ccm_generic_gettag
+ ossl_ccm_generic_setiv,
+ ossl_ccm_generic_setaad,
+ ossl_ccm_generic_auth_encrypt,
+ ossl_ccm_generic_auth_decrypt,
+ ossl_ccm_generic_gettag
};
const PROV_CCM_HW *ossl_prov_aes_hw_ccm(size_t keybits)
diff --git a/providers/implementations/ciphers/cipher_aes_ccm_hw_t4.inc b/providers/implementations/ciphers/cipher_aes_ccm_hw_t4.inc
index f659ab9b2d..e783b008cf 100644
--- a/providers/implementations/ciphers/cipher_aes_ccm_hw_t4.inc
+++ b/providers/implementations/ciphers/cipher_aes_ccm_hw_t4.inc
@@ -23,11 +23,11 @@ static int ccm_t4_aes_initkey(PROV_CCM_CTX *ctx, const unsigned char *key,
static const PROV_CCM_HW t4_aes_ccm = {
ccm_t4_aes_initkey,
- ccm_generic_setiv,
- ccm_generic_setaad,
- ccm_generic_auth_encrypt,
- ccm_generic_auth_decrypt,
- ccm_generic_gettag
+ ossl_ccm_generic_setiv,
+ ossl_ccm_generic_setaad,
+ ossl_ccm_generic_auth_encrypt,
+ ossl_ccm_generic_auth_decrypt,
+ ossl_ccm_generic_gettag
};
const PROV_CCM_HW *ossl_prov_aes_hw_ccm(size_t keybits)
diff --git a/providers/implementations/ciphers/cipher_aes_gcm.c b/providers/implementations/ciphers/cipher_aes_gcm.c
index 6e97b1f9d9..f9463ea7df 100644
--- a/providers/implementations/ciphers/cipher_aes_gcm.c
+++ b/providers/implementations/ciphers/cipher_aes_gcm.c
@@ -32,8 +32,8 @@ static void *aes_gcm_newctx(void *provctx, size_t keybits)
ctx = OPENSSL_zalloc(sizeof(*ctx));
if (ctx != NULL)
- gcm_initctx(provctx, &ctx->base, keybits, ossl_prov_aes_hw_gcm(keybits),
- AES_GCM_IV_MIN_SIZE);
+ ossl_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_hw.c b/providers/implementations/ciphers/cipher_aes_gcm_hw.c
index f29a280643..b322a29196 100644
--- a/providers/implementations/ciphers/cipher_aes_gcm_hw.c
+++ b/providers/implementations/ciphers/cipher_aes_gcm_hw.c
@@ -126,11 +126,11 @@ static int generic_aes_gcm_cipher_update(PROV_GCM_CTX *ctx, const unsigned char
static const PROV_GCM_HW aes_gcm = {
aes_gcm_initkey,
- gcm_setiv,
- gcm_aad_update,
+ ossl_gcm_setiv,
+ ossl_gcm_aad_update,
generic_aes_gcm_cipher_update,
- gcm_cipher_final,
- gcm_one_shot
+ ossl_gcm_cipher_final,
+ ossl_gcm_one_shot
};
#if defined(S390X_aes_128_CAPABLE)
diff --git a/providers/implementations/ciphers/cipher_aes_gcm_hw_aesni.inc b/providers/implementations/ciphers/cipher_aes_gcm_hw_aesni.inc
index c25bd617c2..e17ff8cf94 100644
--- a/providers/implementations/ciphers/cipher_aes_gcm_hw_aesni.inc
+++ b/providers/implementations/ciphers/cipher_aes_gcm_hw_aesni.inc
@@ -24,11 +24,11 @@ static int aesni_gcm_initkey(PROV_GCM_CTX *ctx, const unsigned char *key,
static const PROV_GCM_HW aesni_gcm = {
aesni_gcm_initkey,
- gcm_setiv,
- gcm_aad_update,
+ ossl_gcm_setiv,
+ ossl_gcm_aad_update,
generic_aes_gcm_cipher_update,
- gcm_cipher_final,
- gcm_one_shot
+ ossl_gcm_cipher_final,
+ ossl_gcm_one_shot
};
const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits)
diff --git a/providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc b/providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc
index 5c84bf31fd..572f8412bf 100644
--- a/providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc
+++ b/providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc
@@ -70,11 +70,11 @@ static int armv8_aes_gcm_initkey(PROV_GCM_CTX *ctx, const unsigned char *key,
static const PROV_GCM_HW armv8_aes_gcm = {
armv8_aes_gcm_initkey,
- gcm_setiv,
- gcm_aad_update,
+ ossl_gcm_setiv,
+ ossl_gcm_aad_update,
generic_aes_gcm_cipher_update,
- gcm_cipher_final,
- gcm_one_shot
+ ossl_gcm_cipher_final,
+ ossl_gcm_one_shot
};
const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits)
diff --git a/providers/implementations/ciphers/cipher_aes_gcm_hw_t4.inc b/providers/implementations/ciphers/cipher_aes_gcm_hw_t4.inc
index 1ad3ea465d..8ccc802814 100644
--- a/providers/implementations/ciphers/cipher_aes_gcm_hw_t4.inc
+++ b/providers/implementations/ciphers/cipher_aes_gcm_hw_t4.inc
@@ -40,11 +40,11 @@ static int t4_aes_gcm_initkey(PROV_GCM_CTX *ctx, const unsigned char *key,
static const PROV_GCM_HW t4_aes_gcm = {
t4_aes_gcm_initkey,
- gcm_setiv,
- gcm_aad_update,
+ ossl_gcm_setiv,
+ ossl_gcm_aad_update,
generic_aes_gcm_cipher_update,
- gcm_cipher_final,
- gcm_one_shot
+ ossl_gcm_cipher_final,
+ ossl_gcm_one_shot
};
const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits)
{
diff --git a/providers/implementations/ciphers/cipher_aes_ocb.c b/providers/implementations/ciphers/cipher_aes_ocb.c
index faa6cb470c..69ee9f2cc5 100644
--- a/providers/implementations/ciphers/cipher_aes_ocb.c
+++ b/providers/implementations/ciphers/cipher_aes_ocb.c
@@ -162,7 +162,7 @@ static int aes_ocb_block_update_internal(PROV_AES_OCB_CTX *ctx,
size_t outlint = 0;
if (*bufsz != 0)
- nextblocks = fillblock(buf, bufsz, AES_BLOCK_SIZE, &in, &inl);
+ nextblocks = ossl_cipher_fillblock(buf, bufsz, AES_BLOCK_SIZE, &in, &inl);
else
nextblocks = inl & ~(AES_BLOCK_SIZE-1);
@@ -193,7 +193,8 @@ static int aes_ocb_block_update_internal(PROV_AES_OCB_CTX *ctx,
in += nextblocks;
inl -= nextblocks;
}
- if (inl != 0 && !trailingdata(buf, bufsz, AES_BLOCK_SIZE, &in, &inl)) {
+ if (inl != 0
+ && !ossl_cipher_trailingdata(buf, bufsz, AES_BLOCK_SIZE, &in, &inl)) {
/* PROVerr already called */
return 0;
}
diff --git a/providers/implementations/ciphers/cipher_aria_ccm.c b/providers/implementations/ciphers/cipher_aria_ccm.c
index a19ad65b62..9952078c91 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, ossl_prov_aria_hw_ccm(keybits));
+ ossl_ccm_initctx(&ctx->base, keybits, ossl_prov_aria_hw_ccm(keybits));
return ctx;
}
diff --git a/providers/implementations/ciphers/cipher_aria_ccm_hw.c b/providers/implementations/ciphers/cipher_aria_ccm_hw.c
index ec39f5702f..6d5a435a62 100644
--- a/providers/implementations/ciphers/cipher_aria_ccm_hw.c
+++ b/providers/implementations/ciphers/cipher_aria_ccm_hw.c
@@ -28,11 +28,11 @@ static int ccm_aria_initkey(PROV_CCM_CTX *ctx,
static const PROV_CCM_HW ccm_aria = {
ccm_aria_initkey,
- ccm_generic_setiv,
- ccm_generic_setaad,
- ccm_generic_auth_encrypt,
- ccm_generic_auth_decrypt,
- ccm_generic_gettag
+ ossl_ccm_generic_setiv,
+ ossl_ccm_generic_setaad,
+ ossl_ccm_generic_auth_encrypt,
+ ossl_ccm_generic_auth_decrypt,
+ ossl_ccm_generic_gettag
};
const PROV_CCM_HW *ossl_prov_aria_hw_ccm(size_t keybits)
{
diff --git a/providers/implementations/ciphers/cipher_aria_gcm.c b/providers/implementations/ciphers/cipher_aria_gcm.c
index ad667ae27a..974d70b844 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,
- ossl_prov_aria_hw_gcm(keybits), ARIA_GCM_IV_MIN_SIZE);
+ ossl_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_hw.c b/providers/implementations/ciphers/cipher_aria_gcm_hw.c
index 54c635e4bf..3f9832dea0 100644
--- a/providers/implementations/ciphers/cipher_aria_gcm_hw.c
+++ b/providers/implementations/ciphers/cipher_aria_gcm_hw.c
@@ -25,11 +25,11 @@ static int aria_gcm_initkey(PROV_GCM_CTX *ctx, const unsigned char *key,
static const PROV_GCM_HW aria_gcm = {
aria_gcm_initkey,
- gcm_setiv,
- gcm_aad_update,
- gcm_cipher_update,
- gcm_cipher_final,
- gcm_one_shot
+ ossl_gcm_setiv,
+ ossl_gcm_aad_update,
+ ossl_gcm_cipher_update,
+ ossl_gcm_cipher_final,
+ ossl_gcm_one_shot
};
const PROV_GCM_HW *ossl_prov_aria_hw_gcm(size_t keybits)
{
diff --git a/providers/implementations/ciphers/cipher_chacha20.c b/providers/implementations/ciphers/cipher_chacha20.c
index c4042c1b39..6b1fdb2bd5 100644
--- a/providers/implementations/ciphers/cipher_chacha20.c
+++ b/providers/implementations/ciphers/cipher_chacha20.c
@@ -31,7 +31,7 @@ static OSSL_FUNC_cipher_settable_ctx_params_fn chacha20_settable_ctx_params;
#define chacha20_final ossl_cipher_generic_stream_final
#define chacha20_gettable_params ossl_cipher_generic_gettable_params
-void chacha20_initctx(PROV_CHACHA20_CTX *ctx)
+void ossl_chacha20_initctx(PROV_CHACHA20_CTX *ctx)
{
ossl_cipher_generic_initkey(ctx, CHACHA20_KEYLEN * 8,
CHACHA20_BLKLEN * 8,
@@ -50,7 +50,7 @@ static void *chacha20_newctx(void *provctx)
ctx = OPENSSL_zalloc(sizeof(*ctx));
if (ctx != NULL)
- chacha20_initctx(ctx);
+ ossl_chacha20_initctx(ctx);
return ctx;
}
@@ -140,8 +140,8 @@ const OSSL_PARAM *chacha20_settable_ctx_params(ossl_unused void *provctx)
return chacha20_known_settable_ctx_params;
}
-int chacha20_einit(void *vctx, const unsigned char *key, size_t keylen,
- const unsigned char *iv, size_t ivlen)
+int ossl_chacha20_einit(void *vctx, const unsigned char *key, size_t keylen,
+ const unsigned char *iv, size_t ivlen)
{
int ret;
@@ -156,8 +156,8 @@ int chacha20_einit(void *vctx, const unsigned char *key, size_t keylen,
return ret;
}
-int chacha20_dinit(void *vctx, const unsigned char *key, size_t keylen,
- const unsigned char *iv, size_t ivlen)
+int ossl_chacha20_dinit(void *vctx, const unsigned char *key, size_t keylen,
+ const unsigned char *iv, size_t ivlen)
{
int ret;
@@ -176,8 +176,8 @@ int chacha20_dinit(void *vctx, const unsigned char *key, size_t keylen,
const OSSL_DISPATCH ossl_chacha20_functions[] = {
{ OSSL_FUNC_CIPHER_NEWCTX, (void (*)(void))chacha20_newctx },
{ OSSL_FUNC_CIPHER_FREECTX, (void (*)(void))chacha20_freectx },
- { OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void))chacha20_einit },
- { OSSL_FUNC_CIPHER_DECRYPT_INIT, (void (*)(void))chacha20_dinit },
+ { OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void))ossl_chacha20_einit },
+ { OSSL_FUNC_CIPHER_DECRYPT_INIT, (void (*)(void))ossl_chacha20_dinit },
{ OSSL_FUNC_CIPHER_UPDATE, (void (*)(void))chacha20_update },
{ OSSL_FUNC_CIPHER_FINAL, (void (*)(void))chacha20_final },
{ OSSL_FUNC_CIPHER_CIPHER, (void (*)(void))chacha20_cipher},
diff --git a/providers/implementations/ciphers/cipher_chacha20.h b/providers/implementations/ciphers/cipher_chacha20.h
index c494de7d85..c986838d93 100644
--- a/providers/implementations/ciphers/cipher_chacha20.h
+++ b/providers/implementations/ciphers/cipher_chacha20.h
@@ -29,6 +29,6 @@ typedef struct prov_cipher_hw_chacha20_st {
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;
-void chacha20_initctx(PROV_CHACHA20_CTX *ctx);
+OSSL_FUNC_cipher_encrypt_init_fn ossl_chacha20_einit;
+OSSL_FUNC_cipher_decrypt_init_fn ossl_chacha20_dinit;
+void ossl_chacha20_initctx(PROV_CHACHA20_CTX *ctx);
diff --git a/providers/implementations/ciphers/cipher_chacha20_poly1305.c b/providers/implementations/ciphers/cipher_chacha20_poly1305.c
index b328cdb993..46c20fd7c5 100644
--- a/providers/implementations/ciphers/cipher_chacha20_poly1305.c
+++ b/providers/implementations/ciphers/cipher_chacha20_poly1305.c
@@ -55,7 +55,7 @@ static void *chacha20_poly1305_newctx(void *provctx)
NULL);
ctx->nonce_len = CHACHA20_POLY1305_IVLEN;
ctx->tls_payload_length = NO_TLS_PAYLOAD_LENGTH;
- chacha20_initctx(&ctx->chacha);
+ ossl_chacha20_initctx(&ctx->chacha);
}
return ctx;
}
diff --git a/providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c b/providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c
index b60669de97..4e4165868e 100644
--- a/providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c
+++ b/providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c
@@ -68,9 +68,9 @@ static int chacha20_poly1305_initkey(PROV_CIPHER_CTX *bctx,
ctx->tls_payload_length = NO_TLS_PAYLOAD_LENGTH;
if (bctx->enc)
- return chacha20_einit(&ctx->chacha, key, keylen, NULL, 0);
+ return ossl_chacha20_einit(&ctx->chacha, key, keylen, NULL, 0);
else
- return chacha20_dinit(&ctx->chacha, key, keylen, NULL, 0);
+ return ossl_chacha20_dinit(&ctx->chacha, key, keylen, NULL, 0);
}
static int chacha20_poly1305_initiv(PROV_CIPHER_CTX *bctx)
@@ -91,9 +91,11 @@ static int chacha20_poly1305_initiv(PROV_CIPHER_CTX *bctx)
ctx->nonce_len);
if (bctx->enc)
- ret = chacha20_einit(&ctx->chacha, NULL, 0, tempiv, sizeof(tempiv));
+ ret = ossl_chacha20_einit(&ctx->chacha, NULL, 0,
+ tempiv, sizeof(tempiv));
else
- ret = chacha20_dinit(&ctx->chacha, NULL, 0, tempiv, sizeof(tempiv));
+ ret = ossl_chacha20_dinit(&ctx->chacha, NULL, 0,
+ tempiv, sizeof(tempiv));
ctx->nonce[0] = ctx->chacha.counter[1];
ctx->nonce[1] = ctx->chacha.counter[2];
ctx->nonce[2] = ctx->chacha.counter[3];
diff --git a/providers/implementations/ciphers/cipher_des.c b/providers/implementations/ciphers/cipher_des.c
index 11688080ce..179ebd00ad 100644
--- a/providers/implementations/ciphers/cipher_des.c
+++ b/providers/implementations/ciphers/cipher_des.c
@@ -148,7 +148,7 @@ static void *des_##lcmode##_newctx(void *provctx) \
{ \
return des_newctx(provctx, kbits, blkbits, ivbits, \
EVP_CIPH_##UCMODE##_MODE, flags, \
- PROV_CIPHER_HW_des_##lcmode()); \
+ ossl_prov_cipher_hw_des_##lcmode()); \
} \
static OSSL_FUNC_cipher_get_params_fn des_##lcmode##_get_params; \
static int des_##lcmode##_get_params(OSSL_PARAM params[]) \
diff --git a/providers/implementations/ciphers/cipher_des.h b/providers/implementations/ciphers/cipher_des.h
index 78ca686bad..f7a1f6d6cc 100644
--- a/providers/implementations/ciphers/cipher_des.h
+++ b/providers/implementations/ciphers/cipher_des.h
@@ -25,9 +25,9 @@ typedef struct prov_des_ctx_st {
} PROV_DES_CTX;
-const PROV_CIPHER_HW *PROV_CIPHER_HW_des_cbc(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_des_ecb(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_des_ofb64(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_des_cfb64(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_des_cfb1(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_des_cfb8(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_des_cbc(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_des_ecb(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_des_ofb64(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_des_cfb64(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_des_cfb1(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_des_cfb8(void);
diff --git a/providers/implementations/ciphers/cipher_des_hw.c b/providers/implementations/ciphers/cipher_des_hw.c
index f52bade45e..4ae15c3826 100644
--- a/providers/implementations/ciphers/cipher_des_hw.c
+++ b/providers/implementations/ciphers/cipher_des_hw.c
@@ -183,7 +183,7 @@ static const PROV_CIPHER_HW des_##mode = { \
cipher_hw_des_##mode##_cipher, \
cipher_hw_des_copyctx \
}; \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_des_##mode(void) \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_des_##mode(void) \
{ \
return &des_##mode; \
}
diff --git a/providers/implementations/ciphers/cipher_tdes.h b/providers/implementations/ciphers/cipher_tdes.h
index 9bef908cc3..3c9147d45d 100644
--- a/providers/implementations/ciphers/cipher_tdes.h
+++ b/providers/implementations/ciphers/cipher_tdes.h
@@ -33,7 +33,7 @@ typedef struct prov_tdes_ctx_st {
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, \
+ return ossl_tdes_newctx(provctx, EVP_CIPH_##UCMODE##_MODE, kbits, blkbits, \
ivbits, flags, \
ossl_prov_cipher_hw_tdes_##type##_##lcmode()); \
} \
@@ -44,23 +44,25 @@ static int tdes_##type##_##lcmode##_get_params(OSSL_PARAM params[]) \
flags, kbits, blkbits, ivbits); \
} \
const OSSL_DISPATCH ossl_tdes_##type##_##lcmode##_functions[] = { \
- { OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void))tdes_einit }, \
- { OSSL_FUNC_CIPHER_DECRYPT_INIT, (void (*)(void))tdes_dinit }, \
+ { OSSL_FUNC_CIPHER_ENCRYPT_INIT, (void (*)(void))ossl_tdes_einit }, \
+ { OSSL_FUNC_CIPHER_DECRYPT_INIT, (void (*)(void))ossl_tdes_dinit }, \
{ OSSL_FUNC_CIPHER_UPDATE, \
(void (*)(void))ossl_cipher_generic_##block##_update }, \
- { OSSL_FUNC_CIPHER_FINAL, (void (*)(void))ossl_cipher_generic_##block##_final },\
+ { OSSL_FUNC_CIPHER_FINAL, \
+ (void (*)(void))ossl_cipher_generic_##block##_final }, \
{ OSSL_FUNC_CIPHER_CIPHER, (void (*)(void))ossl_cipher_generic_cipher }, \
{ OSSL_FUNC_CIPHER_NEWCTX, \
(void (*)(void))tdes_##type##_##lcmode##_newctx }, \
- { OSSL_FUNC_CIPHER_DUPCTX, (void (*)(void))tdes_dupctx }, \
- { OSSL_FUNC_CIPHER_FREECTX, (void (*)(void))tdes_freectx }, \
+ { OSSL_FUNC_CIPHER_DUPCTX, (void (*)(void))ossl_tdes_dupctx }, \
+ { OSSL_FUNC_CIPHER_FREECTX, (void (*)(void))ossl_tdes_freectx }, \
{ OSSL_FUNC_CIPHER_GET_PARAMS, \
(void (*)(void))tdes_##type##_##lcmode##_get_params }, \
{ OSSL_FUNC_CIPHER_GETTABLE_PARAMS, \
(void (*)(void))ossl_cipher_generic_gettable_params }, \
- { OSSL_FUNC_CIPHER_GET_CTX_PARAMS, (void (*)(void))tdes_get_ctx_params }, \
+ { OSSL_FUNC_CIPHER_GET_CTX_PARAMS, \
+ (void (*)(void))ossl_tdes_get_ctx_params }, \
{ OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS, \
- (void (*)(void))tdes_gettable_ctx_params }, \
+ (void (*)(void))ossl_tdes_gettable_ctx_params }, \
{ OSSL_FUNC_CIPHER_SET_CTX_PARAMS, \
(void (*)(void))ossl_cipher_generic_set_ctx_params }, \
{ OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS, \
@@ -68,14 +70,14 @@ const OSSL_DISPATCH ossl_tdes_##type##_##lcmode##_functions[] = { \
{ 0, NULL } \
}
-void *tdes_newctx(void *provctx, int mode, size_t kbits, size_t blkbits,
- size_t ivbits, uint64_t flags, const PROV_CIPHER_HW *hw);
-OSSL_FUNC_cipher_dupctx_fn tdes_dupctx;
-OSSL_FUNC_cipher_freectx_fn tdes_freectx;
-OSSL_FUNC_cipher_encrypt_init_fn tdes_einit;
-OSSL_FUNC_cipher_decrypt_init_fn tdes_dinit;
-OSSL_FUNC_cipher_get_ctx_params_fn tdes_get_ctx_params;
-OSSL_FUNC_cipher_gettable_ctx_params_fn tdes_gettable_ctx_params;
+void *ossl_tdes_newctx(void *provctx, int mode, size_t kbits, size_t blkbits,
+ size_t ivbits, uint64_t flags, const PROV_CIPHER_HW *hw);
+OSSL_FUNC_cipher_dupctx_fn ossl_tdes_dupctx;
+OSSL_FUNC_cipher_freectx_fn ossl_tdes_free