From a1020c1e451bda023c72f9e26a36d077835ebfb8 Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 15 Aug 2006 13:38:16 +0000 Subject: Formatting/readability changes --- modules/alg_ia32/serp_asm.S | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/modules/alg_ia32/serp_asm.S b/modules/alg_ia32/serp_asm.S index 0baed9038..dded07fd0 100644 --- a/modules/alg_ia32/serp_asm.S +++ b/modules/alg_ia32/serp_asm.S @@ -446,13 +446,12 @@ START_FUNCTION(serpent_encrypt) #define PUSHED 4 ASSIGN(EBP, ARG(1)) /* input block */ - ASSIGN(EDI, ARG(3)) /* round keys */ - ASSIGN(EAX, ARRAY4(EBP, 0)) ASSIGN(EBX, ARRAY4(EBP, 1)) ASSIGN(ECX, ARRAY4(EBP, 2)) ASSIGN(EDX, ARRAY4(EBP, 3)) + ASSIGN(EDI, ARG(3)) /* round keys */ ZEROIZE(EBP) #define E_ROUND(A, B, C, D, T, N, SBOX) \ @@ -460,6 +459,7 @@ START_FUNCTION(serpent_encrypt) SBOX(A, B, C, D, T) \ TRANSFORM(A, B, C, D, T) + E_ROUND(EAX, EBX, ECX, EDX, EBP, 0, SBOX_E1) E_ROUND(EAX, EBX, ECX, EDX, EBP, 1, SBOX_E2) E_ROUND(EAX, EBX, ECX, EDX, EBP, 2, SBOX_E3) @@ -517,13 +517,13 @@ START_FUNCTION(serpent_decrypt) #define PUSHED 4 ASSIGN(EBP, ARG(1)) /* input block */ - ASSIGN(EDI, ARG(3)) /* round keys */ - ASSIGN(EAX, ARRAY4(EBP, 0)) ASSIGN(EBX, ARRAY4(EBP, 1)) ASSIGN(ECX, ARRAY4(EBP, 2)) ASSIGN(EDX, ARRAY4(EBP, 3)) + ASSIGN(EDI, ARG(3)) /* round keys */ + ZEROIZE(EBP) #define D_ROUND(A, B, C, D, T, N, SBOX) \ @@ -609,8 +609,8 @@ START_LOOP(.EXPANSION) ASSIGN(ARRAY4(EDI, 0), EAX) - ADD_IMM(EDI, 4) ADD_IMM(ESI, 1) + ADD_IMM(EDI, 4) LOOP_UNTIL(ESI, IMM(140), .EXPANSION) ASSIGN(EDI, ARG(1)) /* round keys */ @@ -667,4 +667,3 @@ LOOP_UNTIL(ESI, IMM(140), .EXPANSION) RESTORE_REGS() #undef PUSHED END_FUNCTION(serpent_key_schedule) - -- cgit v1.2.3