From b093a922b56eac0f6c48e0cbb160572a39389f30 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:25:51 +0200
Subject: [PATCH] (aes_decrypt): Start using AES_ROUND. Third word.

Rev: src/nettle/x86/aes-decrypt.asm:1.6
---
 x86/aes-decrypt.asm | 37 +++++++++++++++++++------------------
 1 file changed, 19 insertions(+), 18 deletions(-)

diff --git a/x86/aes-decrypt.asm b/x86/aes-decrypt.asm
index 716f3220..373f8866 100644
--- a/x86/aes-decrypt.asm
+++ b/x86/aes-decrypt.asm
@@ -65,24 +65,25 @@ aes_decrypt:
 	AES_ROUND(_aes_decrypt_table,d,a,b,c)
 	pushl	%edi
 
-	C // Third column
-	C c d a b
-	movl	%ecx,%esi	C  copy first in
-	andl	$0x000000ff,%esi C  clear all but offset
-	shll	$2,%esi		C  index in itbl1
-	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	AES_TABLE1 + _aes_decrypt_table (%esi),%edi
-	movl	%eax,%esi	C  third one
-	shrl	$14,%esi
-	andl	$0x000003fc,%esi
-	xorl	AES_TABLE2 + _aes_decrypt_table (%esi),%edi
-	movl	%ebx,%esi	C  fourth one
-	shrl	$22,%esi
-	andl	$0x000003fc,%esi
-	xorl	AES_TABLE3 + _aes_decrypt_table (%esi),%edi
+	AES_ROUND(_aes_decrypt_table,c,d,a,b)
+C 	C // Third column
+C 	C c d a b
+C 	movl	%ecx,%esi	C  copy first in
+C 	andl	$0x000000ff,%esi C  clear all but offset
+C 	shll	$2,%esi		C  index in itbl1
+C 	movl	AES_TABLE0 + _aes_decrypt_table (%esi),%edi
+C 	movl	%edx,%esi	C  second one
+C 	shrl	$6,%esi
+C 	andl	$0x000003fc,%esi C  clear all but offset bytes
+C 	xorl	AES_TABLE1 + _aes_decrypt_table (%esi),%edi
+C 	movl	%eax,%esi	C  third one
+C 	shrl	$14,%esi
+C 	andl	$0x000003fc,%esi
+C 	xorl	AES_TABLE2 + _aes_decrypt_table (%esi),%edi
+C 	movl	%ebx,%esi	C  fourth one
+C 	shrl	$22,%esi
+C 	andl	$0x000003fc,%esi
+C 	xorl	AES_TABLE3 + _aes_decrypt_table (%esi),%edi
 	pushl	%edi		C  save first on stack
 
 	C // Fourth column
-- 
GitLab