Skip to content
Snippets Groups Projects
Commit 4261eecf authored by Niels Möller's avatar Niels Möller
Browse files

(gf2_log, gf2_exp, mult): Renamed tables,

were log and ilog.

Rev: src/nettle/aes-set-decrypt-key.c:1.3
parent 87310cad
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,7 @@
#include "aes-internal.h"
/* Tables for computations in the AES GF2 field. */
static const uint8_t log[0x100] =
static const uint8_t gf2_log[0x100] =
{
0x00,0x00,0x19,0x01,0x32,0x02,0x1a,0xc6,
0x4b,0xc7,0x1b,0x68,0x33,0xee,0xdf,0x03,
......@@ -68,7 +68,7 @@ static const uint8_t log[0x100] =
0x0d,0x63,0x8c,0x80,0xc0,0xf7,0x70,0x07,
};
static const uint8_t ilog[0x100] =
static const uint8_t gf2_exp[0x100] =
{
0x01,0x03,0x05,0x0f,0x11,0x33,0x55,0xff,
0x1a,0x2e,0x72,0x96,0xa1,0xf8,0x13,0x35,
......@@ -107,7 +107,7 @@ static const uint8_t ilog[0x100] =
static unsigned
mult(unsigned a, unsigned b)
{
return (a && b) ? ilog[ (log[a] + log[b]) % 255] : 0;
return (a && b) ? gf2_exp[ (gf2_log[a] + gf2_log[b]) % 255] : 0;
}
static void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment