]> git.proxmox.com Git - mirror_edk2.git/blame - CryptoPkg/Library/BaseCryptLibNull/Cipher/CryptAesNull.c
CryptoPkg/BaseCryptLib: Retire Aes Ecb mode algorithm
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLibNull / Cipher / CryptAesNull.c
CommitLineData
d95de082
SB
1/** @file\r
2 AES Wrapper Implementation which does not provide real capabilities.\r
3\r
4Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>\r
5SPDX-License-Identifier: BSD-2-Clause-Patent\r
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
d95de082
SB
53/**\r
54 Performs AES encryption on a data buffer of the specified size in CBC mode.\r
55\r
56 Return FALSE to indicate this interface is not supported.\r
57\r
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[in] Ivec Pointer to initialization vector.\r
62 @param[out] Output Pointer to a buffer that receives the AES encryption output.\r
63\r
64 @retval FALSE This interface is not supported.\r
65\r
66**/\r
67BOOLEAN\r
68EFIAPI\r
69AesCbcEncrypt (\r
70 IN VOID *AesContext,\r
71 IN CONST UINT8 *Input,\r
72 IN UINTN InputSize,\r
73 IN CONST UINT8 *Ivec,\r
74 OUT UINT8 *Output\r
75 )\r
76{\r
77 ASSERT (FALSE);\r
78 return FALSE;\r
79}\r
80\r
81/**\r
82 Performs AES decryption on a data buffer of the specified size in CBC mode.\r
83\r
84 Return FALSE to indicate this interface is not supported.\r
85\r
86 @param[in] AesContext Pointer to the AES context.\r
87 @param[in] Input Pointer to the buffer containing the data to be encrypted.\r
88 @param[in] InputSize Size of the Input buffer in bytes.\r
89 @param[in] Ivec Pointer to initialization vector.\r
90 @param[out] Output Pointer to a buffer that receives the AES encryption output.\r
91\r
92 @retval FALSE This interface is not supported.\r
93\r
94**/\r
95BOOLEAN\r
96EFIAPI\r
97AesCbcDecrypt (\r
98 IN VOID *AesContext,\r
99 IN CONST UINT8 *Input,\r
100 IN UINTN InputSize,\r
101 IN CONST UINT8 *Ivec,\r
102 OUT UINT8 *Output\r
103 )\r
104{\r
105 ASSERT (FALSE);\r
106 return FALSE;\r
107}\r