]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/rsa.h
fdt: Update functions which write to an FDT to return -ENOSPC
[karo-tx-uboot.git] / include / rsa.h
index e9ae870622c97bee4b02109bdf9a8ddca21ad34d..325751ab7e1896c548e2c229708ad1a04670c2f5 100644 (file)
@@ -60,7 +60,8 @@ 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, -ve on error
+ * @return: 0, on success, -ENOSPC if the keydest FDT blob ran out of space,
+               other -ve value on error
 */
 int rsa_add_verify_data(struct image_sign_info *info, void *keydest);
 #else
@@ -103,4 +104,14 @@ static inline int rsa_verify(struct image_sign_info *info,
 }
 #endif
 
+#define RSA2048_BYTES  (2048 / 8)
+#define RSA4096_BYTES  (4096 / 8)
+
+/* This is the minimum/maximum key size we support, in bits */
+#define RSA_MIN_KEY_BITS       2048
+#define RSA_MAX_KEY_BITS       4096
+
+/* This is the maximum signature length that we support, in bits */
+#define RSA_MAX_SIG_BITS       4096
+
 #endif