[PATCH v1 1/1] support rsa3072

Tom Rini trini at konsulko.com
Wed Dec 8 15:48:00 CET 2021


On Wed, Dec 08, 2021 at 06:36:21PM +0800, Jamin Lin wrote:

> This patch set support rsa3072.
> 
> Signed-off-by: Jamin Lin <jamin_lin at 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 */

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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20211208/7c08c99e/attachment.sig>


More information about the U-Boot mailing list