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

Side by Side Diff: board/tegra2/common/crypto/crypto.h

Issue 4841001: Tegra2: implement Warmboot code and lp0_vec (Closed) Base URL: http://git.chromium.org/git/u-boot-next.git@chromeos-v2010.09
Patch Set: Created 10 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(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 */
10
11 /*
12 * crypto.h - Definitions for the crypto support.
13 */
14
15 /*
16 * TODO / Notes
17 * - Add doxygen commentary
18 */
19
20 #ifndef INCLUDED_CRYPTO_H
21 #define INCLUDED_CRYPTO_H
22
23 #if defined(__cplusplus)
24 extern "C"
25 {
26 #endif
27
28 /* Lengths, in bytes */
29 #define KEY_LENGTH (128/8)
30
31 #define ICEIL(a, b) (((a) + (b) - 1)/(b))
32
33 #define AES_CMAC_CONST_RB 0x87 // from RFC 4493, Figure 2.2
34
35 typedef enum
36 {
37 security_mode_None = 0,
38 security_mode_Plaintext,
39 security_mode_Checksum,
40 security_mode_Encrypted,
41
42 security_mode_Max,
43 security_mode_Force32 = 0x7fffffff
44 } security_mode;
45
46 /* Function prototypes */
47 NvBootError
48 encrypt_and_sign_block(NvU8 *Key,
49 security_mode Security,
50 NvU8 *block_image,
51 NvU32 block_length,
52 NvU8 *signature); // TODO: was NvBootHash
53
54 #if defined(__cplusplus)
55 }
56 #endif
57
58 #endif /* #ifndef INCLUDED_CRYPTO_H */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698