From: Niels Möller Date: Mon, 11 Feb 2002 17:53:35 +0000 (+0100) Subject: New files, split off from aes.c. X-Git-Tag: nettle_1.6_release_20021003~358 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1127d57420aaf9fcb00871e87bfeae3c16f3cce;p=thirdparty%2Fnettle.git 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 --- diff --git a/aes-set-key.c b/aes-set-key.c index b1f81c07..24f932b7 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