summaryrefslogtreecommitdiff
path: root/aes-encrypt-table.c
diff options
context:
space:
mode:
authorNiels Möller <nisse@lysator.liu.se>2002-05-15 22:17:35 +0200
committerNiels Möller <nisse@lysator.liu.se>2002-05-15 22:17:35 +0200
commit153537437bb5b940b26afb2e1261aff3e704dbbc (patch)
treee1f5726b4a23ac4ecfe083758a9287ee6bf5330a /aes-encrypt-table.c
parentf91e72100a42a125e6994532e0cd8733e44ca97a (diff)
downloadnettle-153537437bb5b940b26afb2e1261aff3e704dbbc.tar.gz
* aes-internal.h (struct aes_table): Renamed the shift_idx field
to sparc_idx, as it will be tweaked to improve the sparc code. Also reduced its size to [2][4]. (IDX_FACTOR): Deleted constant. * aes-encrypt-table.c (_aes_encrypt_table): Adapted initializer of sparc_idx. * aes-decrypt-table.c (_aes_decrypt_table): Likewise. * asm.m4: Deleted AES_SIDX2, to match struct aes_table. Rev: src/nettle/aes-decrypt-table.c:1.2 Rev: src/nettle/aes-encrypt-table.c:1.2 Rev: src/nettle/aes-internal.h:1.7 Rev: src/nettle/asm.m4:1.9
Diffstat (limited to 'aes-encrypt-table.c')
-rw-r--r--aes-encrypt-table.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/aes-encrypt-table.c b/aes-encrypt-table.c
index 1dea352e..73d59205 100644
--- a/aes-encrypt-table.c
+++ b/aes-encrypt-table.c
@@ -77,10 +77,9 @@ _aes_encrypt_table =
{ 1, 2, 3, 0 },
{ 2, 3, 0, 1 },
{ 3, 0, 1, 2 } },
- { /* idx_shift */
- { 1 * IDX_FACTOR, 2 * IDX_FACTOR, 3 * IDX_FACTOR, 0 * IDX_FACTOR },
- { 2 * IDX_FACTOR, 3 * IDX_FACTOR, 0 * IDX_FACTOR, 1 * IDX_FACTOR },
- { 3 * IDX_FACTOR, 0 * IDX_FACTOR, 1 * IDX_FACTOR, 2 * IDX_FACTOR } },
+ { /* sparc_idx, IDX1 and IDX3 shifted by the size of a word */
+ { 4, 8, 12, 0 },
+ { 12, 0, 4, 8 } },
{ /* dtable */
{
0xa56363c6,0x847c7cf8,0x997777ee,0x8d7b7bf6,