]> granicus.if.org Git - openssl/commitdiff
aes/asm/aesni-sha*-x86_64.pl: fix IV handling in SHAEXT paths.
authorAndy Polyakov <appro@openssl.org>
Mon, 20 Mar 2017 10:38:25 +0000 (11:38 +0100)
committerAndy Polyakov <appro@openssl.org>
Wed, 22 Mar 2017 10:04:31 +0000 (11:04 +0100)
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)

crypto/aes/asm/aesni-sha1-x86_64.pl
crypto/aes/asm/aesni-sha256-x86_64.pl

index 4b979a7346561d7479375b93b6ef384f39b87160..7cc5a7f73c7b965d94d890335e26fbb05537617f 100644 (file)
@@ -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
 
index a5fde2e4d1d18164bd2970fa0779bdff30a649a3..3b03328f3f9a371ccb7fbd65652227a9aec7e48e 100644 (file)
@@ -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