All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: linux-crypto@vger.kernel.org
Cc: herbert@gondor.apana.org.au, ebiggers@google.com,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>
Subject: [PATCH v2 08/26] crypto: cesa/aes - switch to library version of key expansion routine
Date: Sat, 22 Jun 2019 21:34:09 +0200	[thread overview]
Message-ID: <20190622193427.20336-9-ard.biesheuvel@linaro.org> (raw)
In-Reply-To: <20190622193427.20336-1-ard.biesheuvel@linaro.org>

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>
---
 drivers/crypto/Kconfig          | 2 +-
 drivers/crypto/marvell/cipher.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index 3fca5f7e38f0..fdccadc94819 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -213,7 +213,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
diff --git a/drivers/crypto/marvell/cipher.c b/drivers/crypto/marvell/cipher.c
index 2fd936b19c6d..debe7d9f00ae 100644
--- a/drivers/crypto/marvell/cipher.c
+++ b/drivers/crypto/marvell/cipher.c
@@ -257,7 +257,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;
-- 
2.20.1


  parent reply	other threads:[~2019-06-22 19:34 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-22 19:34 [PATCH v2 00/26]crypto: AES cleanup Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 01/26] crypto: arm/aes-ce - cosmetic/whitespace cleanup Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 02/26] crypto: aes - rename local routines to prevent future clashes Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 03/26] crypto: aes/fixed-time - align key schedule with other implementations Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 04/26] crypto: aes - create AES library based on the fixed time AES code Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 05/26] crypto: x86/aes-ni - switch to generic for fallback and key routines Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 06/26] crypto: x86/aes - drop scalar assembler implementations Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 07/26] crypto: padlock/aes - switch to library version of key expansion routine Ard Biesheuvel
2019-06-22 19:34 ` Ard Biesheuvel [this message]
2019-06-22 19:34 ` [PATCH v2 09/26] crypto: safexcel/aes " Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 10/26] crypto: arm64/ghash - switch to AES library Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 11/26] crypto: arm/aes-neonbs - switch to library version of key expansion routine Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 12/26] crypto: arm64/aes-ccm - switch to AES library Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 13/26] crypto: arm64/aes-neonbs - switch to library version of key expansion routine Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 14/26] crypto: arm64/aes-ce " Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 15/26] crypto: generic/aes - drop key expansion routine in favor of library version Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 16/26] crypto: ctr - add helper for performing a CTR encryption walk Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 17/26] crypto: aes - move sync ctr(aes) to AES library and generic helper Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 18/26] crypto: arm64/aes-ce-cipher - use AES library as fallback Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 19/26] crypto: aes/arm - use native endiannes for key schedule Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 20/26] crypto: arm/aes-ce - provide a synchronous version of ctr(aes) Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 21/26] crypto: arm/aes-neonbs " Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 22/26] crypto: arm/ghash - provide a synchronous version Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 23/26] bluetooth: switch to AES library Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 24/26] crypto: amcc/aes - switch to AES library for GCM key derivation Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 25/26] crypto: ccp - move to AES library for CMAC " Ard Biesheuvel
2019-06-22 19:34 ` [PATCH v2 26/26] crypto: chelsio/aes - replace AES cipher calls with library calls Ard Biesheuvel
2019-06-26  4:11 ` [PATCH v2 00/26]crypto: AES cleanup Eric Biggers
2019-06-27 10:03   ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190622193427.20336-9-ard.biesheuvel@linaro.org \
    --to=ard.biesheuvel@linaro.org \
    --cc=ebiggers@google.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.