From 4261eecfe542ade3bacd23a3f66c0238ad3b40b4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Wed, 7 Apr 2004 22:30:49 +0200
Subject: [PATCH] (gf2_log, gf2_exp, mult): Renamed tables, were log and ilog.

Rev: src/nettle/aes-set-decrypt-key.c:1.3
---
 aes-set-decrypt-key.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/aes-set-decrypt-key.c b/aes-set-decrypt-key.c
index e0b75ea1..b8d01da4 100644
--- a/aes-set-decrypt-key.c
+++ b/aes-set-decrypt-key.c
@@ -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
-- 
GitLab