Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1698617ybg; Sun, 27 Oct 2019 03:09:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzonQakDW1/5sEalvqViUs34uikb4sDLwOzIp6KtesxRB9RqhPpdi5f4coxNvQeuInxrjYA X-Received: by 2002:a05:6402:12d5:: with SMTP id k21mr13926598edx.56.1572170997459; Sun, 27 Oct 2019 03:09:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572170997; cv=none; d=google.com; s=arc-20160816; b=zU+SqGQAf21vJ4TMLQa4d1CBXEoV7ekVb1pWyMgGs1qAMgMQdC8NmNcYwmS4KjY2zo awmRKOul2Mbn94aZdIIq/N2FJHc1TK086rONG4zBFORG+HNGVRP1FsiplhdAyIAEiKBQ 8e+QRSSoUnfQ0s09Bo0+g660cvjz6zRsflv8XWMPaLFi1VicffozIM8C+ejZ7q+mKYu4 uIpLY1Vu5Ei4yspEgvRaT1wgpq/LzzVrGI+u4k12myUWtfhag2c0lH6xr4UxuViMSgX7 eHznP3wiW3cPrBUBpilwmp92vq20vdvE09IeGTFKfW0oNvZ/zPwDoAo5vaAhOklVnzO9 3neg== 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=i2K85C0xh/mBwjLjwodqXpGNynU3855Gigp34MliOso=; b=onShRBnHRqzUHfkgdkmhP8Y6CJyvGzqZ5G5omTWqMe6JvASoWhItKbkQUjNzIM9nEh yh+mJaM30pfOlwRDP+0Zvyz7BJeDsZBroOu2C3fykhCH3Paqi5dCJsmPhZin15Uh2Xmq gmANE8w19D4Saro9VUQBV6Yk8mxC8xN3o2486yFab4lQGzzPP5balVAqqp35OIpGzwfz akGLLjH65AXAU2u5XByin+KJWXfe1bNs0Aap3Dv9CNARAL1ok0HLjk38orjM+vR1QkGl VsTmORq0HwmeFdi4olKYMjYoA3aTreELV4i4MFKa2F/3MKuSLr4nMVhw+Ee85ilMSqbE q6oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VKNzI+eO; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gz21si3613458ejb.260.2019.10.27.03.09.31; Sun, 27 Oct 2019 03:09: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=@gmail.com header.s=20161025 header.b=VKNzI+eO; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726674AbfJ0KI1 (ORCPT + 99 others); Sun, 27 Oct 2019 06:08:27 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:33862 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726469AbfJ0KI1 (ORCPT ); Sun, 27 Oct 2019 06:08:27 -0400 Received: by mail-wm1-f68.google.com with SMTP id v3so7403011wmh.1 for ; Sun, 27 Oct 2019 03:08:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=i2K85C0xh/mBwjLjwodqXpGNynU3855Gigp34MliOso=; b=VKNzI+eOmJOxBCAM/Nn3qMGme/HCb+OkV5LUbvkSHNDhs7RXVc3sCru4IyMxq2MygP s0kAjKXLZSM46eITbbWoJG02lOa+JoyqxVSWOqd0rOj0TdByrpvCusNlK0Q5LxpyHb6E T6GyiXVmznhxBYUdb6Bm1AdWWMRHaBBl7xpdPSJpBoBmqeZz2f2/2+ui3ksDNb7WKuIC NkZuKpfjqbb3oJhFUeLVUFSeRBK/HFnGKX+fCJIH0it9uMZvIVErGdnFl8QyIveztUAL r+CShUblbjf8SQDg3qfbgWrU7XI3d1HdMyRSfNGzpjRTlVXSds/LQylr2v/aH9RjwPzv h1Ig== 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=i2K85C0xh/mBwjLjwodqXpGNynU3855Gigp34MliOso=; b=Ic0zFLhEQibH8XRzKqln0O0hhKeVU8QqZ2LIWHQjstNtJ4wTZhx0n10sz+f2DeXU0i 9YKoOwOv6masoGs7dornAP/Gg3sjTiqtdV/0TM5ms10saLy7k9W75rOssZGbmDhAoPAy TItxVvGJ7FrwL9cKGIwh8mMeN16Owi0cKayNNtwFEe40qknkKix2XG2UlT/EPBDregEk 6LaQFS/9hdnIQg+/G6oOe8JBJ4r5Z0qSyBBMSupnd+8smJ8atJgLmQ2GXAuBdxj/MvRK rAwxDGl5wq6PnpoSkWuRRohAdq00ANKGUP+p8p9j6PHanWE+4O5akI+3uJySikvdmRGY EDzg== X-Gm-Message-State: APjAAAWW59JfZpl1bqVeUykBzB4ffq6xv3OIkHTinV4GEKz5oHNSUvDZ K4sjsTS3xAqrhhmQif1RHBc= X-Received: by 2002:a1c:5f82:: with SMTP id t124mr11557345wmb.114.1572170904822; Sun, 27 Oct 2019 03:08:24 -0700 (PDT) Received: from debian64.daheim (p5B0D7E0E.dip0.t-ipconnect.de. [91.13.126.14]) by smtp.gmail.com with ESMTPSA id 37sm13475991wrc.96.2019.10.27.03.08.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Oct 2019 03:08:23 -0700 (PDT) Received: from localhost.daheim ([127.0.0.1] helo=debian64.localnet) by debian64.daheim with esmtp (Exim 4.92.3) (envelope-from ) id 1iOfTC-0002Ej-Lm; Sun, 27 Oct 2019 11:08:22 +0100 From: Christian Lamparter To: Ard Biesheuvel Cc: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au, ebiggers@google.com Subject: Re: [PATCH v4 24/32] crypto: amcc/aes - switch to AES library for GCM key derivation Date: Sun, 27 Oct 2019 11:08:22 +0100 Message-ID: <7787734.Led6RIzHno@debian64> In-Reply-To: <20190702194150.10405-25-ard.biesheuvel@linaro.org> References: <20190702194150.10405-1-ard.biesheuvel@linaro.org> <20190702194150.10405-25-ard.biesheuvel@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Hi, On Tuesday, July 2, 2019 9:41:42 PM CET Ard Biesheuvel wrote: > The AMCC code for GCM key derivation allocates a AES cipher to > perform a single block encryption. So let's switch to the new > and more lightweight AES library instead. > > Signed-off-by: Ard Biesheuvel > --- > drivers/crypto/Kconfig | 2 +- > drivers/crypto/amcc/crypto4xx_alg.c | 24 +++++++------------- > 2 files changed, 9 insertions(+), 17 deletions(-) > > diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig > index b30b84089d11..c7ac1e6d23d4 100644 > --- a/drivers/crypto/Kconfig > +++ b/drivers/crypto/Kconfig > @@ -311,7 +311,7 @@ config CRYPTO_DEV_PPC4XX > depends on PPC && 4xx > select CRYPTO_HASH > select CRYPTO_AEAD > - select CRYPTO_AES > + select CRYPTO_LIB_AES I think that getting rid of CRYPTO_AES was not a good idea here. Reason being that the crypto4xx driver registers fallbacks to cover edge-cases for AES-CTR, AES-CCM and AES-GCM modes that the hardware is incapbale of handling itself. So without the dependency of CRYPTO_AES, I think there's now a way to build the crypto4xx module without necessarily having CRYPTO_AES. And if that's the case then the necessary fallbacks cannot be instantiated and the driver will not provide the afromentioned modes. Can somebody clarify? Regards, Christian