summaryrefslogtreecommitdiff
path: root/lib/avb/libavb/avb_rsa.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/avb/libavb/avb_rsa.h')
-rw-r--r--lib/avb/libavb/avb_rsa.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/avb/libavb/avb_rsa.h b/lib/avb/libavb/avb_rsa.h
index c2dcf47..e82102b 100644
--- a/lib/avb/libavb/avb_rsa.h
+++ b/lib/avb/libavb/avb_rsa.h
@@ -42,9 +42,17 @@
extern "C" {
#endif
-#include "avb_crypto.h"
#include "avb_sysdeps.h"
+/* Size of a RSA-2048 signature. */
+#define AVB_RSA2048_NUM_BYTES 256
+
+/* Size of a RSA-4096 signature. */
+#define AVB_RSA4096_NUM_BYTES 512
+
+/* Size of a RSA-8192 signature. */
+#define AVB_RSA8192_NUM_BYTES 1024
+
/* Using the key given by |key|, verify a RSA signature |sig| of
* length |sig_num_bytes| against an expected |hash| of length
* |hash_num_bytes|. The padding to expect must be passed in using
@@ -57,12 +65,9 @@ extern "C" {
*
* Returns false if verification fails, true otherwise.
*/
-bool avb_rsa_verify(const uint8_t* key,
- size_t key_num_bytes,
- const uint8_t* sig,
- size_t sig_num_bytes,
- const uint8_t* hash,
- size_t hash_num_bytes,
+bool avb_rsa_verify(const uint8_t* key, size_t key_num_bytes,
+ const uint8_t* sig, size_t sig_num_bytes,
+ const uint8_t* hash, size_t hash_num_bytes,
const uint8_t* padding,
size_t padding_num_bytes) AVB_ATTR_WARN_UNUSED_RESULT;