summaryrefslogtreecommitdiffstats
path: root/crypto/aes
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2017-03-20 11:38:25 +0100
committerAndy Polyakov <appro@openssl.org>2017-03-22 11:04:31 +0100
commit09de9f0435790eefc082253609c8ef0ed66f8233 (patch)
tree01e97827c0229c848cc7de59e48e740c40296491 /crypto/aes
parent28991705b71d47066997c0afe5060b470c5ac09f (diff)
aes/asm/aesni-sha*-x86_64.pl: fix IV handling in SHAEXT paths.
Initial IV was disregarded on SHAEXT-capable processors. Amazingly enough bulk AES128-SHA* talk-to-yourself tests were passing. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2992) (cherry picked from commit 08d09628d2c9f3ef599399d8cad021a07ab98347)
Diffstat (limited to 'crypto/aes')
-rw-r--r--crypto/aes/asm/aesni-sha1-x86_64.pl1
-rw-r--r--crypto/aes/asm/aesni-sha256-x86_64.pl1
2 files changed, 2 insertions, 0 deletions
diff --git a/crypto/aes/asm/aesni-sha1-x86_64.pl b/crypto/aes/asm/aesni-sha1-x86_64.pl
index 4b979a7346..7cc5a7f73c 100644
--- a/crypto/aes/asm/aesni-sha1-x86_64.pl
+++ b/crypto/aes/asm/aesni-sha1-x86_64.pl
@@ -1711,6 +1711,7 @@ $code.=<<___;
mov 240($key),$rounds
sub $in0,$out
movups ($key),$rndkey0 # $key[0]
+ movups ($ivp),$iv # load IV
movups 16($key),$rndkey[0] # forward reference
lea 112($key),$key # size optimization
diff --git a/crypto/aes/asm/aesni-sha256-x86_64.pl b/crypto/aes/asm/aesni-sha256-x86_64.pl
index a5fde2e4d1..3b03328f3f 100644
--- a/crypto/aes/asm/aesni-sha256-x86_64.pl
+++ b/crypto/aes/asm/aesni-sha256-x86_64.pl
@@ -1307,6 +1307,7 @@ $code.=<<___;
mov 240($key),$rounds
sub $in0,$out
movups ($key),$rndkey0 # $key[0]
+ movups ($ivp),$iv # load IV
movups 16($key),$rndkey[0] # forward reference
lea 112($key),$key # size optimization