From: Andy Polyakov Date: Mon, 20 Mar 2017 10:38:25 +0000 (+0100) Subject: aes/asm/aesni-sha*-x86_64.pl: fix IV handling in SHAEXT paths. X-Git-Tag: OpenSSL_1_1_1-pre1~1964 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=08d09628d2c9f3ef599399d8cad021a07ab98347;p=thirdparty%2Fopenssl.git 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 (Merged from https://github.com/openssl/openssl/pull/2992) --- diff --git a/crypto/aes/asm/aesni-sha1-x86_64.pl b/crypto/aes/asm/aesni-sha1-x86_64.pl index dcdf4548619..6644d704d90 100644 --- a/crypto/aes/asm/aesni-sha1-x86_64.pl +++ b/crypto/aes/asm/aesni-sha1-x86_64.pl @@ -1779,6 +1779,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 ceec9a6e1eb..74ec8449528 100644 --- a/crypto/aes/asm/aesni-sha256-x86_64.pl +++ b/crypto/aes/asm/aesni-sha256-x86_64.pl @@ -1361,6 +1361,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