diff options
author | Andy Polyakov <appro@openssl.org> | 2004-12-01 15:28:18 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2004-12-01 15:28:18 +0000 |
commit | 7c69478064ffc1a17d8b7f44d06f813fc0f257b8 (patch) | |
tree | fab0f90a3a6432602657f5b9bbc02d26c0eb8606 /crypto/rc4/asm/rc4-586.pl | |
parent | 1862dae862e149cce5f9ef75a219419a52a4814a (diff) |
I've introduced a bug to i386 RC4 assembler, which would emerge with
certain mix of calls to RC4 routine not covered by rc4test.c.
It's fixed now. In addition this patch inadvertently fixes minor
performance problem: in 0.9.7 context P4 was performing 12% slower
than the original implementation...
Diffstat (limited to 'crypto/rc4/asm/rc4-586.pl')
-rw-r--r-- | crypto/rc4/asm/rc4-586.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/rc4/asm/rc4-586.pl b/crypto/rc4/asm/rc4-586.pl index 07b2bc6fcd..d6e98f0811 100644 --- a/crypto/rc4/asm/rc4-586.pl +++ b/crypto/rc4/asm/rc4-586.pl @@ -68,13 +68,13 @@ sub RC4_loop # &mov( $tx, &DWP(0,$d,$x,4)) if $p < 0; &add( &LB($y), &LB($tx)); - &inc( &LB($x)); # NEXT ROUND &mov( $ty, &DWP(0,$d,$y,4)); # XXX - &mov( &DWP(-4,$d,$x,4),$ty); # AGI + &mov( &DWP(0,$d,$x,4),$ty); &add( $ty, $tx); &mov( &DWP(0,$d,$y,4),$tx); &and( $ty, 0xff); + &inc( &LB($x)); # NEXT ROUND &mov( $tx, &DWP(0,$d,$x,4)) if $p < 1; # NEXT ROUND &mov( $ty, &DWP(0,$d,$ty,4)); |