]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
Delete name mangling of internal gost symbols
authorNiels Möller <nisse@lysator.liu.se>
Mon, 30 Nov 2020 13:44:24 +0000 (14:44 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Mon, 30 Nov 2020 13:44:24 +0000 (14:44 +0100)
ChangeLog
gost28147-internal.h
gost28147.c
gosthash94.c

index 1dce809442f368064ea83d8be0326a66800c1ef3..bf5ae93a71e0379f7e6fd1b08f72059188507d65 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
index 0cb2d152c8ad97faa2659524d36ebc950aaf729f..f69b9bb572adc9ab4df39d39c1dc21985f11ff40 100644 (file)
 
 #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 */
index b6db334b2a0bdc962f9498fa1aa9326b94525f70..6f37bf6bada14deb2605e268511cd1eefeaf4333 100644 (file)
@@ -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;
 
index 749e9e5bbc5f69dedbff2d23420367ca793017e2..81663e7f4fc6ecedc16001dfcba3af7cc95b8ec2 100644 (file)
@@ -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);
 }