OLD | NEW |
---|---|
(Empty) | |
1 /** | |
2 * Copyright (c) 2007 NVIDIA Corporation. All rights reserved. | |
3 * | |
4 * NVIDIA Corporation and its licensors retain all intellectual property | |
5 * and proprietary rights in and to this software, related documentation | |
6 * and any modifications thereto. Any use, reproduction, disclosure or | |
7 * distribution of this software and related documentation without an express | |
8 * license agreement from NVIDIA Corporation is strictly prohibited. | |
9 */ | |
robotboy
2010/11/19 22:48:55
This needs to have a GPL v2 header. Thanks.
| |
10 | |
11 /* | |
12 * crypto.h - Definitions for the crypto support. | |
13 */ | |
14 | |
15 #ifndef INCLUDED_CRYPTO_H | |
16 #define INCLUDED_CRYPTO_H | |
17 | |
18 #if defined(__cplusplus) | |
19 extern "C" | |
20 { | |
21 #endif | |
22 | |
23 /* Lengths, in bytes */ | |
24 #define KEY_LENGTH (128/8) | |
25 | |
26 #define ICEIL(a, b) (((a) + (b) - 1)/(b)) | |
27 | |
28 #define AES_CMAC_CONST_RB 0x87 // from RFC 4493, Figure 2.2 | |
29 | |
30 typedef enum | |
31 { | |
32 security_mode_None = 0, | |
33 security_mode_Plaintext, | |
34 security_mode_Checksum, | |
35 security_mode_Encrypted, | |
36 | |
37 security_mode_Max, | |
38 security_mode_Force32 = 0x7fffffff | |
39 } security_mode; | |
40 | |
41 /* Function prototypes */ | |
42 NvBootError | |
43 encrypt_and_sign_block(NvU8 *Key, | |
44 security_mode Security, | |
45 NvU8 *block_image, | |
46 NvU32 block_length, | |
47 NvU8 *signature); | |
48 | |
49 #if defined(__cplusplus) | |
50 } | |
51 #endif | |
52 | |
53 #endif /* #ifndef INCLUDED_CRYPTO_H */ | |
OLD | NEW |