Message ID | 20190622193427.20336-9-ard.biesheuvel@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2255896ilk; Sat, 22 Jun 2019 12:34:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqxLRVh3ogsS82kZcYViu9Emsi5/FfCKzXFdKWN57DlyvXdO2zqsxw3P1mR9ud0OngsqEr+j X-Received: by 2002:a17:90a:8a8e:: with SMTP id x14mr14225411pjn.103.1561232092081; Sat, 22 Jun 2019 12:34:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561232092; cv=none; d=google.com; s=arc-20160816; b=cngyaBkr8t1EveXbN7ryWJs0NoC9j6frYt/ErH9JlaKdxbYaL/vmauBkqaJEi9xAE2 zX7YLfATpUqTx+Hf7m8by2dnaPPUkBHI/v5gHR/sVxC5Adyq4UQi4svMMIyHwqbyk/e4 gJT0ykpbX/7S78j6q6Hvl9pp4AY3PWxkrn6pEj9h6xPVu00BY7JbawJC1oNZ9UwxMwY8 WvMymYO2bJFdy74o/cWwYs91bjWtDSfjIjzY0+pwjcwRmA97rzDaqMHyn0yJ7o3LkcMD XEzFFrAtnJ67TvelT6i4WOAnn1bt7KUN+fTEfWigx/p/nBdtSLA9pUS5s5M3qZdjxuwh c4mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lQLA1Z6u9tD3If/MHOVikbtefg1FLPAfk8jJsqm/d/c=; b=nl3DxnEbqPBMiXc6v+JOJLEsM6G24rN+9CQlayPQoeNpr6JXULHxV/rugFrw0xwhFV 57HOH9TYuZBQiijAOwiAt+RCIQEktwXdEedFh3Z2pd9TTwG0zSys8lNW5lB5PoQrs69z 6lP3gLJ0sfVR0os8RPMbFVoZYO5Uw9SO9LsI6OYbRCfnt3IkbRSUSOcfxIkFZugm/35o JEbKAH9XwoUNEjcEwN+n2RP27r6O/26Cu+79zYsiEY756hp8tHYJAzoi25GyFrdltBo8 NuaaJtWWktiNhJFfVsVIZEMCtYgqAFEjzlpVlOVdeZjkkVi8k3rTcTan3m8ikJuQ0jyl QTrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MYRAFNet; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <linux-crypto-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l21si5511699pgb.409.2019.06.22.12.34.51; Sat, 22 Jun 2019 12:34:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MYRAFNet; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726351AbfFVTev (ORCPT <rfc822;sumit.garg@linaro.org> + 3 others); Sat, 22 Jun 2019 15:34:51 -0400 Received: from mail-wm1-f66.google.com ([209.85.128.66]:37423 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726343AbfFVTev (ORCPT <rfc822;linux-crypto@vger.kernel.org>); Sat, 22 Jun 2019 15:34:51 -0400 Received: by mail-wm1-f66.google.com with SMTP id f17so9609732wme.2 for <linux-crypto@vger.kernel.org>; Sat, 22 Jun 2019 12:34:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lQLA1Z6u9tD3If/MHOVikbtefg1FLPAfk8jJsqm/d/c=; b=MYRAFNetilQRuZslBml8aKhDISEudeoPejyATZfvssgTxaDE/R1CKYQt6EVyk0b4jg Rh6Xxk8espv5gC83N6yobsZ2u3+e/bPXfbY4vgjDK6pbyepwv3NufLqIqo1DpVtGjxG5 LuZVwxF3ZFCsWDOBrAVGL9pKcj+k2Dit3xkITDL9AeB+qiv8h4pS+X9eQNtOpTs5EI9p PuB5hVD755KqNcIbZfbHTAr4G78BS/qFDiQrPDx9xZ6mTRJ3paRktbKbAk8DLDCdexzk 02XLXUhiUXeu/M51zGgMPXL1ofFPl2LQqy7JrkCSDoO3I9fldGnGLo+jgeOjn4qLPMEa jt3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lQLA1Z6u9tD3If/MHOVikbtefg1FLPAfk8jJsqm/d/c=; b=pbZlTIcqXQF4OEDdZtJ7whRWfzA06YxQEXEvbeqszo6sfFBVHOupAoo8iLPaMRHZu/ LcoSoO6bJMDG0A99mSVNQklktkFk87T9Xswux1T4AQWQYq2kE/4y1a3DfiFrJYZjGCaj U8VRRcZp1gEkU/aWVCHWxFXqMFTWzZdexL3PyV2DfI9jeAJ5CwIJ5r/SLeanQ9DvSigy tSou3CpdOrry+u0Ifsu4wUqpJtRK2MsZa7ky2+Mr2OgbtL5hAV87vksP9kInvQok5tCV 498s3SdN+U1sX9YNU/sUYrvXnRf5BOqwPYYVcYaZmyPVCKWw8Ycma4O4/HtL1YmYfY1T pqzA== X-Gm-Message-State: APjAAAV2r0v2GZU4wVyz4IxcdSJS8Nwjq/jlSI9FBLjBYLuqb//0GIz6 C8xYszOh7K9Lgdg7ji5+GaMcdWeoHFq/3KBB X-Received: by 2002:a1c:80c1:: with SMTP id b184mr8037126wmd.24.1561232088802; Sat, 22 Jun 2019 12:34:48 -0700 (PDT) Received: from sudo.home ([2a01:cb1d:112:6f00:4bd:3f91:4ef8:ae7e]) by smtp.gmail.com with ESMTPSA id h8sm4814494wmf.12.2019.06.22.12.34.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Jun 2019 12:34:48 -0700 (PDT) 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 Message-Id: <20190622193427.20336-9-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190622193427.20336-1-ard.biesheuvel@linaro.org> References: <20190622193427.20336-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: <linux-crypto.vger.kernel.org> X-Mailing-List: linux-crypto@vger.kernel.org |
Series |
crypto: AES cleanup
|
expand
|
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;
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(-) -- 2.20.1