crypto: arm64/aes-blk - honour iv_out requirement in CBC and CTR modes
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 17 Jan 2017 13:46:29 +0000 (13:46 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2017 07:08:26 +0000 (08:08 +0100)
commit53bed1f6402563da7cd56cb3d0a97780e091ab73
tree40bec8e8deb59c6569fa3a44b42812969c487db4
parentb04a39f88cedc1bce345b458e8a9309ce8a2d1ba
crypto: arm64/aes-blk - honour iv_out requirement in CBC and CTR modes

commit 11e3b725cfc282efe9d4a354153e99d86a16af08 upstream.

Update the ARMv8 Crypto Extensions and the plain NEON AES implementations
in CBC and CTR modes to return the next IV back to the skcipher API client.
This is necessary for chaining to work correctly.

Note that for CTR, this is only done if the request is a round multiple of
the block size, since otherwise, chaining is impossible anyway.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/crypto/aes-modes.S