]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
crypto: padlock/aes - switch to library version of key expansion routine
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 2 Jul 2019 19:41:25 +0000 (21:41 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 26 Jul 2019 04:56:02 +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/padlock-aes.c

index 603413f28fa35b5ac53959b8069d10e1d5ca8108..27121e530ca48378d3a304cbe768011a77741be4 100644 (file)
@@ -27,7 +27,7 @@ config CRYPTO_DEV_PADLOCK_AES
        tristate "PadLock driver for AES algorithm"
        depends on CRYPTO_DEV_PADLOCK
        select CRYPTO_BLKCIPHER
-       select CRYPTO_AES
+       select CRYPTO_LIB_AES
        help
          Use VIA PadLock for AES algorithm.
 
index fbba32e8cb26cfe56fa7b4a5f34c48dcb37fbcd7..8a066125007835dd7a281dec26576e1e4823fa5b 100644 (file)
@@ -145,7 +145,7 @@ static int aes_set_key(struct crypto_tfm *tfm, const u8 *in_key,
        ctx->cword.encrypt.keygen = 1;
        ctx->cword.decrypt.keygen = 1;
 
-       if (crypto_aes_expand_key(&gen_aes, in_key, key_len)) {
+       if (aes_expandkey(&gen_aes, in_key, key_len)) {
                *flags |= CRYPTO_TFM_RES_BAD_KEY_LEN;
                return -EINVAL;
        }