Message ID | 20190612124838.2492-8-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 e2csp3640711ilk; Wed, 12 Jun 2019 05:48:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxE2hJZa6aXqrZbCjOzLwPYLrsTXha33xYKJL3n0Ke9VDZH2j98Rbf8kza+GH3QFgrXWO3j X-Received: by 2002:a17:90a:6544:: with SMTP id f4mr32946135pjs.17.1560343737625; Wed, 12 Jun 2019 05:48:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560343737; cv=none; d=google.com; s=arc-20160816; b=CGpygvSiIMXb6Hh6pdBA/w9ON1DJeZKKKlwSxQBlmdp+ZlNEODxOfzoH+ZC0nKtKGm 8iCGgxzoRGlM6FrxMhcEPWUhHr9ucLsC+/vzSs8vum93euZ1hPWFFEzEg1/Vs4PtJjjY xwgnVtAh11JqsHFfRJ+1OVPpdzPEmz0plxOL+wdLMhMKjkscQPJAXPUusnVK5hCRNdpD Gr1+fOzHVLcuOKVksXw50k7cHdq6EBkqF3z1BFB1vYtykNV/Zk1ViUmLAsdPgrKTO3ea 6Da3Ypk7Il2XcRq9kDXybG3PpCJcaDiS4SxWhl65V+tP4U0bjWb0CUHNCq9bgm9af7EI fJ3A== 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=35aKMFTnfvApYT0bZnbnGPl1odG7lcC67cVgsN970Jc=; b=kmJJ6MXXN2GOsZ3Zk21PyEKPFwzxab1Pn8Ml3TO3oGTSt/avGhRlRgRDr9J+lvDYSc Ma606pJnoVf2la/S8iSCr89/uGN6eJi/qVRiZRF91ZNgvUieIbcR4KuCWT1elc9eK2RA DzkP+sAqmgymkZ6dYVB1pHTHwNue1uDa8y65CgF/QppYjbNVYZ1kueAcnUX4hc8jdBOc b7FBCnt//8/oBzOn9PdbgVYV/OyGG6U0Mr/f2d7Mh3fH4BSzSpQWkesxq7kp02BFw8OF um1jq8T80l3Ur7dU1kXKGN2cZbngQbSk9kQIQsoU0XKNh/4C9g5hYKlhDGjEdiIBv7IX eCdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uesOFonJ; 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 b14si16011497pgk.423.2019.06.12.05.48.57; Wed, 12 Jun 2019 05:48:57 -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=uesOFonJ; 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 S2409163AbfFLMs4 (ORCPT <rfc822;sumit.garg@linaro.org> + 3 others); Wed, 12 Jun 2019 08:48:56 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:33312 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2409157AbfFLMs4 (ORCPT <rfc822;linux-crypto@vger.kernel.org>); Wed, 12 Jun 2019 08:48:56 -0400 Received: by mail-wr1-f66.google.com with SMTP id n9so16819636wru.0 for <linux-crypto@vger.kernel.org>; Wed, 12 Jun 2019 05:48:55 -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=35aKMFTnfvApYT0bZnbnGPl1odG7lcC67cVgsN970Jc=; b=uesOFonJATVd0Dhi+ZGYHzoBuGkkmkYtb0S7HQv1Hz59/RBe4i5p43ZVuPUMbAGNHx 9bpEHnn3XLn+RgRUFTon52E1BHildbm3m0MKNdS97AHqyTiqUkwWy1VHjpoZLou1P7AG r6I3q/xWtdUl+qLTdEO9jqMSgUoxL5QnSYzyV4l22NQ322Y1N09yiOP49WkSD8lVneJY 0rvI97kyanKet4adT23Xdj9kb9nzLJnzZK2itXiUChvrbGQiNl/foh5tvhZ3f4RwPhug ADKDGvtOpFHPbKSrQCbUKE88bbtYeKZWOeLH/fN+NcVVMwnOC3lgFXo5Fq3XhuRYhMMG R8Zg== 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=35aKMFTnfvApYT0bZnbnGPl1odG7lcC67cVgsN970Jc=; b=cDGHxiFEoxSvLyWHQUg/XPpm5gDSl3mtUzVmCPnnphlvWBcf+Mjh80DMUP/uBl9yVq 8R8UFSruv4CoP6AYsg1eFAz+aS+2dogvfayTw7hiewXMnkPItqBKhLIqZu2jsSK1Z3P9 sBHSA37k+vVCiUPZ3zIoUQ0c8+9Vi+mSQg1rDdMbYszYMRdQjWmTH0KCbqztq30E9RsH tVCTDOB6bbqtuj8TrH1GCu3X4en2MI7+sLwE2uqdOBVcM/0LSd4TA90cVvruXIkZRIl+ cYfl8ymN3Ta/RxIMb7zPxtFctObDf4enHW2+iFOF2IflrDHrxkXRfMVABBPNLAYlZ1/L TcfQ== X-Gm-Message-State: APjAAAUz0xJnydBh/kpIh/n5dPC71TUAzjLJ82UUwO5H1tq4+iGfj+3c vrhcT6jP/QVFg3epHLJ4jFMwSepBsPQxgQ== X-Received: by 2002:a5d:4a0b:: with SMTP id m11mr7629850wrq.251.1560343734764; Wed, 12 Jun 2019 05:48:54 -0700 (PDT) Received: from sudo.home ([2a01:cb1d:112:6f00:353a:f33a:a393:3ada]) by smtp.gmail.com with ESMTPSA id s8sm28505480wra.55.2019.06.12.05.48.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Jun 2019 05:48:54 -0700 (PDT) From: Ard Biesheuvel <ard.biesheuvel@linaro.org> To: linux-crypto@vger.kernel.org Cc: herbert@gondor.apana.org.au, ebiggers@kernel.org, Ard Biesheuvel <ard.biesheuvel@linaro.org> Subject: [RFC PATCH 07/20] crypto: padlock/aes - switch to library version of key expansion routine Date: Wed, 12 Jun 2019 14:48:25 +0200 Message-Id: <20190612124838.2492-8-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190612124838.2492-1-ard.biesheuvel@linaro.org> References: <20190612124838.2492-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 |
AES cleanup
|
expand
|
diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index 0af08081e305..b7557eb69409 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig @@ -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. diff --git a/drivers/crypto/padlock-aes.c b/drivers/crypto/padlock-aes.c index ad020133da19..e73eab9bc22a 100644 --- a/drivers/crypto/padlock-aes.c +++ b/drivers/crypto/padlock-aes.c @@ -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; }
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/padlock-aes.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.20.1