Merge tag 'next-20220328' of https://source.denx.de/u-boot/custodians/u-boot-video...
[platform/kernel/u-boot.git] / include / u-boot / rsa.h
index 7556aa5..b9634e3 100644 (file)
@@ -61,8 +61,9 @@ int rsa_sign(struct image_sign_info *info,
  *
  * @info:      Specifies key and FIT information
  * @keydest:   Destination FDT blob for public key data
- * @return: 0, on success, -ENOSPC if the keydest FDT blob ran out of space,
-               other -ve value on error
+ * @return: node offset within the FDT blob where the data was written on
+ *     success, -ENOSPC if the keydest FDT blob ran out of space, other -ve
+ *     value on other error
 */
 int rsa_add_verify_data(struct image_sign_info *info, void *keydest);
 
@@ -75,7 +76,7 @@ int rsa_add_verify_data(struct image_sign_info *info, void *keydest);
  * @hash:      Hash according to algorithm specified in @info
  * @sig:       Signature
  * @sig_len:   Number of bytes in signature
- * @return 0 if verified, -ve on error
+ * Return: 0 if verified, -ve on error
  */
 int rsa_verify_hash(struct image_sign_info *info,
                    const uint8_t *hash, uint8_t *sig, uint sig_len);
@@ -90,7 +91,7 @@ int rsa_verify_hash(struct image_sign_info *info,
  * @data_len:  Data length
  * @sig:       Signature
  * @sig_len:   Number of bytes in signature
- * @return 0 if verified, -ve on error
+ * Return: 0 if verified, -ve on error
  */
 int rsa_verify(struct image_sign_info *info,
               const struct image_region region[], int region_count,
@@ -110,6 +111,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 */