diff --git a/aes-set-key.c b/aes-set-key.c index b1f81c07a3294f35a995828bd1917ad78023ffda..24f932b739bb49fb40851d60d31a9accaef9d03e 100644 --- a/aes-set-key.c +++ b/aes-set-key.c @@ -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