]> git.proxmox.com Git - mirror_edk2.git/blame - CryptoPkg/Library/BaseCryptLib/Cipher/CryptAesNull.c
CryptoPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Cipher / CryptAesNull.c
CommitLineData
532616bb 1/** @file\r
630f67dd
LG
2 AES Wrapper Implementation which does not provide real capabilities.\r
3\r
4Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
2009f6b4 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
532616bb 6\r
7**/\r
8\r
9#include "InternalCryptLib.h"\r
10\r
11/**\r
12 Retrieves the size, in bytes, of the context buffer required for AES operations.\r
13\r
14 Return zero to indicate this interface is not supported.\r
15\r
16 @retval 0 This interface is not supported.\r
17\r
18**/\r
19UINTN\r
20EFIAPI\r
21AesGetContextSize (\r
22 VOID\r
23 )\r
24{\r
25 ASSERT (FALSE);\r
26 return 0;\r
27}\r
28\r
29/**\r
30 Initializes user-supplied memory as AES context for subsequent use.\r
31\r
32 Return FALSE to indicate this interface is not supported.\r
33\r
34 @param[out] AesContext Pointer to AES context being initialized.\r
35 @param[in] Key Pointer to the user-supplied AES key.\r
36 @param[in] KeyLength Length of AES key in bits.\r
37\r
38 @retval FALSE This interface is not supported.\r
39\r
40**/\r
41BOOLEAN\r
42EFIAPI\r
43AesInit (\r
44 OUT VOID *AesContext,\r
45 IN CONST UINT8 *Key,\r
46 IN UINTN KeyLength\r
47 )\r
48{\r
49 ASSERT (FALSE);\r
50 return FALSE;\r
51}\r
52\r
53/**\r
54 Performs AES encryption on a data buffer of the specified size in ECB mode.\r
55\r
56 Return FALSE to indicate this interface is not supported.\r
630f67dd 57\r
532616bb 58 @param[in] AesContext Pointer to the AES context.\r
59 @param[in] Input Pointer to the buffer containing the data to be encrypted.\r
60 @param[in] InputSize Size of the Input buffer in bytes.\r
61 @param[out] Output Pointer to a buffer that receives the AES encryption output.\r
630f67dd 62\r
532616bb 63 @retval FALSE This interface is not supported.\r
64\r
65**/\r
66BOOLEAN\r
67EFIAPI\r
68AesEcbEncrypt (\r
69 IN VOID *AesContext,\r
70 IN CONST UINT8 *Input,\r
71 IN UINTN InputSize,\r
72 OUT UINT8 *Output\r
73 )\r
74{\r
75 ASSERT (FALSE);\r
76 return FALSE;\r
77}\r
78\r
79/**\r
80 Performs AES decryption on a data buffer of the specified size in ECB mode.\r
81\r
82 Return FALSE to indicate this interface is not supported.\r
83\r
84 @param[in] AesContext Pointer to the AES context.\r
85 @param[in] Input Pointer to the buffer containing the data to be decrypted.\r
86 @param[in] InputSize Size of the Input buffer in bytes.\r
87 @param[out] Output Pointer to a buffer that receives the AES decryption output.\r
88\r
89 @retval FALSE This interface is not supported.\r
90\r
91**/\r
92BOOLEAN\r
93EFIAPI\r
94AesEcbDecrypt (\r
95 IN VOID *AesContext,\r
96 IN CONST UINT8 *Input,\r
97 IN UINTN InputSize,\r
98 OUT UINT8 *Output\r
99 )\r
100{\r
101 ASSERT (FALSE);\r
102 return FALSE;\r
103}\r
104\r
105/**\r
106 Performs AES encryption on a data buffer of the specified size in CBC mode.\r
107\r
108 Return FALSE to indicate this interface is not supported.\r
109\r
110 @param[in] AesContext Pointer to the AES context.\r
111 @param[in] Input Pointer to the buffer containing the data to be encrypted.\r
112 @param[in] InputSize Size of the Input buffer in bytes.\r
113 @param[in] Ivec Pointer to initialization vector.\r
114 @param[out] Output Pointer to a buffer that receives the AES encryption output.\r
115\r
116 @retval FALSE This interface is not supported.\r
117\r
118**/\r
119BOOLEAN\r
120EFIAPI\r
121AesCbcEncrypt (\r
122 IN VOID *AesContext,\r
123 IN CONST UINT8 *Input,\r
124 IN UINTN InputSize,\r
125 IN CONST UINT8 *Ivec,\r
126 OUT UINT8 *Output\r
127 )\r
128{\r
129 ASSERT (FALSE);\r
130 return FALSE;\r
131}\r
132\r
133/**\r
134 Performs AES decryption on a data buffer of the specified size in CBC mode.\r
135\r
136 Return FALSE to indicate this interface is not supported.\r
137\r
138 @param[in] AesContext Pointer to the AES context.\r
139 @param[in] Input Pointer to the buffer containing the data to be encrypted.\r
140 @param[in] InputSize Size of the Input buffer in bytes.\r
141 @param[in] Ivec Pointer to initialization vector.\r
142 @param[out] Output Pointer to a buffer that receives the AES encryption output.\r
143\r
144 @retval FALSE This interface is not supported.\r
145\r
146**/\r
147BOOLEAN\r
148EFIAPI\r
149AesCbcDecrypt (\r
150 IN VOID *AesContext,\r
151 IN CONST UINT8 *Input,\r
152 IN UINTN InputSize,\r
153 IN CONST UINT8 *Ivec,\r
154 OUT UINT8 *Output\r
155 )\r
630f67dd 156{\r
532616bb 157 ASSERT (FALSE);\r
158 return FALSE;\r
159}\r