CryptoPkg/TlsLib: rewrite TlsSetCipherList()
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLibRuntimeCryptProtocol / Cipher / CryptAesNull.c
CommitLineData
532616bb 1/** @file\r
2 AES Wrapper Implementation which does not provide real capabilities. \r
3 \r
4Copyright (c) 2012, Intel Corporation. All rights reserved.<BR>\r
5This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#include "InternalCryptLib.h"\r
16\r
17/**\r
18 Retrieves the size, in bytes, of the context buffer required for AES operations.\r
19\r
20 Return zero to indicate this interface is not supported.\r
21\r
22 @retval 0 This interface is not supported.\r
23\r
24**/\r
25UINTN\r
26EFIAPI\r
27AesGetContextSize (\r
28 VOID\r
29 )\r
30{\r
31 ASSERT (FALSE);\r
32 return 0;\r
33}\r
34\r
35/**\r
36 Initializes user-supplied memory as AES context for subsequent use.\r
37\r
38 Return FALSE to indicate this interface is not supported.\r
39\r
40 @param[out] AesContext Pointer to AES context being initialized.\r
41 @param[in] Key Pointer to the user-supplied AES key.\r
42 @param[in] KeyLength Length of AES key in bits.\r
43\r
44 @retval FALSE This interface is not supported.\r
45\r
46**/\r
47BOOLEAN\r
48EFIAPI\r
49AesInit (\r
50 OUT VOID *AesContext,\r
51 IN CONST UINT8 *Key,\r
52 IN UINTN KeyLength\r
53 )\r
54{\r
55 ASSERT (FALSE);\r
56 return FALSE;\r
57}\r
58\r
59/**\r
60 Performs AES encryption on a data buffer of the specified size in ECB mode.\r
61\r
62 Return FALSE to indicate this interface is not supported.\r
63 \r
64 @param[in] AesContext Pointer to the AES context.\r
65 @param[in] Input Pointer to the buffer containing the data to be encrypted.\r
66 @param[in] InputSize Size of the Input buffer in bytes.\r
67 @param[out] Output Pointer to a buffer that receives the AES encryption output.\r
68 \r
69 @retval FALSE This interface is not supported.\r
70\r
71**/\r
72BOOLEAN\r
73EFIAPI\r
74AesEcbEncrypt (\r
75 IN VOID *AesContext,\r
76 IN CONST UINT8 *Input,\r
77 IN UINTN InputSize,\r
78 OUT UINT8 *Output\r
79 )\r
80{\r
81 ASSERT (FALSE);\r
82 return FALSE;\r
83}\r
84\r
85/**\r
86 Performs AES decryption on a data buffer of the specified size in ECB mode.\r
87\r
88 Return FALSE to indicate this interface is not supported.\r
89\r
90 @param[in] AesContext Pointer to the AES context.\r
91 @param[in] Input Pointer to the buffer containing the data to be decrypted.\r
92 @param[in] InputSize Size of the Input buffer in bytes.\r
93 @param[out] Output Pointer to a buffer that receives the AES decryption output.\r
94\r
95 @retval FALSE This interface is not supported.\r
96\r
97**/\r
98BOOLEAN\r
99EFIAPI\r
100AesEcbDecrypt (\r
101 IN VOID *AesContext,\r
102 IN CONST UINT8 *Input,\r
103 IN UINTN InputSize,\r
104 OUT UINT8 *Output\r
105 )\r
106{\r
107 ASSERT (FALSE);\r
108 return FALSE;\r
109}\r
110\r
111/**\r
112 Performs AES encryption on a data buffer of the specified size in CBC mode.\r
113\r
114 Return FALSE to indicate this interface is not supported.\r
115\r
116 @param[in] AesContext Pointer to the AES context.\r
117 @param[in] Input Pointer to the buffer containing the data to be encrypted.\r
118 @param[in] InputSize Size of the Input buffer in bytes.\r
119 @param[in] Ivec Pointer to initialization vector.\r
120 @param[out] Output Pointer to a buffer that receives the AES encryption output.\r
121\r
122 @retval FALSE This interface is not supported.\r
123\r
124**/\r
125BOOLEAN\r
126EFIAPI\r
127AesCbcEncrypt (\r
128 IN VOID *AesContext,\r
129 IN CONST UINT8 *Input,\r
130 IN UINTN InputSize,\r
131 IN CONST UINT8 *Ivec,\r
132 OUT UINT8 *Output\r
133 )\r
134{\r
135 ASSERT (FALSE);\r
136 return FALSE;\r
137}\r
138\r
139/**\r
140 Performs AES decryption on a data buffer of the specified size in CBC mode.\r
141\r
142 Return FALSE to indicate this interface is not supported.\r
143\r
144 @param[in] AesContext Pointer to the AES context.\r
145 @param[in] Input Pointer to the buffer containing the data to be encrypted.\r
146 @param[in] InputSize Size of the Input buffer in bytes.\r
147 @param[in] Ivec Pointer to initialization vector.\r
148 @param[out] Output Pointer to a buffer that receives the AES encryption output.\r
149\r
150 @retval FALSE This interface is not supported.\r
151\r
152**/\r
153BOOLEAN\r
154EFIAPI\r
155AesCbcDecrypt (\r
156 IN VOID *AesContext,\r
157 IN CONST UINT8 *Input,\r
158 IN UINTN InputSize,\r
159 IN CONST UINT8 *Ivec,\r
160 OUT UINT8 *Output\r
161 )\r
162{ \r
163 ASSERT (FALSE);\r
164 return FALSE;\r
165}\r