rsa: adds rsa3072 algorithm
v2 cover rsa: adds rsa3072 algorithm
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(+)
Signature · 1 line
2.17.1
PATCH v2 1/1 rsa: adds rsa3072 algorithm
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.
wq
--- include/u-boot/rsa.h | 1 + lib/rsa/rsa-verify.c | 6 ++++++ tools/image-sig-host.c | 7 +++++++ 3 files changed, 14 insertions(+)
include/u-boot/rsa.h +1 -0
@@ -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 */
lib/rsa/rsa-verify.c +6 -0
@@ -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 ,
tools/image-sig-host.c +7 -0
@@ -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,
Signature · 1 line
2.17.1
Hi Jamin,
Quoted 2 lines · Jamin Lin
Add to support rsa 30272 bits algorithm in tools
3072
Quoted 1 line
for image sign at host side and adds rsa 3027 bits
3072 ?
Quoted 9 lines
verification in the image binary.
Signed-off-by Jamin Lin <[email protected]>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
Quoted 8 lines · Simon Glass
Hi Jamin,
Quoted 2 lines · Jamin Lin
Add to support rsa 30272 bits algorithm in tools
3072
Will fix
Quoted 4 lines
Quoted 1 line
for image sign at host side and adds rsa 3027 bits
3072 ?
Will fix
Quoted 10 lines
Quoted 9 lines
verification in the image binary.
Signed-off-by Jamin Lin <[email protected]>wq
--- include/u-boot/rsa.h | 1 + lib/rsa/rsa-verify.c | 6 ++++++ tools/image-sig-host.c | 7 +++++++ 3 files changed, 14 insertions(+)
Quoted 4 lines
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