diff options
author | Niels Möller <nisse@lysator.liu.se> | 2020-11-30 14:44:24 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2020-11-30 14:44:24 +0100 |
commit | cbe701537e2975a659bc8bfe55851410daf1b5ce (patch) | |
tree | 0b3786b83575012ea34f1fac5d60a4648024609d | |
parent | fcf38705f2c34349c011f9bb97f318bce736fdcb (diff) | |
download | nettle-cbe701537e2975a659bc8bfe55851410daf1b5ce.tar.gz |
Delete name mangling of internal gost symbols
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | gost28147-internal.h | 13 | ||||
-rw-r--r-- | gost28147.c | 10 | ||||
-rw-r--r-- | gosthash94.c | 10 |
4 files changed, 17 insertions, 17 deletions
@@ -6,6 +6,7 @@ * chacha-internal.h: Likewise. * ctr-internal.h: Likewise. * dsa-internal.h: Likewise. + * gost28147-internal.h: Likewise. 2020-11-26 Niels Möller <nisse@lysator.liu.se> diff --git a/gost28147-internal.h b/gost28147-internal.h index 0cb2d152..f69b9bb5 100644 --- a/gost28147-internal.h +++ b/gost28147-internal.h @@ -36,19 +36,16 @@ #include <stdint.h> -#define _gost28147_encrypt_block _nettle_gost28147_encrypt_block -#define _gost28147_param_test_3411 _nettle_gost28147_param_test_3411 -#define _gost28147_param_CryptoPro_3411 _nettle_gost28147_param_CryptoPro_3411 - -extern const struct gost28147_param _gost28147_param_test_3411; -extern const struct gost28147_param _gost28147_param_CryptoPro_3411; +extern const struct gost28147_param _nettle_gost28147_param_test_3411; +extern const struct gost28147_param _nettle_gost28147_param_CryptoPro_3411; struct gost28147_param { uint32_t sbox[4][256]; }; -void _gost28147_encrypt_block (const uint32_t *key, const uint32_t sbox[4][256], - const uint32_t *in, uint32_t *out); +void _nettle_gost28147_encrypt_block (const uint32_t *key, + const uint32_t sbox[4][256], + const uint32_t *in, uint32_t *out); #endif /* NETTLE_GOST28147_INTERNAL_H_INCLUDED */ diff --git a/gost28147.c b/gost28147.c index b6db334b..6f37bf6b 100644 --- a/gost28147.c +++ b/gost28147.c @@ -36,7 +36,7 @@ #include "gost28147-internal.h" /* pre-initialized GOST lookup tables based on rotated S-Box */ -const struct gost28147_param _gost28147_param_test_3411 = +const struct gost28147_param _nettle_gost28147_param_test_3411 = { { { /* 0 */ @@ -303,7 +303,7 @@ const struct gost28147_param _gost28147_param_test_3411 = } }; -const struct gost28147_param _gost28147_param_CryptoPro_3411 = +const struct gost28147_param _nettle_gost28147_param_CryptoPro_3411 = { { { /* 0 */ @@ -590,8 +590,10 @@ const struct gost28147_param _gost28147_param_CryptoPro_3411 = } while (0) /* encrypt a block with the given key */ -void _gost28147_encrypt_block (const uint32_t *key, const uint32_t sbox[4][256], - const uint32_t *in, uint32_t *out) +void +_nettle_gost28147_encrypt_block (const uint32_t *key, + const uint32_t sbox[4][256], + const uint32_t *in, uint32_t *out) { uint32_t l, r; diff --git a/gosthash94.c b/gosthash94.c index 749e9e5b..81663e7f 100644 --- a/gosthash94.c +++ b/gosthash94.c @@ -108,7 +108,7 @@ gost_block_compress (struct gosthash94_ctx *ctx, const uint32_t *block, ((w[5] & 0xff000000) >> 8) | (w[7] & 0xff000000); /* encryption: s_i := E_{key_i} (h_i) */ - _gost28147_encrypt_block (key, sbox, &ctx->hash[i], &s[i]); + _nettle_gost28147_encrypt_block (key, sbox, &ctx->hash[i], &s[i]); if (i == 0) { @@ -314,7 +314,7 @@ gosthash94_update (struct gosthash94_ctx *ctx, size_t length, const uint8_t *msg) { gosthash94_update_int (ctx, length, msg, - _gost28147_param_test_3411.sbox); + _nettle_gost28147_param_test_3411.sbox); } /** @@ -330,7 +330,7 @@ gosthash94cp_update (struct gosthash94_ctx *ctx, size_t length, const uint8_t *msg) { gosthash94_update_int (ctx, length, msg, - _gost28147_param_CryptoPro_3411.sbox); + _nettle_gost28147_param_CryptoPro_3411.sbox); } /** @@ -373,7 +373,7 @@ gosthash94_digest (struct gosthash94_ctx *ctx, size_t length, uint8_t *result) { gosthash94_write_digest (ctx, length, result, - _gost28147_param_test_3411.sbox); + _nettle_gost28147_param_test_3411.sbox); } void @@ -381,5 +381,5 @@ gosthash94cp_digest (struct gosthash94_ctx *ctx, size_t length, uint8_t *result) { gosthash94_write_digest (ctx, length, result, - _gost28147_param_CryptoPro_3411.sbox); + _nettle_gost28147_param_CryptoPro_3411.sbox); } |