summaryrefslogtreecommitdiffstats
path: root/crypto/aes
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2007-05-03 09:12:47 +0000
committerAndy Polyakov <appro@openssl.org>2007-05-03 09:12:47 +0000
commit3f6916cf292f6507408d364cad3ffe28c86b5aa3 (patch)
tree36c9488a39593527ea346f0265179d862184eab2 /crypto/aes
parenta4470ae7b2668ab4fb189c986b0f24beb99f9b10 (diff)
Fix bug introduced in cn#16195.
Diffstat (limited to 'crypto/aes')
-rw-r--r--crypto/aes/asm/aes-s390x.pl9
1 files changed, 7 insertions, 2 deletions
diff --git a/crypto/aes/asm/aes-s390x.pl b/crypto/aes/asm/aes-s390x.pl
index c09e140e61..9f5d48ae1f 100644
--- a/crypto/aes/asm/aes-s390x.pl
+++ b/crypto/aes/asm/aes-s390x.pl
@@ -139,11 +139,13 @@ AES_encrypt:
jz .Lesoft
lghi %r0,`0x00|0x12` # encrypt AES-128
la %r1,0($key)
- la %r2,0($inp)
+ #la %r2,0($inp)
la %r4,0($out)
lghi %r3,16 # single block length
.long 0xb92e0042 # km %r4,%r2
bcr 8,%r14
+ la $out,0(%r4) # restore arguments
+ la $key,0(%r1)
.Lesoft:
stmg %r3,%r15,24($sp)
@@ -448,11 +450,14 @@ AES_decrypt:
jz .Ldsoft
lghi %r0,`0x80|0x12` # decrypt AES-128
la %r1,160($key)
- la %r2,0($inp)
+ #la %r2,0($inp)
la %r4,0($out)
lghi %r3,16 # single block length
.long 0xb92e0042 # km %r4,%r2
bcr 8,%r14
+ la $out,0(%r4) # restore arguments
+ lghi $key,-160
+ la $key,0($key,%r1)
.Ldsoft:
stmg %r3,%r15,24($sp)