]> git.proxmox.com Git - mirror_edk2.git/blob - CryptoPkg/Library/BaseCryptLib/Cipher/CryptAesNull.c
CryptoPkg/BaseCryptLib: Enabled CryptSha512 for Smm/Runtime drivers
[mirror_edk2.git] / CryptoPkg / Library / BaseCryptLib / Cipher / CryptAesNull.c
1 /** @file
2 AES Wrapper Implementation which does not provide real capabilities.
3
4 Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #include "InternalCryptLib.h"
10
11 /**
12 Retrieves the size, in bytes, of the context buffer required for AES operations.
13
14 Return zero to indicate this interface is not supported.
15
16 @retval 0 This interface is not supported.
17
18 **/
19 UINTN
20 EFIAPI
21 AesGetContextSize (
22 VOID
23 )
24 {
25 ASSERT (FALSE);
26 return 0;
27 }
28
29 /**
30 Initializes user-supplied memory as AES context for subsequent use.
31
32 Return FALSE to indicate this interface is not supported.
33
34 @param[out] AesContext Pointer to AES context being initialized.
35 @param[in] Key Pointer to the user-supplied AES key.
36 @param[in] KeyLength Length of AES key in bits.
37
38 @retval FALSE This interface is not supported.
39
40 **/
41 BOOLEAN
42 EFIAPI
43 AesInit (
44 OUT VOID *AesContext,
45 IN CONST UINT8 *Key,
46 IN UINTN KeyLength
47 )
48 {
49 ASSERT (FALSE);
50 return FALSE;
51 }
52
53 /**
54 Performs AES encryption on a data buffer of the specified size in CBC mode.
55
56 Return FALSE to indicate this interface is not supported.
57
58 @param[in] AesContext Pointer to the AES context.
59 @param[in] Input Pointer to the buffer containing the data to be encrypted.
60 @param[in] InputSize Size of the Input buffer in bytes.
61 @param[in] Ivec Pointer to initialization vector.
62 @param[out] Output Pointer to a buffer that receives the AES encryption output.
63
64 @retval FALSE This interface is not supported.
65
66 **/
67 BOOLEAN
68 EFIAPI
69 AesCbcEncrypt (
70 IN VOID *AesContext,
71 IN CONST UINT8 *Input,
72 IN UINTN InputSize,
73 IN CONST UINT8 *Ivec,
74 OUT UINT8 *Output
75 )
76 {
77 ASSERT (FALSE);
78 return FALSE;
79 }
80
81 /**
82 Performs AES decryption on a data buffer of the specified size in CBC mode.
83
84 Return FALSE to indicate this interface is not supported.
85
86 @param[in] AesContext Pointer to the AES context.
87 @param[in] Input Pointer to the buffer containing the data to be encrypted.
88 @param[in] InputSize Size of the Input buffer in bytes.
89 @param[in] Ivec Pointer to initialization vector.
90 @param[out] Output Pointer to a buffer that receives the AES encryption output.
91
92 @retval FALSE This interface is not supported.
93
94 **/
95 BOOLEAN
96 EFIAPI
97 AesCbcDecrypt (
98 IN VOID *AesContext,
99 IN CONST UINT8 *Input,
100 IN UINTN InputSize,
101 IN CONST UINT8 *Ivec,
102 OUT UINT8 *Output
103 )
104 {
105 ASSERT (FALSE);
106 return FALSE;
107 }