From: Niels Möller Date: Mon, 17 Oct 2005 18:33:58 +0000 (+0200) Subject: * x86/arcfour-crypt.asm: Use ARCFOUR_I and ARCFOUR_J X-Git-Tag: nettle_1.14_release_20051205~87 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=79eb7d8d395ebf02a37cd2677a35dd56d30c592d;p=thirdparty%2Fnettle.git * x86/arcfour-crypt.asm: Use ARCFOUR_I and ARCFOUR_J * asm.m4 (ARCFOUR): New struct. Rev: src/nettle/asm.m4:1.15 Rev: src/nettle/x86/arcfour-crypt.asm:1.14 --- diff --git a/asm.m4 b/asm.m4 index ee2be4fc..99c72c01 100644 --- a/asm.m4 +++ b/asm.m4 @@ -34,9 +34,18 @@ define(, $1, SOFFSET)dnl define(, eval(SOFFSET + ($2)))>)dnl +dnl UCHAR(name) +define(, , 1)>)dnl + dnl UNSIGNED(name) define(, , 4)>)dnl +dnl Offsets in arcfour_ctx +STRUCTURE(ARCFOUR) + STRUCT(S, 256) + UCHAR(I) + UCHAR(J) + dnl Offsets in aes_ctx and aes_table STRUCTURE(AES) STRUCT(KEYS, 4*60) diff --git a/x86/arcfour-crypt.asm b/x86/arcfour-crypt.asm index 74a65a94..5c87ff8c 100644 --- a/x86/arcfour-crypt.asm +++ b/x86/arcfour-crypt.asm @@ -55,8 +55,8 @@ C Register usage: movl 32(%esp), %esi addl %esi, %edx C Keep src + length - movzbl 256(%ebp), %eax C i - movzbl 257(%ebp), %ebx C j + movzbl ARCFOUR_I (%ebp), %eax C i + movzbl ARCFOUR_J (%ebp), %ebx C j .Lloop: C incb %al incl %eax @@ -80,8 +80,8 @@ C andl $0xff, %ebx cmpl %esi, %edx jne .Lloop - movb %al, 256(%ebp) C Store the new i and j. - movb %bl, 257(%ebp) + movb %al, ARCFOUR_I (%ebp) C Store the new i and j. + movb %bl, ARCFOUR_J (%ebp) .Lend: popl %edi popl %esi