Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3745295ybi; Tue, 2 Jul 2019 12:42:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqzmF9MUEzQbcURhMTpC3G/u0wwTqLqwipnEPwVvP+RClefLwkKThvwg+FtoQpoaElGAbkCL X-Received: by 2002:a17:902:e211:: with SMTP id ce17mr36959610plb.193.1562096560141; Tue, 02 Jul 2019 12:42:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562096560; cv=none; d=google.com; s=arc-20160816; b=Bji/4BB/idV0gmXT/CVQo4ompAssKwQ9M58pfl5LijKKfsd6GpVj8mUbj8BB8EKgI2 zU3kQmy230W21pnpdUUYLP2ZY9YuukJCcqR0b38/+WisosBSVYMjLzjxbDiSuwD0APHu 2eHYZATk8URh3hNj4vC1DKDENRwMT29qv0hnFacsYKvHIn3gCjKsRbBwIyBfzdAWUoAm sx45AsmpZirKIiYPfJapGwP/3MjuzA2mROX6CgrABimYSA4/bQ25FTCm0GLDXJ2wBYn+ hsTInZh5sEE4jh8TqOUkge637kT4iZ8eXK0po+5S9cbnGi9W5RMYVvX/HOGzdoLECRBu Fheg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=2vu90pozuzPI+4NwppRxnbZtYKOaoe2IbHpzwdsfy4U=; b=RAXAdwmJc1WUnoJeamFqwBgFAHRefQe/WPdBhfwXT4dNAWz7Ls8YGzLo4Fosj4IRIn CAMpdVDFrJIhId56aEZlnkawcn9Y0mOTYeQD8aTS5YW9eWOxn2aV0nlvricN6VzBwL5t 4S5rT3xJZq6AvxvYQ0q+AAc7PLcnhvkZu+R+ZNn1UucdLTdPUJHPtYRUJ2yXWIg57vTX IsugdpFUwkp/t4Z1F5bRUuauJh62uQDm4ZzOLRx6Oa/8K+RQZetAagsmr37l+k64K2xV qYedMVaR01/qmHOyQwQM7H4fz9VLe2LH07koOda22pr1T0eFlIy6DFLfbByirEZXjUuT rvtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="bgemgjj/"; 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: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t143si4134792pgb.542.2019.07.02.12.42.26; Tue, 02 Jul 2019 12:42:40 -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="bgemgjj/"; 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 S1727051AbfGBTmY (ORCPT + 99 others); Tue, 2 Jul 2019 15:42:24 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:36632 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727049AbfGBTmX (ORCPT ); Tue, 2 Jul 2019 15:42:23 -0400 Received: by mail-lj1-f196.google.com with SMTP id i21so18199590ljj.3 for ; Tue, 02 Jul 2019 12:42:22 -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; bh=2vu90pozuzPI+4NwppRxnbZtYKOaoe2IbHpzwdsfy4U=; b=bgemgjj/Z8o864DCjP3XY81G24w7BW3XOxgNRvKtwcYqQd7DeqA2OMuDc3wF+cKdTE JXIfYaSod1nr8sPXEwlPeNlScTEZY4zke+aPMAvfbv3sUHr6C1L5IAfnfNN2bRljgMcy 7/U03X/wtFjl4cYcvZKe+zM0yF3Fblk+4HW5O95SIHyLtEGhySx9p3LZbGtFzRobdo1K UCM+jiy75eUH2HD24zs3Ke/l5xa3O2CzvLVZS5RVRfiLI7s6JZQdHpyDpuKXUTqopjPt l00bKwcOd8eWaJq98njJ/tvGRt8fvh90uS09AKKo8xKovvwZEAD4biWmoTkC1+EyXc02 JWLA== 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; bh=2vu90pozuzPI+4NwppRxnbZtYKOaoe2IbHpzwdsfy4U=; b=kLyz6Ov6/4bt9bztxBmm9LJ3C2ej0IWSiMApbXZX3pqRjjMmbfDkbSRzZxf7RN6jGX kOkz9XK9Tedy8ZbL0OW+IizmGZMdE6nnIz1jL1nLCnY5A2S6FJidfLD60Nerh9J4MXSI E3ukDWhsbAvaSYuHiBhEGrQuvkwODVVIAWbIB3VBs/kEErRBflbqwrTctpoxPftpZI/W AoxklhE9xKnGviUnf7t8C+V+pAxl06W2eb1idkNgpKbftJ5KKVbOeOrb+3kyO33/94aV DIA7d/eLiNvgLpd8wmkAqCcAGpgVxBoEsvYpiUOBkcLhyL1dBHJT9wyPKUruiAQbeblY FmiQ== X-Gm-Message-State: APjAAAXkWkco6mdsWiViLaTVXOCZ4PSMpeg23qtBhj/h+jYEXcWDMm/m 9jOpVn/JwRLaZG34IKWqwmMwpBoZRWlvRQdU X-Received: by 2002:a2e:50e:: with SMTP id 14mr18798392ljf.5.1562096541399; Tue, 02 Jul 2019 12:42:21 -0700 (PDT) Received: from e111045-lin.arm.com (89-212-78-239.static.t-2.net. [89.212.78.239]) by smtp.gmail.com with ESMTPSA id 24sm4475163ljs.63.2019.07.02.12.42.20 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 02 Jul 2019 12:42:20 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, ebiggers@google.com, Ard Biesheuvel Subject: [PATCH v4 08/32] crypto: cesa/aes - switch to library version of key expansion routine Date: Tue, 2 Jul 2019 21:41:26 +0200 Message-Id: <20190702194150.10405-9-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190702194150.10405-1-ard.biesheuvel@linaro.org> References: <20190702194150.10405-1-ard.biesheuvel@linaro.org> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.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 --- 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.17.1