]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
New files, split off from aes.c.
authorNiels Möller <nisse@lysator.liu.se>
Mon, 11 Feb 2002 17:53:35 +0000 (18:53 +0100)
committerNiels Möller <nisse@lysator.liu.se>
Mon, 11 Feb 2002 17:53:35 +0000 (18:53 +0100)
Tables are now not static, but use a _aes_ prefix on their names.

Rev: src/nettle/aes-set-key.c:1.2

aes-set-key.c

index b1f81c07a3294f35a995828bd1917ad78023ffda..24f932b739bb49fb40851d60d31a9accaef9d03e 100644 (file)
@@ -70,6 +70,17 @@ static const uint8_t Alogtable[256] = {
   57,  75, 221, 124, 132, 151, 162, 253,  28,  36, 108, 180, 199,  82, 246, 1, 
 };
 
+static uint8_t
+xtime(uint8_t a)
+{
+  uint8_t b;
+
+  b = (a & 0x80) ? 0x1b : 0;
+  a<<=1;
+  a^=b;
+  return(a);
+}
+
 static uint8_t
 mul(uint8_t a, uint8_t b)
 {
@@ -101,17 +112,6 @@ inv_mix_column(uint32_t *a, uint32_t *b)
     }
 }
 
-static uint8_t
-xtime(uint8_t a)
-{
-  uint8_t b;
-
-  b = (a & 0x80) ? 0x1b : 0;
-  a<<=1;
-  a^=b;
-  return(a);
-}
-
 /* FIXME: Perhaps we should have separate fucntion for encryption and
  * decryption keys? It seems unnecessary to compute the inverse
  * subkeys if we're not going to use them. Can one define an