All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamin Lin <jamin_lin@aspeedtech.com>
To: Joel Stanley <joel@jms.id.au>, Simon Glass <sjg@chromium.org>,
	"Patrick Doyle" <wpdster@gmail.com>,
	Reuben Dowle <reubendowle0@gmail.com>,
	open list <u-boot@lists.denx.de>
Cc: <troy_lee@aspeedtech.com>, <steven_lee@aspeedtech.com>
Subject: [PATCH v1 1/1] support rsa3072
Date: Wed, 8 Dec 2021 18:36:21 +0800	[thread overview]
Message-ID: <20211208103621.20531-2-jamin_lin@aspeedtech.com> (raw)
In-Reply-To: <20211208103621.20531-1-jamin_lin@aspeedtech.com>

This patch set support rsa3072.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
---
 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 */
-- 
2.17.1


  reply	other threads:[~2021-12-08 12:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-08 10:36 [PATCH v1 0/1] support rsa3072 Jamin Lin
2021-12-08 10:36 ` Jamin Lin [this message]
2021-12-08 14:48   ` [PATCH v1 1/1] " Tom Rini
2021-12-09  5:02     ` Jamin Lin
  -- strict thread matches above, loose matches on Subject: below --
2021-12-08 10:37 [PATCH v1 0/1] " Jamin Lin
2021-12-08 10:37 ` [PATCH v1 1/1] " Jamin Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211208103621.20531-2-jamin_lin@aspeedtech.com \
    --to=jamin_lin@aspeedtech.com \
    --cc=joel@jms.id.au \
    --cc=reubendowle0@gmail.com \
    --cc=sjg@chromium.org \
    --cc=steven_lee@aspeedtech.com \
    --cc=troy_lee@aspeedtech.com \
    --cc=u-boot@lists.denx.de \
    --cc=wpdster@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.