* [PATCH v2 0/1] rsa: adds rsa3072 algorithm @ 2021-12-09 3:57 Jamin Lin 2021-12-09 3:57 ` [PATCH v2] " Jamin Lin 0 siblings, 1 reply; 4+ messages in thread From: Jamin Lin @ 2021-12-09 3:57 UTC (permalink / raw) To: Alexandru Gagniuc, Simon Glass, Philippe Reynes, Thomas Perrot, Sean Anderson, open list Cc: troy_lee, steven_lee Add to support rsa 30272 bits algorithm in tools for make-image signing at host side and add rsa 3027 bits verification in the image binary. v2: - update to send a single patch *** BLURB HERE *** Jamin Lin (1): rsa: adds rsa3072 algorithm include/u-boot/rsa.h | 1 + lib/rsa/rsa-verify.c | 6 ++++++ tools/image-sig-host.c | 7 +++++++ 3 files changed, 14 insertions(+) -- 2.17.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] rsa: adds rsa3072 algorithm 2021-12-09 3:57 [PATCH v2 0/1] rsa: adds rsa3072 algorithm Jamin Lin @ 2021-12-09 3:57 ` Jamin Lin 2021-12-10 0:15 ` Simon Glass 0 siblings, 1 reply; 4+ messages in thread From: Jamin Lin @ 2021-12-09 3:57 UTC (permalink / raw) To: Alexandru Gagniuc, Simon Glass, Philippe Reynes, Sean Anderson, Thomas Perrot, open list Cc: troy_lee, steven_lee Add to support rsa 30272 bits algorithm in tools for image sign at host side and adds rsa 3027 bits verification in the image binary. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> wq --- include/u-boot/rsa.h | 1 + lib/rsa/rsa-verify.c | 6 ++++++ tools/image-sig-host.c | 7 +++++++ 3 files changed, 14 insertions(+) diff --git a/include/u-boot/rsa.h b/include/u-boot/rsa.h index 7556aa5b4b..bb56c2243c 100644 --- a/include/u-boot/rsa.h +++ b/include/u-boot/rsa.h @@ -110,6 +110,7 @@ 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 */ diff --git a/lib/rsa/rsa-verify.c b/lib/rsa/rsa-verify.c index 83f7564101..4fe487d7e5 100644 --- a/lib/rsa/rsa-verify.c +++ b/lib/rsa/rsa-verify.c @@ -588,6 +588,12 @@ U_BOOT_CRYPTO_ALGO(rsa2048) = { .verify = rsa_verify, }; +U_BOOT_CRYPTO_ALGO(rsa3072) = { + .name = "rsa3072", + .key_len = RSA3072_BYTES, + .verify = rsa_verify, +}; + U_BOOT_CRYPTO_ALGO(rsa4096) = { .name = "rsa4096", .key_len = RSA4096_BYTES, diff --git a/tools/image-sig-host.c b/tools/image-sig-host.c index 8ed6998dab..d0133aec4c 100644 --- a/tools/image-sig-host.c +++ b/tools/image-sig-host.c @@ -55,6 +55,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, -- 2.17.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] rsa: adds rsa3072 algorithm 2021-12-09 3:57 ` [PATCH v2] " Jamin Lin @ 2021-12-10 0:15 ` Simon Glass 2021-12-10 6:05 ` Jamin Lin 0 siblings, 1 reply; 4+ messages in thread From: Simon Glass @ 2021-12-10 0:15 UTC (permalink / raw) To: Jamin Lin Cc: Alexandru Gagniuc, Philippe Reynes, Sean Anderson, Thomas Perrot, open list, troy_lee, steven_lee Hi Jamin, On Wed, 8 Dec 2021 at 20:57, Jamin Lin <jamin_lin@aspeedtech.com> wrote: > > Add to support rsa 30272 bits algorithm in tools 3072 > for image sign at host side and adds rsa 3027 bits 3072 ? > verification in the image binary. > > Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> > wq > --- > include/u-boot/rsa.h | 1 + > lib/rsa/rsa-verify.c | 6 ++++++ > tools/image-sig-host.c | 7 +++++++ > 3 files changed, 14 insertions(+) Please can you update the vboot tes to add a test for this? Regards, Simon ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] rsa: adds rsa3072 algorithm 2021-12-10 0:15 ` Simon Glass @ 2021-12-10 6:05 ` Jamin Lin 0 siblings, 0 replies; 4+ messages in thread From: Jamin Lin @ 2021-12-10 6:05 UTC (permalink / raw) To: Simon Glass Cc: Alexandru Gagniuc, Philippe Reynes, Sean Anderson, Thomas Perrot, open list, Troy Lee, Steven Lee The 12/10/2021 00:15, Simon Glass wrote: > Hi Jamin, > > On Wed, 8 Dec 2021 at 20:57, Jamin Lin <jamin_lin@aspeedtech.com> wrote: > > > > Add to support rsa 30272 bits algorithm in tools > > 3072 > Will fix > > for image sign at host side and adds rsa 3027 bits > > 3072 ? > Will fix > > verification in the image binary. > > > > Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> > > wq > > --- > > include/u-boot/rsa.h | 1 + > > lib/rsa/rsa-verify.c | 6 ++++++ > > tools/image-sig-host.c | 7 +++++++ > > 3 files changed, 14 insertions(+) > > Please can you update the vboot tes to add a test for this? > > Regards, > Simon Will add Hi Simon Thanks for your suggestion. I fixed typo and added test case in vboot for rsa3072 testing. V3 patch is waiting for your review. Thanks ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-12-10 6:05 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2021-12-09 3:57 [PATCH v2 0/1] rsa: adds rsa3072 algorithm Jamin Lin 2021-12-09 3:57 ` [PATCH v2] " Jamin Lin 2021-12-10 0:15 ` Simon Glass 2021-12-10 6:05 ` Jamin Lin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox