crypto: cesa/aes - switch to library version of key expansion routine
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 2 Jul 2019 19:41:26 +0000 (21:41 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Jul 2019 04:56:03 +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>
drivers/crypto/Kconfig
drivers/crypto/marvell/cipher.c

index 27121e530ca48378d3a304cbe768011a77741be4..cfb4c2a42b3558b871ab64dde7fbd6647a5ddbe0 100644 (file)
@@ -214,7 +214,7 @@ config CRYPTO_CRC32_S390
 config CRYPTO_DEV_MARVELL_CESA
        tristate "Marvell's Cryptographic Engine driver"
        depends on PLAT_ORION || ARCH_MVEBU
-       select CRYPTO_AES
+       select CRYPTO_LIB_AES
        select CRYPTO_DES
        select CRYPTO_BLKCIPHER
        select CRYPTO_HASH
index f4321f3c077727370b7b6a2e2b09ef52b5b501cd..fa1997e70b6375b35753f0bf4d682a89cc990a4e 100644 (file)
@@ -254,7 +254,7 @@ static int mv_cesa_aes_setkey(struct crypto_skcipher *cipher, const u8 *key,
        int ret;
        int i;
 
-       ret = crypto_aes_expand_key(&ctx->aes, key, len);
+       ret = aes_expandkey(&ctx->aes, key, len);
        if (ret) {
                crypto_skcipher_set_flags(cipher, CRYPTO_TFM_RES_BAD_KEY_LEN);
                return ret;