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

Side by Side Diff: src/platform/vboot_reference/include/rsa.h

Issue 661353: Vboot Reference: Refactor Code. (Closed)
Patch Set: Review Fixes. Created 10 years, 9 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 unified diff | Download patch
OLDNEW
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 5
6 #ifndef VBOOT_REFERENCE_RSA_H_ 6 #ifndef VBOOT_REFERENCE_RSA_H_
7 #define VBOOT_REFERENCE_RSA_H_ 7 #define VBOOT_REFERENCE_RSA_H_
8 8
9 #include <inttypes.h> 9 #include <inttypes.h>
10 10
(...skipping 10 matching lines...) Expand all
21 typedef struct RSAPublicKey { 21 typedef struct RSAPublicKey {
22 int len; /* Length of n[] in number of uint32_t */ 22 int len; /* Length of n[] in number of uint32_t */
23 uint32_t n0inv; /* -1 / n[0] mod 2^32 */ 23 uint32_t n0inv; /* -1 / n[0] mod 2^32 */
24 uint32_t* n; /* modulus as little endian array */ 24 uint32_t* n; /* modulus as little endian array */
25 uint32_t* rr; /* R^2 as little endian array */ 25 uint32_t* rr; /* R^2 as little endian array */
26 } RSAPublicKey; 26 } RSAPublicKey;
27 27
28 /* Verify a RSA PKCS1.5 signature [sig] of [sig_type] and length [sig_len] 28 /* Verify a RSA PKCS1.5 signature [sig] of [sig_type] and length [sig_len]
29 * against an expected [hash] using [key]. Returns 0 on failure, 1 on success. 29 * against an expected [hash] using [key]. Returns 0 on failure, 1 on success.
30 */ 30 */
31 int RSA_verify(const RSAPublicKey *key, 31 int RSAVerify(const RSAPublicKey *key,
32 const uint8_t* sig, 32 const uint8_t* sig,
33 const int sig_len, 33 const int sig_len,
34 const uint8_t sig_type, 34 const uint8_t sig_type,
35 const uint8_t* hash); 35 const uint8_t* hash);
36 36
37 #endif /* VBOOT_REFERENCE_RSA_H_ */ 37 #endif /* VBOOT_REFERENCE_RSA_H_ */
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/include/kernel_image.h ('k') | src/platform/vboot_reference/include/signature_digest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698