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