Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(744)

Unified Diff: src/platform/vboot_reference/include/rsa_utility.h

Issue 575019: Add some convenience/helper functions for RSA. (Closed)
Patch Set: Add comment to size calculation. Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/platform/vboot_reference/include/rsa_utility.h
diff --git a/src/platform/vboot_reference/include/rsa_utility.h b/src/platform/vboot_reference/include/rsa_utility.h
new file mode 100644
index 0000000000000000000000000000000000000000..808d17a825b8dce3cf8c0ac0061c0124012d779f
--- /dev/null
+++ b/src/platform/vboot_reference/include/rsa_utility.h
@@ -0,0 +1,21 @@
+/* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ *
+ * Some utility functions for use with RSA signature verification.
+ */
+
+#ifndef VBOOT_REFERENCE_RSA_UTILITY_H_
+#define VBOOT_REFERENCE_RSA_UTILITY_H_
+
+#include "rsa.h"
+
+/* Returns the size of a pre-processed RSA public key in bytes with algorithm
+ * [algorithm]. */
+int RSAProcessedKeySize(int algorithm);
+
+/* Create a RSAPublic key structure from binary blob [buf] of length
+ * [len]. */
+RSAPublicKey* RSAPublicKeyFromBuf(uint8_t* buf, int len);
+
+#endif /* VBOOT_REFERENCE_RSA_UTILITY_H_ */

Powered by Google App Engine
This is Rietveld 408576698