OLD | NEW |
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
4 * | 4 * |
5 * Some utility functions for use with RSA signature verification. | 5 * Some utility functions for use with RSA signature verification. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef VBOOT_REFERENCE_RSA_UTILITY_H_ | 8 #ifndef VBOOT_REFERENCE_RSA_UTILITY_H_ |
9 #define VBOOT_REFERENCE_RSA_UTILITY_H_ | 9 #define VBOOT_REFERENCE_RSA_UTILITY_H_ |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 * Returns 1 on verification success, 0 on verification failure or invalid | 37 * Returns 1 on verification success, 0 on verification failure or invalid |
38 * arguments. | 38 * arguments. |
39 * | 39 * |
40 * Note: This function is for use in the firmware and assumes all pointers point | 40 * Note: This function is for use in the firmware and assumes all pointers point |
41 * to areas in the memory of the right size. | 41 * to areas in the memory of the right size. |
42 * | 42 * |
43 */ | 43 */ |
44 int RSAVerifyBinary_f(const uint8_t* key_blob, | 44 int RSAVerifyBinary_f(const uint8_t* key_blob, |
45 const RSAPublicKey* key, | 45 const RSAPublicKey* key, |
46 const uint8_t* buf, | 46 const uint8_t* buf, |
47 int len, | 47 uint64_t len, |
48 const uint8_t* sig, | 48 const uint8_t* sig, |
49 int algorithm); | 49 int algorithm); |
50 | 50 |
51 /* Version of RSAVerifyBinary_f() where instead of the raw binary blob | 51 /* Version of RSAVerifyBinary_f() where instead of the raw binary blob |
52 * of data, its digest is passed as the argument. */ | 52 * of data, its digest is passed as the argument. */ |
53 int RSAVerifyBinaryWithDigest_f(const uint8_t* key_blob, | 53 int RSAVerifyBinaryWithDigest_f(const uint8_t* key_blob, |
54 const RSAPublicKey* key, | 54 const RSAPublicKey* key, |
55 const uint8_t* digest, | 55 const uint8_t* digest, |
56 const uint8_t* sig, | 56 const uint8_t* sig, |
57 int algorithm); | 57 int algorithm); |
58 #endif /* VBOOT_REFERENCE_RSA_UTILITY_H_ */ | 58 #endif /* VBOOT_REFERENCE_RSA_UTILITY_H_ */ |
OLD | NEW |