arrays.
* aes-encrypt-table.c (_aes_encrypt_table): Likewise.
* aes-decrypt.c (_aes_decrypt_table): Likewise.
* asm.m4 (AES): Likewise
Rev: src/nettle/ChangeLog:1.358
Rev: src/nettle/aes-decrypt.c:1.7
Rev: src/nettle/aes-encrypt-table.c:1.5
Rev: src/nettle/aes-internal.h:1.13
Rev: src/nettle/asm.m4:1.14
+2005-10-17 Niels Möller <niels@s3.kth.se>
+
+ * aes-internal.h (struct aes_table): Deleted idx and sparc_idx
+ arrays.
+ * aes-encrypt-table.c (_aes_encrypt_table): Likewise.
+ * aes-decrypt.c (_aes_decrypt_table): Likewise.
+ * asm.m4 (AES): Likewise
+
2005-10-16 Niels Möller <nisse@lysator.liu.se>
* tools/input.c (sexp_get_char): Use unsigned for the done flag.
0x17,0x2b,0x04,0x7e,0xba,0x77,0xd6,0x26,
0xe1,0x69,0x14,0x63,0x55,0x21,0x0c,0x7d,
},
- { /* idx */
- { 3, 0, 1, 2 },
- { 2, 3, 0, 1 },
- { 1, 2, 3, 0 } },
- { /* sparc_idx, explained in aes-internal.h */
- { 14, 2, 6, 10 },
- { 4, 8, 12, 0 } },
+ /* Indexing array, hard-coded into the decryption function.
+ { { 0, 1, 2, 3 },
+ { 3, 0, 1, 2 },
+ { 2, 3, 0, 1 },
+ { 1, 2, 3, 0 } }
+ */
{ /* itable */
{
0x50a7f451,0x5365417e,0xc3a4171a,0x965e273a,
0x8c,0xa1,0x89,0x0d,0xbf,0xe6,0x42,0x68,
0x41,0x99,0x2d,0x0f,0xb0,0x54,0xbb,0x16,
},
- { /* idx */
- { 1, 2, 3, 0 },
- { 2, 3, 0, 1 },
- { 3, 0, 1, 2 } },
- { /* sparc_idx, explained in aes-internal.h */
- { 6, 10, 14, 2 },
- { 12, 0, 4, 8 } },
+ /* Indexing array, hard coded into the encryption function.
+ { { 0, 1, 2, 3 },
+ { 1, 2, 3, 0 },
+ { 2, 3, 0, 1 },
+ { 3, 0, 1, 2 } }
+ */
{ /* dtable */
{
0xa56363c6,0x847c7cf8,0x997777ee,0x8d7b7bf6,
struct aes_table
{
uint8_t sbox[0x100];
- unsigned idx[3][4];
-
- /* Variant of the idx array suitable for the sparc
- * assembler code.
- *
- * sparc_idx[0][i] = idx[0][i] * 4 + 2
- * sparc_idx[1][i] = idx[2][i] * 4
- */
-
- unsigned sparc_idx [2][4];
-
uint32_t table[AES_TABLE_SIZE][0x100];
};
UNSIGNED(NROUNDS)
define(AES_SBOX_SIZE, 256)dnl
-define(AES_IDX_SIZE, 16)dnl
define(AES_TABLE_SIZE, 1024)dnl
STRUCTURE(AES)
STRUCT(SBOX, AES_SBOX_SIZE)
-
- STRUCT(IDX1, AES_IDX_SIZE)
- STRUCT(IDX2, AES_IDX_SIZE)
- STRUCT(IDX3, AES_IDX_SIZE)
-
- STRUCT(SIDX1, AES_IDX_SIZE)
- STRUCT(SIDX3, AES_IDX_SIZE)
-
STRUCT(TABLE0, AES_TABLE_SIZE)
STRUCT(TABLE1, AES_TABLE_SIZE)
STRUCT(TABLE2, AES_TABLE_SIZE)