Message ID | 20190622193427.20336-10-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 e2csp2255908ilk; Sat, 22 Jun 2019 12:34:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmuCQ6uBU85fPH7qaL7U/bXtU8YF8J4yvXwIDyBMWPcol/W/317apz6iS94LBftBNUbquR X-Received: by 2002:a63:730c:: with SMTP id o12mr999219pgc.18.1561232093659; Sat, 22 Jun 2019 12:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561232093; cv=none; d=google.com; s=arc-20160816; b=V4nz1Ty1/oWF79p4zA5hJxMhKH1ZhgwRS2b+GZpjDgZk6CymT8XSfXXsHeZ6vg2Njk LSGH2Tbm5sViN6Gsup+9wYTIUmbxxdMzvb+5VOGj7ts99ENg9Tz9KdhWWKbfEp3QFWnX 6FODa5fBPpG9FFzKlb/JisluI5Lqga/xqK+lBFNgIYbnO/1mkzG23MGhMBYTLYthxB8J tBiBpp/h1sHrHPoy1O4ww5CI2Qrwd9M95R/dzYlZS4e5sJ0ELSFemR960K8lAHEstS51 ErI/wTg6LTIWf8NGzSlStl0wniB32+xiuCrLEmdZJs6F+gAPdkQ9t7POETgCRwFxnq6E /iaQ== 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=TEkyEzYA9z24dLcVZzAphhOs6uMPB3TRScCj5mulxhM=; b=kls4cF02ISCNh9JRBLboPlb7blLpm5rvJZRDehuf9HJvXgmWrrCSRA5B/HOuNgM/VT 2N1TRwGTQG225/4oTw4gHEaqnzYgNa6RCck5EWn2er6QMyIoodkMYxW7fqUF5vl+c85a omI4ASl6H9ELDRwE7ktgI5uq//q1wEDSiSjjM5MsB9Ou1h13Ckgm9999z234E7XeGcDT mlcmlimToJ+K4OpNTivBUTT1Y2mC0Zoxw2KiQzuYNZ3Nd4PL8oDTpFHroG/LfsqhAfwQ dFzIX4dxeMVbjfu6LJnHZXME62QVTwdY/1CgRVDUAbBnXHDUUwVzeHi08xuBe5+8V0RW oWhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MGwPA4QG; 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.53; Sat, 22 Jun 2019 12:34:53 -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=MGwPA4QG; 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 S1726353AbfFVTew (ORCPT <rfc822;sumit.garg@linaro.org> + 3 others); Sat, 22 Jun 2019 15:34:52 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:33742 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726338AbfFVTew (ORCPT <rfc822;linux-crypto@vger.kernel.org>); Sat, 22 Jun 2019 15:34:52 -0400 Received: by mail-wm1-f65.google.com with SMTP id h19so11351678wme.0 for <linux-crypto@vger.kernel.org>; Sat, 22 Jun 2019 12:34:50 -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=TEkyEzYA9z24dLcVZzAphhOs6uMPB3TRScCj5mulxhM=; b=MGwPA4QG2l1a7CsZmkd46vcd1qlG3ozWuiFkR6iVpRp2qCFSNs2q8yctk/eCr3booL baHALEcUZPE4O6OG5Xh8T0qsI2UWIx1UmBnUK//JNF273U1Aeml5h1OYZOSWkV4+2tT+ qCNzT9fG3QRVHaRmLoSJeezaM70E5+l4TH9pVU2op8s3fYmrq+jpEa+sxhZnE6fdUDeM Nk8+sc/2gZ+tr1Sev0vKS3aQ+WcnoJpP64hzODQldUi46qAybqDoc12KDeSx+hzkjT/n O+R//nIitNcWHldcKhVdP8mPwpPjA1zpkK4JKPBg2aJrFuRkYzJNaT6vxOdLHcP+aF7U u9eg== 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=TEkyEzYA9z24dLcVZzAphhOs6uMPB3TRScCj5mulxhM=; b=eFoUEni2Grbk4tPSjFBXKHCPYQ6Ftevz/7kBuOYC1Z1zB1L3qFRqp08N/6BYdXMzpn iALtG37KEW7dnLKkZslDAjTndfePOyMonpHE+H0d5mkHik+fiZigRMx7soIqZJdCa+bU P5czwFLk5xABOf+d8h30DNHrii1CyN4SJ+v7ZfLuwz9PJAJgIoV3QmjAqTd+eGOgb0ZH obJClDIU08+WswbviZur4v0P3q9yGuaNDYWWJgNcmLy0gRcq0wWyA5hIuLORMwJyQZxk Ek8IcUYbVZQBiBm67f1DSFtxOzSQIQa+42i09t+1+kcHK/5iw6xIjmUtA6H1wncevnc1 g8cA== X-Gm-Message-State: APjAAAXRvks+1hUrR24lDXpDB5sNKiMXpPlRUrTrqJ6OaA6hsHEY1fTF 11LekU7If7pQJAbDW7bSFlwNwQc134xMEMCy X-Received: by 2002:a1c:7e90:: with SMTP id z138mr8384504wmc.128.1561232089800; Sat, 22 Jun 2019 12:34:49 -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.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 22 Jun 2019 12:34:49 -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 09/26] crypto: safexcel/aes - switch to library version of key expansion routine Date: Sat, 22 Jun 2019 21:34:10 +0200 Message-Id: <20190622193427.20336-10-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 fdccadc94819..b30b84089d11 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig @@ -718,7 +718,7 @@ config CRYPTO_DEV_SAFEXCEL tristate "Inside Secure's SafeXcel cryptographic engine driver" depends on OF depends on (ARM64 && ARCH_MVEBU) || (COMPILE_TEST && 64BIT) - select CRYPTO_AES + select CRYPTO_LIB_AES select CRYPTO_AUTHENC select CRYPTO_BLKCIPHER select CRYPTO_DES diff --git a/drivers/crypto/inside-secure/safexcel_cipher.c b/drivers/crypto/inside-secure/safexcel_cipher.c index 8cdbdbe35681..19ec086dce4f 100644 --- a/drivers/crypto/inside-secure/safexcel_cipher.c +++ b/drivers/crypto/inside-secure/safexcel_cipher.c @@ -178,7 +178,7 @@ static int safexcel_skcipher_aes_setkey(struct crypto_skcipher *ctfm, struct crypto_aes_ctx aes; int ret, i; - ret = crypto_aes_expand_key(&aes, key, len); + ret = aes_expandkey(&aes, key, len); if (ret) { crypto_skcipher_set_flags(ctfm, 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/inside-secure/safexcel_cipher.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.20.1