summaryrefslogtreecommitdiff
path: root/firmware/lib/include/vboot_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/lib/include/vboot_common.h')
-rw-r--r--firmware/lib/include/vboot_common.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/firmware/lib/include/vboot_common.h b/firmware/lib/include/vboot_common.h
index 32031068..7032def4 100644
--- a/firmware/lib/include/vboot_common.h
+++ b/firmware/lib/include/vboot_common.h
@@ -81,10 +81,14 @@ int VerifyData(const uint8_t* data, uint64_t size, const VbSignature* sig,
/* Verifies a secure hash digest from DigestBuf() or DigestFinal(),
- * using [key]. */
+ * using [key]. Returns 0 on success. */
int VerifyDigest(const uint8_t* digest, const VbSignature *sig,
const RSAPublicKey* key);
+/* Uses [key] algorithm to hash [data], then compares that to the expected
+ * [hash]. Returns 0 if they're equal, non-zero if error. */
+int EqualData(const uint8_t* data, uint64_t size, const VbSignature *hash,
+ const RSAPublicKey* key);
/* Checks the sanity of a key block of size [size] bytes, using public
* key [key]. If hash_only is non-zero, uses only the block checksum
@@ -94,6 +98,14 @@ int KeyBlockVerify(const VbKeyBlockHeader* block, uint64_t size,
const VbPublicKey *key, int hash_only);
+/* Checks the sanity of an EC preamble of size [size] bytes,
+ * using public key [key].
+ *
+ * Returns VBOOT_SUCCESS if successful. */
+int VerifyECPreamble(const VbECPreambleHeader* preamble,
+ uint64_t size, const RSAPublicKey* key);
+
+
/* Checks the sanity of a firmware preamble of size [size] bytes,
* using public key [key].
*