diff options
author | Niels Möller <nisse@lysator.liu.se> | 2020-11-30 15:03:20 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2020-11-30 15:03:20 +0100 |
commit | e053691063525b81fef0021666996cb5a2287582 (patch) | |
tree | e4d1f2022efaca95ef0e1d5d5611c408d45f23d2 | |
parent | 07350a3ff76cc2c61058315b00f6748160cf5704 (diff) | |
download | nettle-e053691063525b81fef0021666996cb5a2287582.tar.gz |
Delete name mangling of internal sha3 symbols
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | sha3-224.c | 5 | ||||
-rw-r--r-- | sha3-256.c | 5 | ||||
-rw-r--r-- | sha3-384.c | 5 | ||||
-rw-r--r-- | sha3-512.c | 5 | ||||
-rw-r--r-- | sha3-internal.h | 19 | ||||
-rw-r--r-- | sha3.c | 12 |
7 files changed, 27 insertions, 25 deletions
@@ -9,6 +9,7 @@ * gost28147-internal.h: Likewise. * poly1305-internal.h: Likewise. * salsa20-internal.h: Likewise. + * sha3-internal.h: Likewise. 2020-11-26 Niels Möller <nisse@lysator.liu.se> @@ -54,8 +54,9 @@ sha3_224_update (struct sha3_224_ctx *ctx, size_t length, const uint8_t *data) { - ctx->index = _sha3_update (&ctx->state, SHA3_224_BLOCK_SIZE, ctx->block, - ctx->index, length, data); + ctx->index = _nettle_sha3_update (&ctx->state, + SHA3_224_BLOCK_SIZE, ctx->block, + ctx->index, length, data); } void @@ -54,8 +54,9 @@ sha3_256_update (struct sha3_256_ctx *ctx, size_t length, const uint8_t *data) { - ctx->index = _sha3_update (&ctx->state, SHA3_256_BLOCK_SIZE, ctx->block, - ctx->index, length, data); + ctx->index = _nettle_sha3_update (&ctx->state, + SHA3_256_BLOCK_SIZE, ctx->block, + ctx->index, length, data); } void @@ -54,8 +54,9 @@ sha3_384_update (struct sha3_384_ctx *ctx, size_t length, const uint8_t *data) { - ctx->index = _sha3_update (&ctx->state, SHA3_384_BLOCK_SIZE, ctx->block, - ctx->index, length, data); + ctx->index = _nettle_sha3_update (&ctx->state, + SHA3_384_BLOCK_SIZE, ctx->block, + ctx->index, length, data); } void @@ -54,8 +54,9 @@ sha3_512_update (struct sha3_512_ctx *ctx, size_t length, const uint8_t *data) { - ctx->index = _sha3_update (&ctx->state, SHA3_512_BLOCK_SIZE, ctx->block, - ctx->index, length, data); + ctx->index = _nettle_sha3_update (&ctx->state, + SHA3_512_BLOCK_SIZE, ctx->block, + ctx->index, length, data); } void diff --git a/sha3-internal.h b/sha3-internal.h index 8054cb76..9b01231a 100644 --- a/sha3-internal.h +++ b/sha3-internal.h @@ -36,28 +36,25 @@ #include "nettle-types.h" -#define _sha3_update _nettle_sha3_update -#define _sha3_pad _nettle_sha3_pad - #define SHA3_HASH_MAGIC 6 #define SHA3_SHAKE_MAGIC 0x1f unsigned -_sha3_update (struct sha3_state *state, - unsigned block_size, uint8_t *block, - unsigned pos, - size_t length, const uint8_t *data); +_nettle_sha3_update (struct sha3_state *state, + unsigned block_size, uint8_t *block, + unsigned pos, + size_t length, const uint8_t *data); void -_sha3_pad (struct sha3_state *state, - unsigned block_size, uint8_t *block, unsigned pos, uint8_t magic); +_nettle_sha3_pad (struct sha3_state *state, + unsigned block_size, uint8_t *block, unsigned pos, uint8_t magic); #define _sha3_pad_hash(state, block_size, block, pos) \ - _sha3_pad (state, block_size, block, pos, SHA3_HASH_MAGIC) + _nettle_sha3_pad (state, block_size, block, pos, SHA3_HASH_MAGIC) #define _sha3_pad_shake(state, block_size, block, pos) \ - _sha3_pad (state, block_size, block, pos, SHA3_SHAKE_MAGIC) + _nettle_sha3_pad (state, block_size, block, pos, SHA3_SHAKE_MAGIC) #endif @@ -62,10 +62,10 @@ sha3_absorb (struct sha3_state *state, unsigned length, const uint8_t *data) } unsigned -_sha3_update (struct sha3_state *state, - unsigned block_size, uint8_t *block, - unsigned pos, - size_t length, const uint8_t *data) +_nettle_sha3_update (struct sha3_state *state, + unsigned block_size, uint8_t *block, + unsigned pos, + size_t length, const uint8_t *data) { if (pos > 0) { @@ -91,8 +91,8 @@ _sha3_update (struct sha3_state *state, } void -_sha3_pad (struct sha3_state *state, - unsigned block_size, uint8_t *block, unsigned pos, uint8_t magic) +_nettle_sha3_pad (struct sha3_state *state, + unsigned block_size, uint8_t *block, unsigned pos, uint8_t magic) { assert (pos < block_size); block[pos++] = magic; |