From 9e6cf9fe5de2bd40268b879f1ee6487e1daa55ac Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se>
Date: Wed, 15 May 2002 11:09:31 +0200
Subject: [PATCH] (aes_decrypt): Use _aes_decrypt_table instead of itbl1-4.
 Commented out the inclusion of aes_tables.asm.

Rev: src/nettle/x86/aes.asm:1.11
---
 x86/aes.asm | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/x86/aes.asm b/x86/aes.asm
index 25aed239..e90b244e 100644
--- a/x86/aes.asm
+++ b/x86/aes.asm
@@ -22,7 +22,7 @@ C MA 02111-1307, USA.
 
 	.data
 
-include_src(<x86/aes_tables.asm>)
+C include_src(<x86/aes_tables.asm>)
 
 
 
@@ -105,19 +105,19 @@ aes_decrypt:
 	movl	%edx,%esi	C  copy first in
 	andl	$0x000000ff,%esi C  clear all but offset
 	shll	$2,%esi		C  index in itbl1
-	movl	itbl1(%esi),%edi
+	movl	AES_TABLE0 + _aes_decrypt_table (%esi),%edi
 	movl	%eax,%esi	C  second one
 	shrl	$6,%esi
 	andl	$0x000003fc,%esi C  clear all but offset bytes
-	xorl	itbl2(%esi),%edi
+	xorl	AES_TABLE1 + _aes_decrypt_table (%esi),%edi
 	movl	%ebx,%esi	C  third one
 	shrl	$14,%esi
 	andl	$0x000003fc,%esi
-	xorl	itbl3(%esi),%edi
+	xorl	AES_TABLE2 + _aes_decrypt_table (%esi),%edi
 	movl	%ecx,%esi	C  fourth one
 	shrl	$22,%esi
 	andl	$0x000003fc,%esi
-	xorl	itbl4(%esi),%edi
+	xorl	AES_TABLE3 + _aes_decrypt_table (%esi),%edi
 	pushl	%edi
 
 	C // Third column
@@ -125,19 +125,19 @@ aes_decrypt:
 	movl	%ecx,%esi	C  copy first in
 	andl	$0x000000ff,%esi C  clear all but offset
 	shll	$2,%esi		C  index in itbl1
-	movl	itbl1(%esi),%edi
+	movl	AES_TABLE0 + _aes_decrypt_table (%esi),%edi
 	movl	%edx,%esi	C  second one
 	shrl	$6,%esi
 	andl	$0x000003fc,%esi C  clear all but offset bytes
-	xorl	itbl2(%esi),%edi
+	xorl	AES_TABLE1 + _aes_decrypt_table (%esi),%edi
 	movl	%eax,%esi	C  third one
 	shrl	$14,%esi
 	andl	$0x000003fc,%esi
-	xorl	itbl3(%esi),%edi
+	xorl	AES_TABLE2 + _aes_decrypt_table (%esi),%edi
 	movl	%ebx,%esi	C  fourth one
 	shrl	$22,%esi
 	andl	$0x000003fc,%esi
-	xorl	itbl4(%esi),%edi
+	xorl	AES_TABLE3 + _aes_decrypt_table (%esi),%edi
 	pushl	%edi		C  save first on stack
 
 	C // Fourth column
@@ -145,19 +145,19 @@ aes_decrypt:
 	movl	%ebx,%esi	C  copy first in
 	andl	$0x000000ff,%esi C  clear all but offset
 	shll	$2,%esi		C  index in itbl1
-	movl	itbl1(%esi),%edi
+	movl	AES_TABLE0 + _aes_decrypt_table (%esi),%edi
 	movl	%ecx,%esi	C  second one
 	shrl	$6,%esi
 	andl	$0x000003fc,%esi C  clear all but offset bytes
-	xorl	itbl2(%esi),%edi
+	xorl	AES_TABLE1 + _aes_decrypt_table (%esi),%edi
 	movl	%edx,%esi	C  third one
 	shrl	$14,%esi
 	andl	$0x000003fc,%esi
-	xorl	itbl3(%esi),%edi
+	xorl	AES_TABLE2 + _aes_decrypt_table (%esi),%edi
 	movl	%eax,%esi	C  fourth one
 	shrl	$22,%esi
 	andl	$0x000003fc,%esi
-	xorl	itbl4(%esi),%edi
+	xorl	AES_TABLE3 + _aes_decrypt_table (%esi),%edi
 
 	movl	%edi,%edx
 	popl	%ecx
-- 
GitLab