From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 76971C433EF for ; Thu, 9 Dec 2021 05:03:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E3A92830E4; Thu, 9 Dec 2021 06:02:56 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 6F733830EC; Thu, 9 Dec 2021 06:02:55 +0100 (CET) Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 10915811AC for ; Thu, 9 Dec 2021 06:02:45 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jamin_lin@aspeedtech.com Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 1B94bRgN039066; Thu, 9 Dec 2021 12:37:27 +0800 (GMT-8) (envelope-from jamin_lin@aspeedtech.com) Received: from aspeedtech.com (118.99.190.129) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 9 Dec 2021 13:02:29 +0800 Date: Thu, 9 Dec 2021 13:02:26 +0800 From: Jamin Lin To: Tom Rini CC: Joel Stanley , Simon Glass , "Patrick Doyle" , Reuben Dowle , open list , Troy Lee , Steven Lee Subject: Re: [PATCH v1 1/1] support rsa3072 Message-ID: <20211209050225.GA5907@aspeedtech.com> References: <20211208103621.20531-1-jamin_lin@aspeedtech.com> <20211208103621.20531-2-jamin_lin@aspeedtech.com> <20211208144800.GE2355606@bill-the-cat> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20211208144800.GE2355606@bill-the-cat> User-Agent: Mutt/1.9.4 (2018-02-28) X-Originating-IP: [118.99.190.129] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 1B94bRgN039066 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.38 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean The 12/08/2021 14:48, Tom Rini wrote: > On Wed, Dec 08, 2021 at 06:36:21PM +0800, Jamin Lin wrote: > > > This patch set support rsa3072. > > > > Signed-off-by: Jamin Lin > > --- > > common/image-sig.c | 7 +++++++ > > include/u-boot/rsa.h | 1 + > > 2 files changed, 8 insertions(+) > > > > diff --git a/common/image-sig.c b/common/image-sig.c > > index e4bbac55c1..c94854ef8b 100644 > > --- a/common/image-sig.c > > +++ b/common/image-sig.c > > @@ -85,6 +85,13 @@ struct crypto_algo crypto_algos[] = { > > .add_verify_data = rsa_add_verify_data, > > .verify = rsa_verify, > > }, > > + { > > + .name = "rsa3072", > > + .key_len = RSA3072_BYTES, > > + .sign = rsa_sign, > > + .add_verify_data = rsa_add_verify_data, > > + .verify = rsa_verify, > > + }, > > { > > .name = "rsa4096", > > .key_len = RSA4096_BYTES, > > diff --git a/include/u-boot/rsa.h b/include/u-boot/rsa.h > > index 2d3024d8b7..d561e5f8ca 100644 > > --- a/include/u-boot/rsa.h > > +++ b/include/u-boot/rsa.h > > @@ -135,6 +135,7 @@ static inline int padding_pss_verify(struct image_sign_info *info, > > #define RSA_DEFAULT_PADDING_NAME "pkcs-1.5" > > > > #define RSA2048_BYTES (2048 / 8) > > +#define RSA3072_BYTES (3072 / 8) > > #define RSA4096_BYTES (4096 / 8) > > > > /* This is the minimum/maximum key size we support, in bits */ > > For both of these patches, please expand the commit message and header > so it's clear where you're adding the support to. Perhaps they should > be squashed in to a single patch as the tooling needs to support it when > the binary also supports it? > > -- > Tom Hi Tom Thanks for your review. I sent v2 patch and waiting for your review. Thanks