summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2020-11-30 13:06:37 +0100
committerNiels Möller <nisse@lysator.liu.se>2020-11-30 13:06:37 +0100
commit5ebf77033b05fdbad0bb612fa9c224862c6a5b7e (patch)
treed1d85c3d4b2c2f6249c0de3d0afe3e4b7b50f104
parent3246dd90dd26766485dc571b3e40f45da30ed746 (diff)
downloadnettle-5ebf77033b05fdbad0bb612fa9c224862c6a5b7e.tar.gz
Delete name mangling of internal _nettle_ctr_crypt16 function
-rw-r--r--ChangeLog1
-rw-r--r--ctr-internal.h11
-rw-r--r--ctr.c2
-rw-r--r--ctr16.c8
-rw-r--r--gcm.c4
5 files changed, 12 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index ca9b9cac..2a355ba5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
* aes-internal.h: Delete name mangling of internal symbols. Update
all internal references to use _nettle prefix.
* camellia-internal.h: Likewise.
+ * ctr-internal.h: Likewise.
* dsa-internal.h: Likewise.
2020-11-26 Niels Möller <nisse@lysator.liu.se>
diff --git a/ctr-internal.h b/ctr-internal.h
index d8bc1365..e0609ed2 100644
--- a/ctr-internal.h
+++ b/ctr-internal.h
@@ -34,9 +34,6 @@
#include "nettle-types.h"
-/* Name mangling */
-#define _ctr_crypt16 _nettle_ctr_crypt16
-
/* Size limit for temporary stack buffers. */
#define CTR_BUFFER_LIMIT 512
@@ -47,10 +44,10 @@ typedef void
nettle_fill16_func(uint8_t *ctr, size_t n, union nettle_block16 *buffer);
void
-_ctr_crypt16(const void *ctx, nettle_cipher_func *f,
- nettle_fill16_func *fill, uint8_t *ctr,
- size_t length, uint8_t *dst,
- const uint8_t *src);
+_nettle_ctr_crypt16(const void *ctx, nettle_cipher_func *f,
+ nettle_fill16_func *fill, uint8_t *ctr,
+ size_t length, uint8_t *dst,
+ const uint8_t *src);
#endif /* NETTLE_CTR_INTERNAL_H_INCLUDED */
diff --git a/ctr.c b/ctr.c
index c6601547..8c6b4626 100644
--- a/ctr.c
+++ b/ctr.c
@@ -117,7 +117,7 @@ ctr_crypt(const void *ctx, nettle_cipher_func *f,
#if USE_CTR_CRYPT16
if (block_size == 16)
{
- _ctr_crypt16(ctx, f, ctr_fill16, ctr, length, dst, src);
+ _nettle_ctr_crypt16(ctx, f, ctr_fill16, ctr, length, dst, src);
return;
}
#endif
diff --git a/ctr16.c b/ctr16.c
index 7e1c23d2..d744d2a9 100644
--- a/ctr16.c
+++ b/ctr16.c
@@ -47,10 +47,10 @@
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
void
-_ctr_crypt16(const void *ctx, nettle_cipher_func *f,
- nettle_fill16_func *fill, uint8_t *ctr,
- size_t length, uint8_t *dst,
- const uint8_t *src)
+_nettle_ctr_crypt16(const void *ctx, nettle_cipher_func *f,
+ nettle_fill16_func *fill, uint8_t *ctr,
+ size_t length, uint8_t *dst,
+ const uint8_t *src)
{
if (dst != src && !((uintptr_t) dst % sizeof(uint64_t)))
{
diff --git a/gcm.c b/gcm.c
index d6d68070..d1f21d3a 100644
--- a/gcm.c
+++ b/gcm.c
@@ -430,7 +430,7 @@ gcm_encrypt (struct gcm_ctx *ctx, const struct gcm_key *key,
{
assert(ctx->data_size % GCM_BLOCK_SIZE == 0);
- _ctr_crypt16(cipher, f, gcm_fill, ctx->ctr.b, length, dst, src);
+ _nettle_ctr_crypt16(cipher, f, gcm_fill, ctx->ctr.b, length, dst, src);
_nettle_gcm_hash(key, &ctx->x, length, dst);
ctx->data_size += length;
@@ -444,7 +444,7 @@ gcm_decrypt(struct gcm_ctx *ctx, const struct gcm_key *key,
assert(ctx->data_size % GCM_BLOCK_SIZE == 0);
_nettle_gcm_hash(key, &ctx->x, length, src);
- _ctr_crypt16(cipher, f, gcm_fill, ctx->ctr.b, length, dst, src);
+ _nettle_ctr_crypt16(cipher, f, gcm_fill, ctx->ctr.b, length, dst, src);
ctx->data_size += length;
}