Commit f1127d57 authored by Niels Möller's avatar Niels Möller

New files, split off from aes.c.

Tables are now not static, but use a _aes_ prefix on their names.

Rev: src/nettle/aes-set-key.c:1.2
parent a9f214d5
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment