Commit f68df543 authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Herbert Xu

crypto: arm64/aes-neonbs - switch to library version of key expansion routine

Switch to the new AES library that also provides an implementation of
the AES key expansion routine. This removes the dependency on the
generic AES cipher, allowing it to be omitted entirely in the future.
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent c59a6dff
...@@ -116,6 +116,7 @@ config CRYPTO_AES_ARM64_BS ...@@ -116,6 +116,7 @@ config CRYPTO_AES_ARM64_BS
select CRYPTO_BLKCIPHER select CRYPTO_BLKCIPHER
select CRYPTO_AES_ARM64_NEON_BLK select CRYPTO_AES_ARM64_NEON_BLK
select CRYPTO_AES_ARM64 select CRYPTO_AES_ARM64
select CRYPTO_LIB_AES
select CRYPTO_SIMD select CRYPTO_SIMD
endif endif
...@@ -74,7 +74,7 @@ static int aesbs_setkey(struct crypto_skcipher *tfm, const u8 *in_key, ...@@ -74,7 +74,7 @@ static int aesbs_setkey(struct crypto_skcipher *tfm, const u8 *in_key,
struct crypto_aes_ctx rk; struct crypto_aes_ctx rk;
int err; int err;
err = crypto_aes_expand_key(&rk, in_key, key_len); err = aes_expandkey(&rk, in_key, key_len);
if (err) if (err)
return err; return err;
...@@ -133,7 +133,7 @@ static int aesbs_cbc_setkey(struct crypto_skcipher *tfm, const u8 *in_key, ...@@ -133,7 +133,7 @@ static int aesbs_cbc_setkey(struct crypto_skcipher *tfm, const u8 *in_key,
struct crypto_aes_ctx rk; struct crypto_aes_ctx rk;
int err; int err;
err = crypto_aes_expand_key(&rk, in_key, key_len); err = aes_expandkey(&rk, in_key, key_len);
if (err) if (err)
return err; return err;
...@@ -205,7 +205,7 @@ static int aesbs_ctr_setkey_sync(struct crypto_skcipher *tfm, const u8 *in_key, ...@@ -205,7 +205,7 @@ static int aesbs_ctr_setkey_sync(struct crypto_skcipher *tfm, const u8 *in_key,
struct aesbs_ctr_ctx *ctx = crypto_skcipher_ctx(tfm); struct aesbs_ctr_ctx *ctx = crypto_skcipher_ctx(tfm);
int err; int err;
err = crypto_aes_expand_key(&ctx->fallback, in_key, key_len); err = aes_expandkey(&ctx->fallback, in_key, key_len);
if (err) if (err)
return err; return err;
...@@ -271,7 +271,7 @@ static int aesbs_xts_setkey(struct crypto_skcipher *tfm, const u8 *in_key, ...@@ -271,7 +271,7 @@ static int aesbs_xts_setkey(struct crypto_skcipher *tfm, const u8 *in_key,
return err; return err;
key_len /= 2; key_len /= 2;
err = crypto_aes_expand_key(&rk, in_key + key_len, key_len); err = aes_expandkey(&rk, in_key + key_len, key_len);
if (err) if (err)
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment