summaryrefslogtreecommitdiff
path: root/include/u-boot
diff options
context:
space:
mode:
authorPhilippe Reynes <philippe.reynes@softathome.com>2018-11-14 13:51:01 +0100
committerTom Rini <trini@konsulko.com>2018-12-03 10:44:10 -0500
commit061daa0b61f0fbeb214c566f3adb23da05545320 (patch)
treef16e131f6e8fd1a724fd70d6669c9011f28c23eb /include/u-boot
parent20031567e12bb312bff95b70767f6275e20f0346 (diff)
rsa: add support of padding pss
We add the support of the padding pss for rsa signature. This new padding is often recommended instead of pkcs-1.5. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/u-boot')
-rw-r--r--include/u-boot/rsa.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/u-boot/rsa.h b/include/u-boot/rsa.h
index 16b4c4caee..2d3024d8b7 100644
--- a/include/u-boot/rsa.h
+++ b/include/u-boot/rsa.h
@@ -101,6 +101,12 @@ int rsa_verify(struct image_sign_info *info,
int padding_pkcs_15_verify(struct image_sign_info *info,
uint8_t *msg, int msg_len,
const uint8_t *hash, int hash_len);
+
+#ifdef CONFIG_FIT_ENABLE_RSASSA_PSS_SUPPORT
+int padding_pss_verify(struct image_sign_info *info,
+ uint8_t *msg, int msg_len,
+ const uint8_t *hash, int hash_len);
+#endif /* CONFIG_FIT_ENABLE_RSASSA_PSS_SUPPORT */
#else
static inline int rsa_verify(struct image_sign_info *info,
const struct image_region region[], int region_count,
@@ -115,6 +121,15 @@ static inline int padding_pkcs_15_verify(struct image_sign_info *info,
{
return -ENXIO;
}
+
+#ifdef CONFIG_FIT_ENABLE_RSASSA_PSS_SUPPORT
+static inline int padding_pss_verify(struct image_sign_info *info,
+ uint8_t *msg, int msg_len,
+ const uint8_t *hash, int hash_len)
+{
+ return -ENXIO;
+}
+#endif /* CONFIG_FIT_ENABLE_RSASSA_PSS_SUPPORT */
#endif
#define RSA_DEFAULT_PADDING_NAME "pkcs-1.5"