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