]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
crypto: arm/aes-neonbs - switch to library version of key expansion routine
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 2 Jul 2019 19:41:29 +0000 (21:41 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Jul 2019 04:56:04 +0000 (14:56 +1000)
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: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
arch/arm/crypto/Kconfig
arch/arm/crypto/aes-neonbs-glue.c

index a95322b59799f9162f366c141566e1893971561f..b24df84a1d7adceaa63880578af491e58a2b7cc5 100644 (file)
@@ -82,8 +82,8 @@ config CRYPTO_AES_ARM_BS
        tristate "Bit sliced AES using NEON instructions"
        depends on KERNEL_MODE_NEON
        select CRYPTO_BLKCIPHER
+       select CRYPTO_LIB_AES
        select CRYPTO_SIMD
-       select CRYPTO_AES
        help
          Use a faster and more secure NEON based implementation of AES in CBC,
          CTR and XTS modes
index bd0bee9c8f7b718813c8b60904e8e10ed2fc9e9e..8c22d10bd909acf45efe7cac93325b6a3c370d08 100644 (file)
@@ -61,7 +61,7 @@ static int aesbs_setkey(struct crypto_skcipher *tfm, const u8 *in_key,
        struct crypto_aes_ctx rk;
        int err;
 
-       err = crypto_aes_expand_key(&rk, in_key, key_len);
+       err = aes_expandkey(&rk, in_key, key_len);
        if (err)
                return err;
 
@@ -120,7 +120,7 @@ static int aesbs_cbc_setkey(struct crypto_skcipher *tfm, const u8 *in_key,
        struct crypto_aes_ctx rk;
        int err;
 
-       err = crypto_aes_expand_key(&rk, in_key, key_len);
+       err = aes_expandkey(&rk, in_key, key_len);
        if (err)
                return err;