1 /* SPDX-License-Identifier: BSD-3-Clause */
2 /* Copyright(c) 2007-2022 Intel Corporation */
3 /* $FreeBSD$ */
4 /**
5 *******************************************************************************
6 * @file lac_hooks.h
7 *
8 * @defgroup LacHooks Hooks
9 *
10 * @ingroup LacCommon
11 *
12 * Component Init/Shutdown functions. These are:
13 * - an init function which is called during the intialisation sequence,
14 * - a shutdown function which is called by the overall shutdown function,
15 *
16 ******************************************************************************/
17
18 #ifndef LAC_HOOKS_H
19 #define LAC_HOOKS_H
20
21 /*
22 ********************************************************************************
23 * Include public/global header files
24 ********************************************************************************
25 */
26
27 #include "cpa.h"
28
29 /*
30 ********************************************************************************
31 * Include private header files
32 ********************************************************************************
33 */
34
35 /******************************************************************************/
36
37 /**
38 *******************************************************************************
39 * @ingroup LacHooks
40 * This function initialises the Large Number (ModExp and ModInv) module
41 *
42 * @description
43 * This function clears the Large Number statistics
44 *
45 * @param[in] instanceHandle
46 *
47 ******************************************************************************/
48 CpaStatus LacLn_Init(CpaInstanceHandle instanceHandle);
49
50 /**
51 *******************************************************************************
52 * @ingroup LacHooks
53 * This function frees statistics array for Large Number module
54 *
55 * @description
56 * This function frees statistics array for Large Number module
57 *
58 * @param[in] instanceHandle
59 *
60 ******************************************************************************/
61 void LacLn_StatsFree(CpaInstanceHandle instanceHandle);
62
63 /**
64 *******************************************************************************
65 * @ingroup LacHooks
66 * This function initialises the Prime module
67 *
68 * @description
69 * This function clears the Prime statistics
70 *
71 * @param[in] instanceHandle
72 *
73 ******************************************************************************/
74 CpaStatus LacPrime_Init(CpaInstanceHandle instanceHandle);
75
76 /**
77 *******************************************************************************
78 * @ingroup LacHooks
79 * This function frees the Prime module statistics array
80 *
81 * @description
82 * This function frees the Prime module statistics array
83 *
84 * @param[in] instanceHandle
85 *
86 ******************************************************************************/
87 void LacPrime_StatsFree(CpaInstanceHandle instanceHandle);
88
89 /**
90 *******************************************************************************
91 * @ingroup LacHooks
92 * This function initialises the DSA module
93 *
94 * @param[in] instanceHandle
95 *
96 * @description
97 * This function clears the DSA statistics
98 *
99 ******************************************************************************/
100 CpaStatus LacDsa_Init(CpaInstanceHandle instanceHandle);
101
102 /**
103 *******************************************************************************
104 * @ingroup LacHooks
105 * This function frees the DSA module statistics array
106 *
107 * @param[in] instanceHandle
108 *
109 * @description
110 * This function frees the DSA statistics array
111 *
112 ******************************************************************************/
113 void LacDsa_StatsFree(CpaInstanceHandle instanceHandle);
114
115 /**
116 *******************************************************************************
117 * @ingroup LacHooks
118 * This function initialises the Diffie Hellmann module
119 *
120 * @description
121 * This function initialises the Diffie Hellman statistics
122 *
123 * @param[in] instanceHandle
124 *
125 ******************************************************************************/
126 CpaStatus LacDh_Init(CpaInstanceHandle instanceHandle);
127
128 /**
129 *******************************************************************************
130 * @ingroup LacHooks
131 * This function frees the Diffie Hellmann module statistics
132 *
133 * @description
134 * This function frees the Diffie Hellmann module statistics
135 *
136 * @param[in] instanceHandle
137 *
138 ******************************************************************************/
139 void LacDh_StatsFree(CpaInstanceHandle instanceHandle);
140
141 /**
142 ******************************************************************************
143 * @ingroup LacSymKey
144 * This function registers the callback handlers to SSL/TLS and MGF,
145 * allocates resources that are needed for the component and clears
146 * the stats.
147 *
148 * @param[in] instanceHandle
149 *
150 * @retval CPA_STATUS_SUCCESS Status Success
151 * @retval CPA_STATUS_FAIL General failure
152 * @retval CPA_STATUS_RESOURCE Resource allocation failure
153 *
154 *****************************************************************************/
155 CpaStatus LacSymKey_Init(CpaInstanceHandle instanceHandle);
156
157 /**
158 ******************************************************************************
159 * @ingroup LacSymKey
160 * This function frees up resources obtained by the key gen component
161 * and clears the stats
162 *
163 * @param[in] instanceHandle
164 *
165 * @retval CPA_STATUS_SUCCESS Status Success
166 *
167 *****************************************************************************/
168 CpaStatus LacSymKey_Shutdown(CpaInstanceHandle instanceHandle);
169
170 /**
171 *******************************************************************************
172 * @ingroup LacHooks
173 * This function initialises the RSA module
174 *
175 * @description
176 * This function clears the RSA statistics
177 *
178 * @param[in] instanceHandle
179 *
180 ******************************************************************************/
181 CpaStatus LacRsa_Init(CpaInstanceHandle instanceHandle);
182
183 /**
184 *******************************************************************************
185 * @ingroup LacHooks
186 * This function frees the RSA module statistics
187 *
188 * @description
189 * This function frees the RSA module statistics
190 *
191 * @param[in] instanceHandle
192 *
193 ******************************************************************************/
194 void LacRsa_StatsFree(CpaInstanceHandle instanceHandle);
195
196 /**
197 *******************************************************************************
198 * @ingroup LacHooks
199 * This function initialises the EC module
200 *
201 * @description
202 * This function clears the EC statistics
203 *
204 * @param[in] instanceHandle
205 *
206 ******************************************************************************/
207 CpaStatus LacEc_Init(CpaInstanceHandle instanceHandle);
208
209 /**
210 *******************************************************************************
211 * @ingroup LacHooks
212 * This function frees the EC module stats array
213 *
214 * @description
215 * This function frees the EC module stats array
216 *
217 * @param[in] instanceHandle
218 *
219 ******************************************************************************/
220 void LacEc_StatsFree(CpaInstanceHandle instanceHandle);
221
222 /**
223 *******************************************************************************
224 * @ingroup LacSymNrbg
225 * Initialise the NRBG module
226 *
227 * @description
228 * This function registers NRBG callback handlers.
229 *
230 *
231 *****************************************************************************/
232 void LacSymNrbg_Init(void);
233
234 #endif /* LAC_HOOKS_H */
Cache object: ea49adc699f79f0d8d4647602db50db5
|