* 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>
#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 */
#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 */
}
};
-const struct gost28147_param _gost28147_param_CryptoPro_3411 =
+const struct gost28147_param _nettle_gost28147_param_CryptoPro_3411 =
{
{
{ /* 0 */
} 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;
((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)
{
size_t length, const uint8_t *msg)
{
gosthash94_update_int (ctx, length, msg,
- _gost28147_param_test_3411.sbox);
+ _nettle_gost28147_param_test_3411.sbox);
}
/**
size_t length, const uint8_t *msg)
{
gosthash94_update_int (ctx, length, msg,
- _gost28147_param_CryptoPro_3411.sbox);
+ _nettle_gost28147_param_CryptoPro_3411.sbox);
}
/**
size_t length, uint8_t *result)
{
gosthash94_write_digest (ctx, length, result,
- _gost28147_param_test_3411.sbox);
+ _nettle_gost28147_param_test_3411.sbox);
}
void
size_t length, uint8_t *result)
{
gosthash94_write_digest (ctx, length, result,
- _gost28147_param_CryptoPro_3411.sbox);
+ _nettle_gost28147_param_CryptoPro_3411.sbox);
}