diff options
author | Shane Lontis <shane.lontis@oracle.com> | 2021-03-09 02:49:26 +0100 |
---|---|---|
committer | Shane Lontis <shane.lontis@oracle.com> | 2021-03-18 08:52:37 +0100 |
commit | 7bbadfc15a446134d15d8fd0aa5362628b8c96be (patch) | |
tree | 738485a474a2ccd31370d4458d13443c9deb6ed2 /crypto/modes | |
parent | Add ossl_aria symbols (diff) | |
download | openssl-7bbadfc15a446134d15d8fd0aa5362628b8c96be.tar.xz openssl-7bbadfc15a446134d15d8fd0aa5362628b8c96be.zip |
Add ossl_siv symbols
Partial fix for #12964
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14473)
Diffstat (limited to 'crypto/modes')
-rw-r--r-- | crypto/modes/siv128.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/crypto/modes/siv128.c b/crypto/modes/siv128.c index c8bfdb0c51..3e94d0eba7 100644 --- a/crypto/modes/siv128.c +++ b/crypto/modes/siv128.c @@ -140,7 +140,7 @@ __owur static ossl_inline int siv128_do_encrypt(EVP_CIPHER_CTX *ctx, unsigned ch /* * Create a new SIV128_CONTEXT */ -SIV128_CONTEXT *CRYPTO_siv128_new(const unsigned char *key, int klen, +SIV128_CONTEXT *ossl_siv128_new(const unsigned char *key, int klen, EVP_CIPHER *cbc, EVP_CIPHER *ctr, OSSL_LIB_CTX *libctx, const char *propq) { @@ -148,7 +148,7 @@ SIV128_CONTEXT *CRYPTO_siv128_new(const unsigned char *key, int klen, int ret; if ((ctx = OPENSSL_malloc(sizeof(*ctx))) != NULL) { - ret = CRYPTO_siv128_init(ctx, key, klen, cbc, ctr, libctx, propq); + ret = ossl_siv128_init(ctx, key, klen, cbc, ctr, libctx, propq); if (ret) return ctx; OPENSSL_free(ctx); @@ -160,7 +160,7 @@ SIV128_CONTEXT *CRYPTO_siv128_new(const unsigned char *key, int klen, /* * Initialise an existing SIV128_CONTEXT */ -int CRYPTO_siv128_init(SIV128_CONTEXT *ctx, const unsigned char *key, int klen, +int ossl_siv128_init(SIV128_CONTEXT *ctx, const unsigned char *key, int klen, const EVP_CIPHER *cbc, const EVP_CIPHER *ctr, OSSL_LIB_CTX *libctx, const char *propq) { @@ -218,7 +218,7 @@ int CRYPTO_siv128_init(SIV128_CONTEXT *ctx, const unsigned char *key, int klen, /* * Copy an SIV128_CONTEXT object */ -int CRYPTO_siv128_copy_ctx(SIV128_CONTEXT *dest, SIV128_CONTEXT *src) +int ossl_siv128_copy_ctx(SIV128_CONTEXT *dest, SIV128_CONTEXT *src) { memcpy(&dest->d, &src->d, sizeof(src->d)); if (dest->cipher_ctx == NULL) { @@ -243,7 +243,7 @@ int CRYPTO_siv128_copy_ctx(SIV128_CONTEXT *dest, SIV128_CONTEXT *src) * Per RFC5297, the last piece of associated data * is the nonce, but it's not treated special */ -int CRYPTO_siv128_aad(SIV128_CONTEXT *ctx, const unsigned char *aad, +int ossl_siv128_aad(SIV128_CONTEXT *ctx, const unsigned char *aad, size_t len) { SIV_BLOCK mac_out; @@ -270,7 +270,7 @@ int CRYPTO_siv128_aad(SIV128_CONTEXT *ctx, const unsigned char *aad, /* * Provide any data to be encrypted. This can be called once. */ -int CRYPTO_siv128_encrypt(SIV128_CONTEXT *ctx, +int ossl_siv128_encrypt(SIV128_CONTEXT *ctx, const unsigned char *in, unsigned char *out, size_t len) { @@ -297,7 +297,7 @@ int CRYPTO_siv128_encrypt(SIV128_CONTEXT *ctx, /* * Provide any data to be decrypted. This can be called once. */ -int CRYPTO_siv128_decrypt(SIV128_CONTEXT *ctx, +int ossl_siv128_decrypt(SIV128_CONTEXT *ctx, const unsigned char *in, unsigned char *out, size_t len) { @@ -333,7 +333,7 @@ int CRYPTO_siv128_decrypt(SIV128_CONTEXT *ctx, /* * Return the already calculated final result. */ -int CRYPTO_siv128_finish(SIV128_CONTEXT *ctx) +int ossl_siv128_finish(SIV128_CONTEXT *ctx) { return ctx->final_ret; } @@ -341,7 +341,7 @@ int CRYPTO_siv128_finish(SIV128_CONTEXT *ctx) /* * Set the tag */ -int CRYPTO_siv128_set_tag(SIV128_CONTEXT *ctx, const unsigned char *tag, size_t len) +int ossl_siv128_set_tag(SIV128_CONTEXT *ctx, const unsigned char *tag, size_t len) { if (len != SIV_LEN) return 0; @@ -354,7 +354,7 @@ int CRYPTO_siv128_set_tag(SIV128_CONTEXT *ctx, const unsigned char *tag, size_t /* * Retrieve the calculated tag */ -int CRYPTO_siv128_get_tag(SIV128_CONTEXT *ctx, unsigned char *tag, size_t len) +int ossl_siv128_get_tag(SIV128_CONTEXT *ctx, unsigned char *tag, size_t len) { if (len != SIV_LEN) return 0; @@ -367,7 +367,7 @@ int CRYPTO_siv128_get_tag(SIV128_CONTEXT *ctx, unsigned char *tag, size_t len) /* * Release all resources */ -int CRYPTO_siv128_cleanup(SIV128_CONTEXT *ctx) +int ossl_siv128_cleanup(SIV128_CONTEXT *ctx) { if (ctx != NULL) { EVP_CIPHER_CTX_free(ctx->cipher_ctx); @@ -384,7 +384,7 @@ int CRYPTO_siv128_cleanup(SIV128_CONTEXT *ctx) return 1; } -int CRYPTO_siv128_speed(SIV128_CONTEXT *ctx, int arg) +int ossl_siv128_speed(SIV128_CONTEXT *ctx, int arg) { ctx->crypto_ok = (arg == 1) ? -1 : 1; return 1; |