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

Side by Side Diff: src/platform/vboot_reference/tests/verify_data.h

Issue 553023: RSA signature verification and SHA-1/256/512 reference implementation for verified boot. (Closed)
Patch Set: Fixes. 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 * found in the LICENSE file.
4 */
5
6 #ifndef VBOOT_REFERENCE_VERIFY_DATA_H_
7 #define VBOOT_REFERENCE_VERIFY_DATA_H_
8
9 /* Reads a pre-processed key of a [len] bytes from [input_file] and
10 * returns it in a RSAPublicKey structure.
11 * Caller owns the returned key and must free it.
12 */
13 RSAPublicKey* read_RSAkey(char *input_file, int len);
14
15 /* Returns the SHA-1 digest of [input_file].
16 * Caller owns the returned digest and must free it.
17 */
18 uint8_t* SHA1_file(char *input_file);
19
20 /* Returns the SHA-256 digest of [input_file].
21 * Caller owns the returned digest and must free it.
22 */
23 uint8_t* SHA256_file(char *input_file);
24
25 /* Returns the SHA-512 digest of [input_file].
26 * Caller owns the returned digest and must free it.
27 */
28 uint8_t* SHA512_file(char *input_file);
29
30 /* Returns the appropriate digest for the [input_file] based on the
31 * signature [algorithm].
32 * Caller owns the returned digest and must free it.
33 */
34 uint8_t* calculate_digest(char *input_file, int algorithm);
35
36 /* Return a signature of [len] bytes read from [input_file].
37 * Caller owns the returned signature and must free it.
38 */
39 uint8_t* read_signature(char *input_file, int len);
40
41 #endif /* VBOOT_REFERENCE_VERIFY_DATA_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698