diff options
author | Niels Möller <nisse@lysator.liu.se> | 2020-11-30 14:55:06 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2020-11-30 14:55:06 +0100 |
commit | 07350a3ff76cc2c61058315b00f6748160cf5704 (patch) | |
tree | 31bce5faa94de86893115958e229d6bfdd88181d | |
parent | d066c53084a639c31d291174e27a26487f1df70a (diff) | |
download | nettle-07350a3ff76cc2c61058315b00f6748160cf5704.tar.gz |
Delete name mangling of internal salsa20 symbols
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | salsa20-core-internal.c | 2 | ||||
-rw-r--r-- | salsa20-crypt-internal.c | 26 | ||||
-rw-r--r-- | salsa20-crypt.c | 2 | ||||
-rw-r--r-- | salsa20-internal.h | 28 | ||||
-rw-r--r-- | salsa20r12-crypt.c | 2 |
6 files changed, 27 insertions, 34 deletions
@@ -8,6 +8,7 @@ * dsa-internal.h: Likewise. * gost28147-internal.h: Likewise. * poly1305-internal.h: Likewise. + * salsa20-internal.h: Likewise. 2020-11-26 Niels Möller <nisse@lysator.liu.se> diff --git a/salsa20-core-internal.c b/salsa20-core-internal.c index f9d3daf2..8f6b2fc9 100644 --- a/salsa20-core-internal.c +++ b/salsa20-core-internal.c @@ -94,7 +94,7 @@ _nettle_salsa20_core_c(uint32_t *dst, const uint32_t *src, unsigned rounds); } while(0) void -_salsa20_core(uint32_t *dst, const uint32_t *src, unsigned rounds) +_nettle_salsa20_core(uint32_t *dst, const uint32_t *src, unsigned rounds) { uint32_t x[_SALSA20_INPUT_LENGTH]; unsigned i; diff --git a/salsa20-crypt-internal.c b/salsa20-crypt-internal.c index da4732bc..6d53bc2b 100644 --- a/salsa20-crypt-internal.c +++ b/salsa20-crypt-internal.c @@ -45,23 +45,21 @@ #include "memxor.h" #if HAVE_NATIVE_salsa20_2core -#undef _salsa20_crypt_2core -#define _salsa20_crypt_2core _salsa20_crypt +#define _nettle_salsa20_crypt_2core _nettle_salsa20_crypt #elif !HAVE_NATIVE_fat_salsa20_2core -#undef _salsa20_crypt_1core -#define _salsa20_crypt_1core _salsa20_crypt +#define _nettle_salsa20_crypt_1core _nettle_salsa20_crypt #endif #if HAVE_NATIVE_salsa20_2core || HAVE_NATIVE_fat_salsa20_2core void -_salsa20_crypt_2core(struct salsa20_ctx *ctx, unsigned rounds, - size_t length, uint8_t *dst, - const uint8_t *src) +_nettle_salsa20_crypt_2core(struct salsa20_ctx *ctx, unsigned rounds, + size_t length, uint8_t *dst, + const uint8_t *src) { uint32_t x[2*_SALSA20_INPUT_LENGTH]; while (length > SALSA20_BLOCK_SIZE) { - _salsa20_2core (x, ctx->input, rounds); + _nettle_salsa20_2core (x, ctx->input, rounds); ctx->input[8] += 2; ctx->input[9] += (ctx->input[8] < 2); if (length <= 2 * SALSA20_BLOCK_SIZE) @@ -75,7 +73,7 @@ _salsa20_crypt_2core(struct salsa20_ctx *ctx, unsigned rounds, dst += 2*SALSA20_BLOCK_SIZE; src += 2*SALSA20_BLOCK_SIZE; } - _salsa20_core (x, ctx->input, rounds); + _nettle_salsa20_core (x, ctx->input, rounds); ctx->input[9] += (++ctx->input[8] == 0); memxor3 (dst, src, x, length); } @@ -83,16 +81,16 @@ _salsa20_crypt_2core(struct salsa20_ctx *ctx, unsigned rounds, #if !HAVE_NATIVE_salsa20_2core void -_salsa20_crypt_1core(struct salsa20_ctx *ctx, unsigned rounds, - size_t length, - uint8_t *dst, - const uint8_t *src) +_nettle_salsa20_crypt_1core(struct salsa20_ctx *ctx, unsigned rounds, + size_t length, + uint8_t *dst, + const uint8_t *src) { for (;;) { uint32_t x[_SALSA20_INPUT_LENGTH]; - _salsa20_core (x, ctx->input, rounds); + _nettle_salsa20_core (x, ctx->input, rounds); ctx->input[9] += (++ctx->input[8] == 0); diff --git a/salsa20-crypt.c b/salsa20-crypt.c index 2031d42d..cca9d6d9 100644 --- a/salsa20-crypt.c +++ b/salsa20-crypt.c @@ -53,5 +53,5 @@ salsa20_crypt(struct salsa20_ctx *ctx, if (!length) return; - _salsa20_crypt (ctx, 20, length, c, m); + _nettle_salsa20_crypt (ctx, 20, length, c, m); } diff --git a/salsa20-internal.h b/salsa20-internal.h index 8d7684e0..c5230db8 100644 --- a/salsa20-internal.h +++ b/salsa20-internal.h @@ -38,31 +38,25 @@ #include "nettle-types.h" #include "salsa20.h" -#define _salsa20_core _nettle_salsa20_core -#define _salsa20_2core _nettle_salsa20_2core -#define _salsa20_crypt _nettle_salsa20_crypt -#define _salsa20_crypt_1core _nettle_salsa20_crypt_1core -#define _salsa20_crypt_2core _nettle_salsa20_crypt_2core - void -_salsa20_core(uint32_t *dst, const uint32_t *src, unsigned rounds); +_nettle_salsa20_core(uint32_t *dst, const uint32_t *src, unsigned rounds); void -_salsa20_crypt(struct salsa20_ctx *ctx, unsigned rounds, - size_t length, uint8_t *dst, - const uint8_t *src); +_nettle_salsa20_crypt(struct salsa20_ctx *ctx, unsigned rounds, + size_t length, uint8_t *dst, + const uint8_t *src); /* Functions available only in some configurations */ void -_salsa20_2core(uint32_t *dst, const uint32_t *src, unsigned rounds); +_nettle_salsa20_2core(uint32_t *dst, const uint32_t *src, unsigned rounds); void -_salsa20_crypt_1core(struct salsa20_ctx *ctx, unsigned rounds, - size_t length, uint8_t *dst, - const uint8_t *src); +_nettle_salsa20_crypt_1core(struct salsa20_ctx *ctx, unsigned rounds, + size_t length, uint8_t *dst, + const uint8_t *src); void -_salsa20_crypt_2core(struct salsa20_ctx *ctx, unsigned rounds, - size_t length, uint8_t *dst, - const uint8_t *src); +_nettle_salsa20_crypt_2core(struct salsa20_ctx *ctx, unsigned rounds, + size_t length, uint8_t *dst, + const uint8_t *src); #endif /* NETTLE_SALSA20_INTERNAL_H_INCLUDED */ diff --git a/salsa20r12-crypt.c b/salsa20r12-crypt.c index 9515251a..a20e1a07 100644 --- a/salsa20r12-crypt.c +++ b/salsa20r12-crypt.c @@ -53,5 +53,5 @@ salsa20r12_crypt(struct salsa20_ctx *ctx, if (!length) return; - _salsa20_crypt (ctx, 12, length, c, m); + _nettle_salsa20_crypt (ctx, 12, length, c, m); } |