diff options
author | lloyd <[email protected]> | 2006-08-15 13:38:16 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2006-08-15 13:38:16 +0000 |
commit | a1020c1e451bda023c72f9e26a36d077835ebfb8 (patch) | |
tree | fc342041e1451c10e423413a44f95d76e38d2fa0 /modules | |
parent | 2a8abcdd38eb4311cf6b2b1a9899b5ba16fa6bcf (diff) |
Formatting/readability changes
Diffstat (limited to 'modules')
-rw-r--r-- | modules/alg_ia32/serp_asm.S | 11 |
1 files 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) - |