• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*******************************************************************************
2 * Copyright 2002-2018 Intel Corporation
3 * All Rights Reserved.
4 *
5 * If this  software was obtained  under the  Intel Simplified  Software License,
6 * the following terms apply:
7 *
8 * The source code,  information  and material  ("Material") contained  herein is
9 * owned by Intel Corporation or its  suppliers or licensors,  and  title to such
10 * Material remains with Intel  Corporation or its  suppliers or  licensors.  The
11 * Material  contains  proprietary  information  of  Intel or  its suppliers  and
12 * licensors.  The Material is protected by  worldwide copyright  laws and treaty
13 * provisions.  No part  of  the  Material   may  be  used,  copied,  reproduced,
14 * modified, published,  uploaded, posted, transmitted,  distributed or disclosed
15 * in any way without Intel's prior express written permission.  No license under
16 * any patent,  copyright or other  intellectual property rights  in the Material
17 * is granted to  or  conferred  upon  you,  either   expressly,  by implication,
18 * inducement,  estoppel  or  otherwise.  Any  license   under such  intellectual
19 * property rights must be express and approved by Intel in writing.
20 *
21 * Unless otherwise agreed by Intel in writing,  you may not remove or alter this
22 * notice or  any  other  notice   embedded  in  Materials  by  Intel  or Intel's
23 * suppliers or licensors in any way.
24 *
25 *
26 * If this  software  was obtained  under the  Apache License,  Version  2.0 (the
27 * "License"), the following terms apply:
28 *
29 * You may  not use this  file except  in compliance  with  the License.  You may
30 * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
31 *
32 *
33 * Unless  required  by   applicable  law  or  agreed  to  in  writing,  software
34 * distributed under the License  is distributed  on an  "AS IS"  BASIS,  WITHOUT
35 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36 *
37 * See the   License  for the   specific  language   governing   permissions  and
38 * limitations under the License.
39 *******************************************************************************/
40 
41 /*
42 //              Intel(R) Integrated Performance Primitives (Intel(R) IPP)
43 //              Cryptographic Primitives (ippCP)
44 //
45 //
46 */
47 
48 #if !defined( IPPCP_H__ ) || defined( _OWN_BLDPCS )
49 #define IPPCP_H__
50 
51 
52 #ifndef IPPCPDEFS_H__
53   #include "ippcpdefs.h"
54 #endif
55 
56 
57 #ifdef  __cplusplus
58 extern "C" {
59 #endif
60 
61 #if !defined( IPP_NO_DEFAULT_LIB )
62   #if defined( _IPP_SEQUENTIAL_DYNAMIC )
63     #pragma comment( lib, __FILE__ "/../../lib/" INTEL_PLATFORM "ippcp" )
64   #elif defined( _IPP_SEQUENTIAL_STATIC )
65     #pragma comment( lib, __FILE__ "/../../lib/" INTEL_PLATFORM "ippcpmt" )
66   #elif defined( _IPP_PARALLEL_DYNAMIC )
67     #pragma comment( lib, __FILE__ "/../../lib/" INTEL_PLATFORM "threaded/ippcp" )
68   #elif defined( _IPP_PARALLEL_STATIC )
69     #pragma comment( lib, __FILE__ "/../../lib/" INTEL_PLATFORM "threaded/ippcpmt" )
70   #endif
71 #endif
72 
73 
74 /* /////////////////////////////////////////////////////////////////////////////
75 //  Name:       ippcpGetLibVersion
76 //  Purpose:    getting of the library version
77 //  Returns:    the structure of information about version of ippCP library
78 //  Parameters:
79 //
80 //  Notes:      not necessary to release the returned structure
81 */
82 IPPAPI( const IppLibraryVersion*, ippcpGetLibVersion, (void) )
83 
84 
85 /*
86 // =========================================================
87 // Symmetric Ciphers
88 // =========================================================
89 */
90 
91 /* TDES */
92 IPPAPI(IppStatus, ippsDESGetSize,(int *size))
93 IPPAPI(IppStatus, ippsDESInit,(const Ipp8u* pKey, IppsDESSpec* pCtx))
94 
95 IPPAPI(IppStatus, ippsDESPack,(const IppsDESSpec* pCtx, Ipp8u* pBuffer))
96 IPPAPI(IppStatus, ippsDESUnpack,(const Ipp8u* pBuffer, IppsDESSpec* pCtx))
97 
98 IPPAPI(IppStatus, ippsTDESEncryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
99                                       const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3,
100                                       IppsCPPadding padding))
101 IPPAPI(IppStatus, ippsTDESDecryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
102                                       const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3,
103                                       IppsCPPadding padding))
104 
105 IPPAPI(IppStatus, ippsTDESEncryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
106                                       const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3,
107                                       const Ipp8u* pIV,
108                                       IppsCPPadding padding))
109 IPPAPI(IppStatus, ippsTDESDecryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
110                                       const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3,
111                                       const Ipp8u* pIV,
112                                       IppsCPPadding padding))
113 
114 IPPAPI(IppStatus, ippsTDESEncryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int cfbBlkSize,
115                                       const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3,
116                                       const Ipp8u* pIV,
117                                       IppsCPPadding padding))
118 IPPAPI(IppStatus, ippsTDESDecryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int cfbBlkSize,
119                                       const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3,
120                                       const Ipp8u* pIV,
121                                       IppsCPPadding padding))
122 
123 IPPAPI(IppStatus, ippsTDESEncryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize,
124                                      const IppsDESSpec* pCtx1,
125                                      const IppsDESSpec* pCtx2,
126                                      const IppsDESSpec* pCtx3,
127                                      Ipp8u* pIV))
128 IPPAPI(IppStatus, ippsTDESDecryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize,
129                                      const IppsDESSpec* pCtx1,
130                                      const IppsDESSpec* pCtx2,
131                                      const IppsDESSpec* pCtx3,
132                                      Ipp8u* pIV))
133 
134 IPPAPI(IppStatus, ippsTDESEncryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
135                                       const IppsDESSpec* pCtx1,
136                                       const IppsDESSpec* pCtx2,
137                                       const IppsDESSpec* pCtx3,
138                                       Ipp8u* pCtrValue, int ctrNumBitSize))
139 IPPAPI(IppStatus, ippsTDESDecryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
140                                       const IppsDESSpec* pCtx1,
141                                       const IppsDESSpec* pCtx2,
142                                       const IppsDESSpec* pCtx3,
143                                       Ipp8u* pCtrValue, int ctrNumBitSize))
144 
145 /* AES */
146 IPPAPI(IppStatus, ippsAESGetSize,(int *pSize))
147 IPPAPI(IppStatus, ippsAESInit,(const Ipp8u* pKey, int keyLen, IppsAESSpec* pCtx, int ctxSize))
148 IPPAPI(IppStatus, ippsAESSetKey,(const Ipp8u* pKey, int keyLen, IppsAESSpec* pCtx))
149 
150 IPPAPI(IppStatus, ippsAESPack,(const IppsAESSpec* pCtx, Ipp8u* pBuffer, int bufSize))
151 IPPAPI(IppStatus, ippsAESUnpack,(const Ipp8u* pBuffer, IppsAESSpec* pCtx, int ctxSize))
152 
153 IPPAPI(IppStatus, ippsAESEncryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
154                                      const IppsAESSpec* pCtx))
155 IPPAPI(IppStatus, ippsAESDecryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
156                                      const IppsAESSpec* pCtx))
157 
158 IPPAPI(IppStatus, ippsAESEncryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
159                                      const IppsAESSpec* pCtx,
160                                      const Ipp8u* pIV))
161 IPPAPI(IppStatus, ippsAESEncryptCBC_CS1,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
162                                      const IppsAESSpec* pCtx,
163                                      const Ipp8u* pIV))
164 IPPAPI(IppStatus, ippsAESEncryptCBC_CS2,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
165                                      const IppsAESSpec* pCtx,
166                                      const Ipp8u* pIV))
167 IPPAPI(IppStatus, ippsAESEncryptCBC_CS3,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
168                                      const IppsAESSpec* pCtx,
169                                      const Ipp8u* pIV))
170 IPPAPI(IppStatus, ippsAESDecryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
171                                      const IppsAESSpec* pCtx,
172                                      const Ipp8u* pIV))
173 IPPAPI(IppStatus, ippsAESDecryptCBC_CS1,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
174                                      const IppsAESSpec* pCtx,
175                                      const Ipp8u* pIV))
176 IPPAPI(IppStatus, ippsAESDecryptCBC_CS2,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
177                                      const IppsAESSpec* pCtx,
178                                      const Ipp8u* pIV))
179 IPPAPI(IppStatus, ippsAESDecryptCBC_CS3,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
180                                      const IppsAESSpec* pCtx,
181                                      const Ipp8u* pIV))
182 
183 IPPAPI(IppStatus, ippsAESEncryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int cfbBlkSize,
184                                      const IppsAESSpec* pCtx,
185                                      const Ipp8u* pIV))
186 IPPAPI(IppStatus, ippsAESDecryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int cfbBlkSize,
187                                      const IppsAESSpec* pCtx,
188                                      const Ipp8u* pIV))
189 
190 IPPAPI(IppStatus, ippsAESEncryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize,
191                                      const IppsAESSpec* pCtx,
192                                      Ipp8u* pIV))
193 IPPAPI(IppStatus, ippsAESDecryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize,
194                                      const IppsAESSpec* pCtx,
195                                      Ipp8u* pIV))
196 
197 IPPAPI(IppStatus, ippsAESEncryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
198                                      const IppsAESSpec* pCtx,
199                                      Ipp8u* pCtrValue, int ctrNumBitSize))
200 IPPAPI(IppStatus, ippsAESDecryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
201                                      const IppsAESSpec* pCtx,
202                                      Ipp8u* pCtrValue, int ctrNumBitSize))
203 
204 IPPAPI(IppStatus, ippsAESEncryptXTS_Direct,(const Ipp8u* pSrc, Ipp8u* pDst, int encBitsize, int aesBlkNo,
205                                      const Ipp8u* pTweakPT,
206                                      const Ipp8u* pKey, int keyBitsize,
207                                      int dataUnitBitsize))
208 IPPAPI(IppStatus, ippsAESDecryptXTS_Direct,(const Ipp8u* pSrc, Ipp8u* pDst, int encBitsize, int aesBlkNo,
209                                      const Ipp8u* pTweakPT,
210                                      const Ipp8u* pKey, int keyBitsize,
211                                      int dataUnitBitsize))
212 
213 
214 /* SMS4 */
215 IPPAPI(IppStatus, ippsSMS4GetSize,(int *pSize))
216 IPPAPI(IppStatus, ippsSMS4Init,(const Ipp8u* pKey, int keyLen, IppsSMS4Spec* pCtx, int ctxSize))
217 IPPAPI(IppStatus, ippsSMS4SetKey,(const Ipp8u* pKey, int keyLen, IppsSMS4Spec* pCtx))
218 
219 IPPAPI(IppStatus, ippsSMS4EncryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
220                                       const IppsSMS4Spec* pCtx))
221 IPPAPI(IppStatus, ippsSMS4DecryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
222                                       const IppsSMS4Spec* pCtx))
223 
224 IPPAPI(IppStatus, ippsSMS4EncryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
225                                       const IppsSMS4Spec* pCtx,
226                                       const Ipp8u* pIV))
227 IPPAPI(IppStatus, ippsSMS4EncryptCBC_CS1,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
228                                       const IppsSMS4Spec* pCtx,
229                                       const Ipp8u* pIV))
230 IPPAPI(IppStatus, ippsSMS4EncryptCBC_CS2,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
231                                       const IppsSMS4Spec* pCtx,
232                                       const Ipp8u* pIV))
233 IPPAPI(IppStatus, ippsSMS4EncryptCBC_CS3,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
234                                       const IppsSMS4Spec* pCtx,
235                                       const Ipp8u* pIV))
236 IPPAPI(IppStatus, ippsSMS4DecryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
237                                       const IppsSMS4Spec* pCtx,
238                                       const Ipp8u* pIV))
239 IPPAPI(IppStatus, ippsSMS4DecryptCBC_CS1,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
240                                       const IppsSMS4Spec* pCtx,
241                                       const Ipp8u* pIV))
242 IPPAPI(IppStatus, ippsSMS4DecryptCBC_CS2,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
243                                       const IppsSMS4Spec* pCtx,
244                                       const Ipp8u* pIV))
245 IPPAPI(IppStatus, ippsSMS4DecryptCBC_CS3,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
246                                       const IppsSMS4Spec* pCtx,
247                                       const Ipp8u* pIV))
248 
249 IPPAPI(IppStatus, ippsSMS4EncryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int cfbBlkSize,
250                                       const IppsSMS4Spec* pCtx,
251                                       const Ipp8u* pIV))
252 IPPAPI(IppStatus, ippsSMS4DecryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int cfbBlkSize,
253                                       const IppsSMS4Spec* pCtx,
254                                       const Ipp8u* pIV))
255 
256 IPPAPI(IppStatus, ippsSMS4EncryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize,
257                                       const IppsSMS4Spec* pCtx,
258                                       Ipp8u* pIV))
259 IPPAPI(IppStatus, ippsSMS4DecryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize,
260                                       const IppsSMS4Spec* pCtx,
261                                       Ipp8u* pIV))
262 
263 IPPAPI(IppStatus, ippsSMS4EncryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
264                                       const IppsSMS4Spec* pCtx,
265                                       Ipp8u* pCtrValue, int ctrNumBitSize))
266 IPPAPI(IppStatus, ippsSMS4DecryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
267                                       const IppsSMS4Spec* pCtx,
268                                       Ipp8u* pCtrValue, int ctrNumBitSize))
269 
270 /* SMS4-CCM */
271 IPPAPI(IppStatus, ippsSMS4_CCMGetSize,(int* pSize))
272 IPPAPI(IppStatus, ippsSMS4_CCMInit,(const Ipp8u* pKey, int keyLen, IppsSMS4_CCMState* pCtx, int ctxSize))
273 
274 IPPAPI(IppStatus, ippsSMS4_CCMMessageLen,(Ipp64u msgLen, IppsSMS4_CCMState* pCtx))
275 IPPAPI(IppStatus, ippsSMS4_CCMTagLen,(int tagLen, IppsSMS4_CCMState* pCtx))
276 
277 IPPAPI(IppStatus, ippsSMS4_CCMStart,(const Ipp8u* pIV, int ivLen, const Ipp8u* pAD, int adLen, IppsSMS4_CCMState* pCtx))
278 IPPAPI(IppStatus, ippsSMS4_CCMEncrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppsSMS4_CCMState* pCtx))
279 IPPAPI(IppStatus, ippsSMS4_CCMDecrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppsSMS4_CCMState* pCtx))
280 IPPAPI(IppStatus, ippsSMS4_CCMGetTag,(Ipp8u* pTag, int tagLen, const IppsSMS4_CCMState* pCtx))
281 
282 /*
283 // =========================================================
284 // AES based  authentication & confidence Primitives
285 // =========================================================
286 */
287 
288 /* AES-CCM */
289 IPPAPI(IppStatus, ippsAES_CCMGetSize,(int* pSize))
290 IPPAPI(IppStatus, ippsAES_CCMInit,(const Ipp8u* pKey, int keyLen, IppsAES_CCMState* pState, int ctxSize))
291 
292 IPPAPI(IppStatus, ippsAES_CCMMessageLen,(Ipp64u msgLen, IppsAES_CCMState* pState))
293 IPPAPI(IppStatus, ippsAES_CCMTagLen,(int tagLen, IppsAES_CCMState* pState))
294 
295 IPPAPI(IppStatus, ippsAES_CCMStart,(const Ipp8u* pIV, int ivLen, const Ipp8u* pAD, int adLen, IppsAES_CCMState* pState))
296 IPPAPI(IppStatus, ippsAES_CCMEncrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppsAES_CCMState* pState))
297 IPPAPI(IppStatus, ippsAES_CCMDecrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppsAES_CCMState* pState))
298 IPPAPI(IppStatus, ippsAES_CCMGetTag,(Ipp8u* pTag, int tagLen, const IppsAES_CCMState* pState))
299 
300 /* AES-GCM */
301 IPPAPI(IppStatus, ippsAES_GCMGetSize,(int * pSize))
302 IPPAPI(IppStatus, ippsAES_GCMInit,(const Ipp8u* pKey, int keyLen, IppsAES_GCMState* pState, int ctxSize))
303 
304 IPPAPI(IppStatus, ippsAES_GCMReset,(IppsAES_GCMState* pState))
305 IPPAPI(IppStatus, ippsAES_GCMProcessIV,(const Ipp8u* pIV, int ivLen,
306                                         IppsAES_GCMState* pState))
307 IPPAPI(IppStatus, ippsAES_GCMProcessAAD,(const Ipp8u* pAAD, int ivAAD,
308                                         IppsAES_GCMState* pState))
309 IPPAPI(IppStatus, ippsAES_GCMStart,(const Ipp8u* pIV, int ivLen,
310                                     const Ipp8u* pAAD, int aadLen,
311                                     IppsAES_GCMState* pState))
312 IPPAPI(IppStatus, ippsAES_GCMEncrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppsAES_GCMState* pState))
313 IPPAPI(IppStatus, ippsAES_GCMDecrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppsAES_GCMState* pState))
314 IPPAPI(IppStatus, ippsAES_GCMGetTag,(Ipp8u* pDstTag, int tagLen, const IppsAES_GCMState* pState))
315 
316 /* AES-XTS */
317 IPPAPI(IppStatus, ippsAES_XTSGetSize,(int * pSize))
318 IPPAPI(IppStatus, ippsAES_XTSInit,(const Ipp8u* pKey, int keyLen,
319                                    int duBitsize,
320                                    IppsAES_XTSSpec* pCtx,int ctxSize))
321 IPPAPI(IppStatus, ippsAES_XTSEncrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int bitSizeLen,
322                                       const IppsAES_XTSSpec* pCtx,
323                                       const Ipp8u* pTweak,
324                                       int startCipherBlkNo))
325 IPPAPI(IppStatus, ippsAES_XTSDecrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int bitSizeLen,
326                                       const IppsAES_XTSSpec* pCtx,
327                                       const Ipp8u* pTweak,
328                                       int startCipherBlkNo))
329 
330 /* AES-SIV (RFC 5297) */
331 IPPAPI(IppStatus, ippsAES_S2V_CMAC,(const Ipp8u* pKey, int keyLen,
332                                     const Ipp8u* pAD[], const int pADlen[], int numAD,
333                                           Ipp8u* pV))
334 IPPAPI(IppStatus, ippsAES_SIVEncrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
335                                             Ipp8u* pSIV,
336                                       const Ipp8u* pAuthKey, const Ipp8u* pConfKey, int keyLen,
337                                       const Ipp8u* pAD[], const int pADlen[], int numAD))
338 IPPAPI(IppStatus, ippsAES_SIVDecrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
339                                       int* pAuthPassed,
340                                       const Ipp8u* pAuthKey, const Ipp8u* pConfKey, int keyLen,
341                                       const Ipp8u* pAD[], const int pADlen[], int numAD,
342                                       const Ipp8u* pSIV))
343 
344 /* AES-CMAC */
345 IPPAPI(IppStatus, ippsAES_CMACGetSize,(int* pSize))
346 IPPAPI(IppStatus, ippsAES_CMACInit,(const Ipp8u* pKey, int keyLen, IppsAES_CMACState* pState, int ctxSize))
347 
348 IPPAPI(IppStatus, ippsAES_CMACUpdate,(const Ipp8u* pSrc, int len, IppsAES_CMACState* pState))
349 IPPAPI(IppStatus, ippsAES_CMACFinal,(Ipp8u* pMD, int mdLen, IppsAES_CMACState* pState))
350 IPPAPI(IppStatus, ippsAES_CMACGetTag,(Ipp8u* pMD, int mdLen, const IppsAES_CMACState* pState))
351 
352 
353 /*
354 // =========================================================
355 // RC4 Stream Ciphers
356 // =========================================================
357 */
358 IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
359 IPPAPI(IppStatus, ippsARCFourCheckKey, (const Ipp8u *pKey, int keyLen, IppBool* pIsWeak))
360 
361 IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
362 IPPAPI(IppStatus, ippsARCFourGetSize, (int* pSize))
363 IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
364 IPPAPI(IppStatus, ippsARCFourInit, (const Ipp8u *pKey, int keyLen, IppsARCFourState *pCtx))
365 IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
366 IPPAPI(IppStatus, ippsARCFourReset, (IppsARCFourState* pCtx))
367 
368 IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
369 IPPAPI(IppStatus, ippsARCFourPack,(const IppsARCFourState* pCtx, Ipp8u* pBuffer))
370 IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
371 IPPAPI(IppStatus, ippsARCFourUnpack,(const Ipp8u* pBuffer, IppsARCFourState* pCtx))
372 
373 IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
374 IPPAPI(IppStatus, ippsARCFourEncrypt, (const Ipp8u *pSrc, Ipp8u *pDst, int length, IppsARCFourState *pCtx))
375 IPP_DEPRECATED("is deprecated. This function is obsolete and will be removed in one of the future IPP releases") \
376 IPPAPI(IppStatus, ippsARCFourDecrypt, (const Ipp8u *pSrc, Ipp8u *pDst, int length, IppsARCFourState *pCtx))
377 
378 
379 /*
380 // =========================================================
381 // One-Way Hash Functions
382 // =========================================================
383 */
384 
385 /* SHA1 Hash Primitives */
386 IPPAPI(IppStatus, ippsSHA1GetSize,(int* pSize))
387 IPPAPI(IppStatus, ippsSHA1Init,(IppsSHA1State* pState))
388 IPPAPI(IppStatus, ippsSHA1Duplicate,(const IppsSHA1State* pSrcState, IppsSHA1State* pDstState))
389 
390 IPPAPI(IppStatus, ippsSHA1Pack,(const IppsSHA1State* pState, Ipp8u* pBuffer))
391 IPPAPI(IppStatus, ippsSHA1Unpack,(const Ipp8u* pBuffer, IppsSHA1State* pState))
392 
393 IPPAPI(IppStatus, ippsSHA1Update,(const Ipp8u* pSrc, int len, IppsSHA1State* pState))
394 IPPAPI(IppStatus, ippsSHA1GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA1State* pState))
395 IPPAPI(IppStatus, ippsSHA1Final,(Ipp8u* pMD, IppsSHA1State* pState))
396 IPPAPI(IppStatus, ippsSHA1MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
397 
398 /* SHA224 Hash Primitives */
399 IPPAPI(IppStatus, ippsSHA224GetSize,(int* pSize))
400 IPPAPI(IppStatus, ippsSHA224Init,(IppsSHA224State* pState))
401 IPPAPI(IppStatus, ippsSHA224Duplicate,(const IppsSHA224State* pSrcState, IppsSHA224State* pDstState))
402 
403 IPPAPI(IppStatus, ippsSHA224Pack,(const IppsSHA224State* pState, Ipp8u* pBuffer))
404 IPPAPI(IppStatus, ippsSHA224Unpack,(const Ipp8u* pBuffer, IppsSHA224State* pState))
405 
406 IPPAPI(IppStatus, ippsSHA224Update,(const Ipp8u* pSrc, int len, IppsSHA224State* pState))
407 IPPAPI(IppStatus, ippsSHA224GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA224State* pState))
408 IPPAPI(IppStatus, ippsSHA224Final,(Ipp8u* pMD, IppsSHA224State* pState))
409 IPPAPI(IppStatus, ippsSHA224MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
410 
411 /* SHA256 Hash Primitives */
412 IPPAPI(IppStatus, ippsSHA256GetSize,(int* pSize))
413 IPPAPI(IppStatus, ippsSHA256Init,(IppsSHA256State* pState))
414 IPPAPI(IppStatus, ippsSHA256Duplicate,(const IppsSHA256State* pSrcState, IppsSHA256State* pDstState))
415 
416 IPPAPI(IppStatus, ippsSHA256Pack,(const IppsSHA256State* pState, Ipp8u* pBuffer))
417 IPPAPI(IppStatus, ippsSHA256Unpack,(const Ipp8u* pBuffer, IppsSHA256State* pState))
418 
419 IPPAPI(IppStatus, ippsSHA256Update,(const Ipp8u* pSrc, int len, IppsSHA256State* pState))
420 IPPAPI(IppStatus, ippsSHA256GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA256State* pState))
421 IPPAPI(IppStatus, ippsSHA256Final,(Ipp8u* pMD, IppsSHA256State* pState))
422 IPPAPI(IppStatus, ippsSHA256MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
423 
424 /* SHA384 Hash Primitives */
425 IPPAPI(IppStatus, ippsSHA384GetSize,(int* pSize))
426 IPPAPI(IppStatus, ippsSHA384Init,(IppsSHA384State* pState))
427 IPPAPI(IppStatus, ippsSHA384Duplicate,(const IppsSHA384State* pSrcState, IppsSHA384State* pDstState))
428 
429 IPPAPI(IppStatus, ippsSHA384Pack,(const IppsSHA384State* pState, Ipp8u* pBuffer))
430 IPPAPI(IppStatus, ippsSHA384Unpack,(const Ipp8u* pBuffer, IppsSHA384State* pState))
431 
432 IPPAPI(IppStatus, ippsSHA384Update,(const Ipp8u* pSrc, int len, IppsSHA384State* pState))
433 IPPAPI(IppStatus, ippsSHA384GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA384State* pState))
434 IPPAPI(IppStatus, ippsSHA384Final,(Ipp8u* pMD, IppsSHA384State* pState))
435 IPPAPI(IppStatus, ippsSHA384MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
436 
437 /* SHA512 Hash Primitives */
438 IPPAPI(IppStatus, ippsSHA512GetSize,(int* pSize))
439 IPPAPI(IppStatus, ippsSHA512Init,(IppsSHA512State* pState))
440 IPPAPI(IppStatus, ippsSHA512Duplicate,(const IppsSHA512State* pSrcState, IppsSHA512State* pDstState))
441 
442 IPPAPI(IppStatus, ippsSHA512Pack,(const IppsSHA512State* pState, Ipp8u* pBuffer))
443 IPPAPI(IppStatus, ippsSHA512Unpack,(const Ipp8u* pBuffer, IppsSHA512State* pState))
444 
445 IPPAPI(IppStatus, ippsSHA512Update,(const Ipp8u* pSrc, int len, IppsSHA512State* pState))
446 IPPAPI(IppStatus, ippsSHA512GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA512State* pState))
447 IPPAPI(IppStatus, ippsSHA512Final,(Ipp8u* pMD, IppsSHA512State* pState))
448 IPPAPI(IppStatus, ippsSHA512MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
449 
450 /* MD5 Hash Primitives */
451 IPPAPI(IppStatus, ippsMD5GetSize,(int* pSize))
452 IPPAPI(IppStatus, ippsMD5Init,(IppsMD5State* pState))
453 IPPAPI(IppStatus, ippsMD5Duplicate,(const IppsMD5State* pSrcState, IppsMD5State* pDstState))
454 
455 IPPAPI(IppStatus, ippsMD5Pack,(const IppsMD5State* pState, Ipp8u* pBuffer))
456 IPPAPI(IppStatus, ippsMD5Unpack,(const Ipp8u* pBuffer, IppsMD5State* pState))
457 
458 IPPAPI(IppStatus, ippsMD5Update,(const Ipp8u* pSrc, int len, IppsMD5State* pState))
459 IPPAPI(IppStatus, ippsMD5GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsMD5State* pState))
460 IPPAPI(IppStatus, ippsMD5Final,(Ipp8u* pMD, IppsMD5State* pState))
461 IPPAPI(IppStatus, ippsMD5MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
462 
463 /* SM3 Hash Primitives */
464 IPPAPI(IppStatus, ippsSM3GetSize,(int* pSize))
465 IPPAPI(IppStatus, ippsSM3Init,(IppsSM3State* pState))
466 IPPAPI(IppStatus, ippsSM3Duplicate,(const IppsSM3State* pSrcState, IppsSM3State* pDstState))
467 
468 IPPAPI(IppStatus, ippsSM3Pack,(const IppsSM3State* pState, Ipp8u* pBuffer))
469 IPPAPI(IppStatus, ippsSM3Unpack,(const Ipp8u* pBuffer, IppsSM3State* pState))
470 
471 IPPAPI(IppStatus, ippsSM3Update,(const Ipp8u* pSrc, int len, IppsSM3State* pState))
472 IPPAPI(IppStatus, ippsSM3GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSM3State* pState))
473 IPPAPI(IppStatus, ippsSM3Final,(Ipp8u* pMD, IppsSM3State* pState))
474 IPPAPI(IppStatus, ippsSM3MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
475 
476 /* generalized Hash Primitives */
477 IPPAPI(IppStatus, ippsHashGetSize,(int* pSize))
478 IPPAPI(IppStatus, ippsHashInit,(IppsHashState* pState, IppHashAlgId hashAlg))
479 
480 IPPAPI(IppStatus, ippsHashPack,(const IppsHashState* pState, Ipp8u* pBuffer, int bufSize))
481 IPPAPI(IppStatus, ippsHashUnpack,(const Ipp8u* pBuffer, IppsHashState* pState))
482 IPPAPI(IppStatus, ippsHashDuplicate,(const IppsHashState* pSrcState, IppsHashState* pDstState))
483 
484 IPPAPI(IppStatus, ippsHashUpdate,(const Ipp8u* pSrc, int len, IppsHashState* pState))
485 IPPAPI(IppStatus, ippsHashGetTag,(Ipp8u* pTag, int tagLen, const IppsHashState* pState))
486 IPPAPI(IppStatus, ippsHashFinal,(Ipp8u* pMD, IppsHashState* pState))
487 IPPAPI(IppStatus, ippsHashMessage,(const Ipp8u* pMsg, int len, Ipp8u* pMD, IppHashAlgId hashAlg))
488 
489 /* method based generalized (reduced memory footprint) Hash Primitives */
490 IPPAPI( const IppsHashMethod*, ippsHashMethod_MD5, (void) )
491 IPPAPI( const IppsHashMethod*, ippsHashMethod_SM3, (void) )
492 
493 IPPAPI( const IppsHashMethod*, ippsHashMethod_SHA1, (void) )
494 IPPAPI( const IppsHashMethod*, ippsHashMethod_SHA1_NI, (void) )
495 IPPAPI( const IppsHashMethod*, ippsHashMethod_SHA1_TT, (void) )
496 
497 IPPAPI( const IppsHashMethod*, ippsHashMethod_SHA256, (void) )
498 IPPAPI( const IppsHashMethod*, ippsHashMethod_SHA256_NI, (void) )
499 IPPAPI( const IppsHashMethod*, ippsHashMethod_SHA256_TT, (void) )
500 
501 IPPAPI( const IppsHashMethod*, ippsHashMethod_SHA224, (void) )
502 IPPAPI( const IppsHashMethod*, ippsHashMethod_SHA224_NI, (void) )
503 IPPAPI( const IppsHashMethod*, ippsHashMethod_SHA224_TT, (void) )
504 
505 IPPAPI( const IppsHashMethod*, ippsHashMethod_SHA512, (void) )
506 IPPAPI( const IppsHashMethod*, ippsHashMethod_SHA384, (void) )
507 IPPAPI( const IppsHashMethod*, ippsHashMethod_SHA512_256, (void) )
508 IPPAPI( const IppsHashMethod*, ippsHashMethod_SHA512_224, (void) )
509 
510 IPPAPI(IppStatus, ippsHashGetSize_rmf,(int* pSize))
511 IPPAPI(IppStatus, ippsHashInit_rmf,(IppsHashState_rmf* pState, const IppsHashMethod* pMethod))
512 
513 IPPAPI(IppStatus, ippsHashPack_rmf,(const IppsHashState_rmf* pState, Ipp8u* pBuffer, int bufSize))
514 IPPAPI(IppStatus, ippsHashUnpack_rmf,(const Ipp8u* pBuffer, IppsHashState_rmf* pState))
515 IPPAPI(IppStatus, ippsHashDuplicate_rmf,(const IppsHashState_rmf* pSrcState, IppsHashState_rmf* pDstState))
516 
517 IPPAPI(IppStatus, ippsHashUpdate_rmf,(const Ipp8u* pSrc, int len, IppsHashState_rmf* pState))
518 IPPAPI(IppStatus, ippsHashGetTag_rmf,(Ipp8u* pMD, int tagLen, const IppsHashState_rmf* pState))
519 IPPAPI(IppStatus, ippsHashFinal_rmf,(Ipp8u* pMD, IppsHashState_rmf* pState))
520 IPPAPI(IppStatus, ippsHashMessage_rmf,(const Ipp8u* pMsg, int len, Ipp8u* pMD, const IppsHashMethod* pMethod))
521 
522 /* general MGF Primitives*/
523 IPPAPI(IppStatus, ippsMGF,(const Ipp8u* pSeed, int seedLen, Ipp8u* pMask, int maskLen, IppHashAlgId hashAlg))
524 IPPAPI(IppStatus, ippsMGF1_rmf,(const Ipp8u* pSeed, int seedLen, Ipp8u* pMask, int maskLen, const IppsHashMethod* pMethod))
525 IPPAPI(IppStatus, ippsMGF2_rmf,(const Ipp8u* pSeed, int seedLen, Ipp8u* pMask, int maskLen, const IppsHashMethod* pMethod))
526 
527 
528 /*
529 // =========================================================
530 // Keyed-Hash Message Authentication Codes
531 // =========================================================
532 */
533 
534 /* generalized Keyed HMAC primitives */
535 IPPAPI(IppStatus, ippsHMAC_GetSize,(int* pSize))
536 IPPAPI(IppStatus, ippsHMAC_Init,(const Ipp8u* pKey, int keyLen, IppsHMACState* pCtx, IppHashAlgId hashAlg))
537 
538 IPPAPI(IppStatus, ippsHMAC_Pack,(const IppsHMACState* pCtx, Ipp8u* pBuffer, int bufSize))
539 IPPAPI(IppStatus, ippsHMAC_Unpack,(const Ipp8u* pBuffer, IppsHMACState* pCtx))
540 IPPAPI(IppStatus, ippsHMAC_Duplicate,(const IppsHMACState* pSrcCtx, IppsHMACState* pDstCtx))
541 
542 IPPAPI(IppStatus, ippsHMAC_Update,(const Ipp8u* pSrc, int len, IppsHMACState* pCtx))
543 IPPAPI(IppStatus, ippsHMAC_Final,(Ipp8u* pMD, int mdLen, IppsHMACState* pCtx))
544 IPPAPI(IppStatus, ippsHMAC_GetTag,(Ipp8u* pMD, int mdLen, const IppsHMACState* pCtx))
545 IPPAPI(IppStatus, ippsHMAC_Message,(const Ipp8u* pMsg, int msgLen,
546                                     const Ipp8u* pKey, int keyLen,
547                                     Ipp8u* pMD, int mdLen,
548                                     IppHashAlgId hashAlg))
549 
550 /* method based generalized (reduced memory footprint) Keyed HMAC primitives */
551 IPPAPI(IppStatus, ippsHMACGetSize_rmf,(int* pSize))
552 IPPAPI(IppStatus, ippsHMACInit_rmf,(const Ipp8u* pKey, int keyLen,
553                                  IppsHMACState_rmf* pCtx,
554                                  const IppsHashMethod* pMethod))
555 
556 IPPAPI(IppStatus, ippsHMACPack_rmf,(const IppsHMACState_rmf* pCtx, Ipp8u* pBuffer, int bufSize))
557 IPPAPI(IppStatus, ippsHMACUnpack_rmf,(const Ipp8u* pBuffer, IppsHMACState_rmf* pCtx))
558 IPPAPI(IppStatus, ippsHMACDuplicate_rmf,(const IppsHMACState_rmf* pSrcCtx, IppsHMACState_rmf* pDstCtx))
559 
560 IPPAPI(IppStatus, ippsHMACUpdate_rmf,(const Ipp8u* pSrc, int len, IppsHMACState_rmf* pCtx))
561 IPPAPI(IppStatus, ippsHMACFinal_rmf,(Ipp8u* pMD, int mdLen, IppsHMACState_rmf* pCtx))
562 IPPAPI(IppStatus, ippsHMACGetTag_rmf,(Ipp8u* pMD, int mdLen, const IppsHMACState_rmf* pCtx))
563 IPPAPI(IppStatus, ippsHMACMessage_rmf,(const Ipp8u* pMsg, int msgLen,
564                                        const Ipp8u* pKey, int keyLen,
565                                        Ipp8u* pMD, int mdLen,
566                                        const IppsHashMethod* pMethod))
567 
568 
569 /*
570 // =========================================================
571 // Big Number Integer Arithmetic
572 // =========================================================
573 */
574 
575 /* Signed BigNum Operations */
576 IPPAPI(IppStatus, ippsBigNumGetSize,(int length, int* pSize))
577 IPPAPI(IppStatus, ippsBigNumInit,(int length, IppsBigNumState* pBN))
578 
579 IPPAPI(IppStatus, ippsCmpZero_BN,(const IppsBigNumState* pBN, Ipp32u* pResult))
580 IPPAPI(IppStatus, ippsCmp_BN,(const IppsBigNumState* pA, const IppsBigNumState* pB, Ipp32u* pResult))
581 
582 IPPAPI(IppStatus, ippsGetSize_BN,(const IppsBigNumState* pBN, int* pSize))
583 IPPAPI(IppStatus, ippsSet_BN,(IppsBigNumSGN sgn,
584                               int length, const Ipp32u* pData,
585                               IppsBigNumState* pBN))
586 IPPAPI(IppStatus, ippsGet_BN,(IppsBigNumSGN* pSgn,
587                               int* pLength, Ipp32u* pData,
588                               const IppsBigNumState* pBN))
589 IPPAPI(IppStatus, ippsRef_BN,(IppsBigNumSGN* pSgn, int* bitSize, Ipp32u** const ppData,
590                               const IppsBigNumState* pBN))
591 IPPAPI(IppStatus, ippsExtGet_BN,(IppsBigNumSGN* pSgn,
592                               int* pBitSize, Ipp32u* pData,
593                               const IppsBigNumState* pBN))
594 
595 IPPAPI(IppStatus, ippsAdd_BN,   (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR))
596 IPPAPI(IppStatus, ippsSub_BN,   (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR))
597 IPPAPI(IppStatus, ippsMul_BN,   (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR))
598 IPPAPI(IppStatus, ippsMAC_BN_I, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR))
599 IPPAPI(IppStatus, ippsDiv_BN,   (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pQ, IppsBigNumState* pR))
600 IPPAPI(IppStatus, ippsMod_BN,   (IppsBigNumState* pA, IppsBigNumState* pM, IppsBigNumState* pR))
601 IPPAPI(IppStatus, ippsGcd_BN,   (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pGCD))
602 IPPAPI(IppStatus, ippsModInv_BN,(IppsBigNumState* pA, IppsBigNumState* pM, IppsBigNumState* pInv))
603 
604 IPPAPI(IppStatus, ippsSetOctString_BN,(const Ipp8u* pStr, int strLen, IppsBigNumState* pBN))
605 IPPAPI(IppStatus, ippsGetOctString_BN,(Ipp8u* pStr, int strLen, const IppsBigNumState* pBN))
606 
607 /* Montgomery Operations */
608 IPPAPI(IppStatus, ippsMontGetSize,(IppsExpMethod method, int length, int* pSize))
609 IPPAPI(IppStatus, ippsMontInit,(IppsExpMethod method, int length, IppsMontState* pCtx))
610 
611 IPPAPI(IppStatus, ippsMontSet,(const Ipp32u* pModulo, int size, IppsMontState* pCtx))
612 IPPAPI(IppStatus, ippsMontGet,(Ipp32u* pModulo, int* pSize, const IppsMontState* pCtx))
613 
614 IPPAPI(IppStatus, ippsMontForm,(const IppsBigNumState* pA, IppsMontState* pCtx, IppsBigNumState* pR))
615 IPPAPI(IppStatus, ippsMontMul, (const IppsBigNumState* pA, const IppsBigNumState* pB, IppsMontState* m, IppsBigNumState* pR))
616 IPPAPI(IppStatus, ippsMontExp, (const IppsBigNumState* pA, const IppsBigNumState* pE, IppsMontState* m, IppsBigNumState* pR))
617 
618 /* Pseudo-Random Number Generation */
619 IPPAPI(IppStatus, ippsPRNGGetSize,(int* pSize))
620 IPPAPI(IppStatus, ippsPRNGInit,   (int seedBits, IppsPRNGState* pCtx))
621 
622 IPPAPI(IppStatus, ippsPRNGSetModulus,(const IppsBigNumState* pMod, IppsPRNGState* pCtx))
623 IPPAPI(IppStatus, ippsPRNGSetH0,     (const IppsBigNumState* pH0,  IppsPRNGState* pCtx))
624 IPPAPI(IppStatus, ippsPRNGSetAugment,(const IppsBigNumState* pAug, IppsPRNGState* pCtx))
625 IPPAPI(IppStatus, ippsPRNGSetSeed,   (const IppsBigNumState* pSeed,IppsPRNGState* pCtx))
626 IPPAPI(IppStatus, ippsPRNGGetSeed,   (const IppsPRNGState* pCtx,IppsBigNumState* pSeed))
627 
628 IPPAPI(IppStatus, ippsPRNGen,     (Ipp32u* pRand, int nBits, void* pCtx))
629 IPPAPI(IppStatus, ippsPRNGen_BN,  (IppsBigNumState* pRand, int nBits, void* pCtx))
630 IPPAPI(IppStatus, ippsPRNGenRDRAND,   (Ipp32u* pRand, int nBits, void* pCtx))
631 IPPAPI(IppStatus, ippsPRNGenRDRAND_BN,(IppsBigNumState* pRand, int nBits, void* pCtx))
632 IPPAPI(IppStatus, ippsTRNGenRDSEED,   (Ipp32u* pRand, int nBits, void* pCtx))
633 IPPAPI(IppStatus, ippsTRNGenRDSEED_BN,(IppsBigNumState* pRand, int nBits, void* pCtx))
634 
635 /* Probable Prime Number Generation */
636 IPPAPI(IppStatus, ippsPrimeGetSize,(int nMaxBits, int* pSize))
637 IPPAPI(IppStatus, ippsPrimeInit,   (int nMaxBits, IppsPrimeState* pCtx))
638 
639 IPPAPI(IppStatus, ippsPrimeGen, (int nBits, int nTrials, IppsPrimeState* pCtx,
640                                  IppBitSupplier rndFunc, void* pRndParam))
641 IPPAPI(IppStatus, ippsPrimeTest,(int nTrials, Ipp32u* pResult, IppsPrimeState* pCtx,
642                                  IppBitSupplier rndFunc, void* pRndParam))
643 IPPAPI(IppStatus, ippsPrimeGen_BN,(IppsBigNumState* pPrime, int nBits, int nTrials, IppsPrimeState* pCtx,
644                                  IppBitSupplier rndFunc, void* pRndParam))
645 IPPAPI(IppStatus, ippsPrimeTest_BN,(const IppsBigNumState* pPrime, int nTrials, Ipp32u* pResult, IppsPrimeState* pCtx,
646                                  IppBitSupplier rndFunc, void* pRndParam))
647 
648 IPPAPI(IppStatus, ippsPrimeGet,   (Ipp32u* pPrime, int* pLen, const IppsPrimeState* pCtx))
649 IPPAPI(IppStatus, ippsPrimeGet_BN,(IppsBigNumState* pPrime, const IppsPrimeState* pCtx))
650 
651 IPPAPI(IppStatus, ippsPrimeSet,   (const Ipp32u* pPrime, int nBits, IppsPrimeState* pCtx))
652 IPPAPI(IppStatus, ippsPrimeSet_BN,(const IppsBigNumState* pPrime, IppsPrimeState* pCtx))
653 
654 
655 /*
656 // =========================================================
657 // RSA Cryptography
658 // =========================================================
659 */
660 IPPAPI(IppStatus, ippsRSA_GetSizePublicKey,(int rsaModulusBitSize, int pubicExpBitSize, int* pKeySize))
661 IPPAPI(IppStatus, ippsRSA_InitPublicKey,(int rsaModulusBitSize, int publicExpBitSize,
662                                          IppsRSAPublicKeyState* pKey, int keyCtxSize))
663 IPPAPI(IppStatus, ippsRSA_SetPublicKey,(const IppsBigNumState* pModulus,
664                                         const IppsBigNumState* pPublicExp,
665                                         IppsRSAPublicKeyState* pKey))
666 IPPAPI(IppStatus, ippsRSA_GetPublicKey,(IppsBigNumState* pModulus,
667                                         IppsBigNumState* pPublicExp,
668                                   const IppsRSAPublicKeyState* pKey))
669 
670 IPPAPI(IppStatus, ippsRSA_GetSizePrivateKeyType1,(int rsaModulusBitSize, int privateExpBitSize, int* pKeySize))
671 IPPAPI(IppStatus, ippsRSA_InitPrivateKeyType1,(int rsaModulusBitSize, int privateExpBitSize,
672                                                IppsRSAPrivateKeyState* pKey, int keyCtxSize))
673 IPPAPI(IppStatus, ippsRSA_SetPrivateKeyType1,(const IppsBigNumState* pModulus,
674                                               const IppsBigNumState* pPrivateExp,
675                                               IppsRSAPrivateKeyState* pKey))
676 IPPAPI(IppStatus, ippsRSA_GetPrivateKeyType1,(IppsBigNumState* pModulus,
677                                               IppsBigNumState* pPrivateExp,
678                                         const IppsRSAPrivateKeyState* pKey))
679 
680 IPPAPI(IppStatus, ippsRSA_GetSizePrivateKeyType2,(int factorPbitSize, int factorQbitSize, int* pKeySize))
681 IPPAPI(IppStatus, ippsRSA_InitPrivateKeyType2,(int factorPbitSize, int factorQbitSize,
682                                                IppsRSAPrivateKeyState* pKey, int keyCtxSize))
683 IPPAPI(IppStatus, ippsRSA_SetPrivateKeyType2,(const IppsBigNumState* pFactorP,
684                                               const IppsBigNumState* pFactorQ,
685                                               const IppsBigNumState* pCrtExpP,
686                                               const IppsBigNumState* pCrtExpQ,
687                                               const IppsBigNumState* pInverseQ,
688                                               IppsRSAPrivateKeyState* pKey))
689 IPPAPI(IppStatus, ippsRSA_GetPrivateKeyType2,(IppsBigNumState* pFactorP,
690                                               IppsBigNumState* pFactorQ,
691                                               IppsBigNumState* pCrtExpP,
692                                               IppsBigNumState* pCrtExpQ,
693                                               IppsBigNumState* pInverseQ,
694                                               const IppsRSAPrivateKeyState* pKey))
695 
696 IPPAPI(IppStatus, ippsRSA_GetBufferSizePublicKey,(int* pBufferSize, const IppsRSAPublicKeyState* pKey))
697 IPPAPI(IppStatus, ippsRSA_GetBufferSizePrivateKey,(int* pBufferSize, const IppsRSAPrivateKeyState* pKey))
698 
699 IPPAPI(IppStatus, ippsRSA_Encrypt,(const IppsBigNumState* pPtxt,
700                                          IppsBigNumState* pCtxt,
701                                    const IppsRSAPublicKeyState* pKey,
702                                          Ipp8u* pScratchBuffer))
703 IPPAPI(IppStatus, ippsRSA_Decrypt,(const IppsBigNumState* pCtxt,
704                                          IppsBigNumState* pPtxt,
705                                    const IppsRSAPrivateKeyState* pKey,
706                                          Ipp8u* pScratchBuffer))
707 
708 IPPAPI(IppStatus, ippsRSA_GenerateKeys,(const IppsBigNumState* pSrcPublicExp,
709                                     IppsBigNumState* pModulus,
710                                     IppsBigNumState* pPublicExp,
711                                     IppsBigNumState* pPrivateExp,
712                                     IppsRSAPrivateKeyState* pPrivateKeyType2,
713                                     Ipp8u* pScratchBuffer,
714                                     int nTrials,
715                                     IppsPrimeState* pPrimeGen,
716                                     IppBitSupplier rndFunc, void* pRndParam))
717 
718 IPPAPI(IppStatus, ippsRSA_ValidateKeys,(int* pResult,
719                                  const IppsRSAPublicKeyState* pPublicKey,
720                                  const IppsRSAPrivateKeyState* pPrivateKeyType2,
721                                  const IppsRSAPrivateKeyState* pPrivateKeyType1,
722                                  Ipp8u* pScratchBuffer,
723                                  int nTrials,
724                                  IppsPrimeState* pPrimeGen,
725                                  IppBitSupplier rndFunc, void* pRndParam))
726 
727 /* encryption scheme: RSAES-OAEP */
728 IPPAPI(IppStatus, ippsRSAEncrypt_OAEP,(const Ipp8u* pSrc, int srcLen,
729                                        const Ipp8u* pLabel, int labLen,
730                                        const Ipp8u* pSeed,
731                                              Ipp8u* pDst,
732                                        const IppsRSAPublicKeyState* pKey,
733                                              IppHashAlgId hashAlg,
734                                              Ipp8u* pBuffer))
735 
736 IPPAPI(IppStatus, ippsRSADecrypt_OAEP,(const Ipp8u* pSrc,
737                                        const Ipp8u* pLab, int labLen,
738                                              Ipp8u* pDst, int* pDstLen,
739                                        const IppsRSAPrivateKeyState* pKey,
740                                              IppHashAlgId hashAlg,
741                                              Ipp8u* pBuffer))
742 
743 IPPAPI(IppStatus, ippsRSAEncrypt_OAEP_rmf,(const Ipp8u* pSrc, int srcLen,
744                                        const Ipp8u* pLabel, int labLen,
745                                        const Ipp8u* pSeed,
746                                              Ipp8u* pDst,
747                                        const IppsRSAPublicKeyState* pKey,
748                                        const IppsHashMethod* pMethod,
749                                              Ipp8u* pBuffer))
750 
751 IPPAPI(IppStatus, ippsRSADecrypt_OAEP_rmf,(const Ipp8u* pSrc,
752                                        const Ipp8u* pLab, int labLen,
753                                              Ipp8u* pDst, int* pDstLen,
754                                        const IppsRSAPrivateKeyState* pKey,
755                                        const IppsHashMethod* pMethod,
756                                              Ipp8u* pBuffer))
757 
758 /* encryption scheme: RSAES-PKCS_v1_5 */
759 IPPAPI(IppStatus, ippsRSAEncrypt_PKCSv15,(const Ipp8u* pSrc, int srcLen,
760                                           const Ipp8u* pRndPS,
761                                                 Ipp8u* pDst,
762                                           const IppsRSAPublicKeyState* pKey,
763                                                 Ipp8u* pBuffer))
764 
765 IPPAPI(IppStatus, ippsRSADecrypt_PKCSv15,(const Ipp8u* pSrc,
766                                                 Ipp8u* pDst, int* pDstLen,
767                                           const IppsRSAPrivateKeyState* pKey,
768                                                 Ipp8u* pBuffer))
769 
770 /* signature scheme : RSA-SSA-PSS */
771 IPPAPI(IppStatus, ippsRSASign_PSS,(const Ipp8u* pMsg,  int msgLen,
772                                    const Ipp8u* pSalt, int saltLen,
773                                          Ipp8u* pSign,
774                                    const IppsRSAPrivateKeyState* pPrvKey,
775                                    const IppsRSAPublicKeyState*  pPubKey,
776                                          IppHashAlgId hashAlg,
777                                          Ipp8u* pBuffer))
778 
779 IPPAPI(IppStatus, ippsRSAVerify_PSS,(const Ipp8u* pMsg,  int msgLen,
780                                      const Ipp8u* pSign,
781                                            int* pIsValid,
782                                      const IppsRSAPublicKeyState*  pKey,
783                                            IppHashAlgId hashAlg,
784                                            Ipp8u* pBuffer))
785 
786 IPPAPI(IppStatus, ippsRSASign_PSS_rmf,(const Ipp8u* pMsg,  int msgLen,
787                                        const Ipp8u* pSalt, int saltLen,
788                                              Ipp8u* pSign,
789                                        const IppsRSAPrivateKeyState* pPrvKey,
790                                        const IppsRSAPublicKeyState*  pPubKey,
791                                        const IppsHashMethod* pMethod,
792                                              Ipp8u* pBuffer))
793 
794 IPPAPI(IppStatus, ippsRSAVerify_PSS_rmf,(const Ipp8u* pMsg,  int msgLen,
795                                          const Ipp8u* pSign,
796                                           int* pIsValid,
797                                          const IppsRSAPublicKeyState*  pKey,
798                                          const IppsHashMethod* pMethod,
799                                                Ipp8u* pBuffer))
800 
801 /* signature scheme : RSA-SSA-PKCS1-v1_5 */
802 IPPAPI(IppStatus, ippsRSASign_PKCS1v15,(const Ipp8u* pMsg, int msgLen,
803                                               Ipp8u* pSign,
804                                         const IppsRSAPrivateKeyState* pPrvKey,
805                                         const IppsRSAPublicKeyState*  pPubKey,
806                                               IppHashAlgId hashAlg,
807                                               Ipp8u* pBuffer))
808 
809 IPPAPI(IppStatus, ippsRSAVerify_PKCS1v15,(const Ipp8u* pMsg, int msgLen,
810                                           const Ipp8u* pSign, int* pIsValid,
811                                           const IppsRSAPublicKeyState* pKey,
812                                                 IppHashAlgId hashAlg,
813                                                 Ipp8u* pBuffer))
814 
815 IPPAPI(IppStatus, ippsRSASign_PKCS1v15_rmf,(const Ipp8u* pMsg, int msgLen,
816                                                   Ipp8u* pSign,
817                                             const IppsRSAPrivateKeyState* pPrvKey,
818                                             const IppsRSAPublicKeyState*  pPubKey,
819                                             const IppsHashMethod* pMethod,
820                                                   Ipp8u* pBuffer))
821 
822 IPPAPI(IppStatus, ippsRSAVerify_PKCS1v15_rmf,(const Ipp8u* pMsg, int msgLen,
823                                               const Ipp8u* pSign, int* pIsValid,
824                                               const IppsRSAPublicKeyState* pKey,
825                                               const IppsHashMethod* pMethod,
826                                                     Ipp8u* pBuffer))
827 
828 
829 /*
830 // =========================================================
831 // DL Cryptography
832 // =========================================================
833 */
834 IPPAPI( const char*, ippsDLGetResultString, (IppDLResult code))
835 
836 /* Initialization */
837 IPPAPI(IppStatus, ippsDLPGetSize,(int bitSizeP, int bitSizeR, int* pSize))
838 IPPAPI(IppStatus, ippsDLPInit,   (int bitSizeP, int bitSizeR, IppsDLPState* pCtx))
839 
840 IPPAPI(IppStatus, ippsDLPPack,(const IppsDLPState* pCtx, Ipp8u* pBuffer))
841 IPPAPI(IppStatus, ippsDLPUnpack,(const Ipp8u* pBuffer, IppsDLPState* pCtx))
842 
843 /* Set Up and Retrieve Domain Parameters */
844 IPPAPI(IppStatus, ippsDLPSet,(const IppsBigNumState* pP,
845                               const IppsBigNumState* pR,
846                               const IppsBigNumState* pG,
847                               IppsDLPState* pCtx))
848 IPPAPI(IppStatus, ippsDLPGet,(IppsBigNumState* pP,
849                               IppsBigNumState* pR,
850                               IppsBigNumState* pG,
851                               IppsDLPState* pCtx))
852 IPPAPI(IppStatus, ippsDLPSetDP,(const IppsBigNumState* pDP, IppDLPKeyTag tag, IppsDLPState* pCtx))
853 IPPAPI(IppStatus, ippsDLPGetDP,(IppsBigNumState* pDP, IppDLPKeyTag tag, const IppsDLPState* pCtx))
854 
855 /* Key Generation, Validation and Set Up */
856 IPPAPI(IppStatus, ippsDLPGenKeyPair,(IppsBigNumState* pPrvKey, IppsBigNumState* pPubKey,
857                                      IppsDLPState* pCtx,
858                                      IppBitSupplier rndFunc, void* pRndParam))
859 IPPAPI(IppStatus, ippsDLPPublicKey, (const IppsBigNumState* pPrvKey,
860                                      IppsBigNumState* pPubKey,
861                                      IppsDLPState* pCtx))
862 IPPAPI(IppStatus, ippsDLPValidateKeyPair,(const IppsBigNumState* pPrvKey,
863                                      const IppsBigNumState* pPubKey,
864                                      IppDLResult* pResult,
865                                      IppsDLPState* pCtx))
866 
867 IPPAPI(IppStatus, ippsDLPSetKeyPair,(const IppsBigNumState* pPrvKey,
868                                      const IppsBigNumState* pPubKey,
869                                      IppsDLPState* pCtx))
870 
871 /* Singing/Verifying (DSA version) */
872 IPPAPI(IppStatus, ippsDLPSignDSA,  (const IppsBigNumState* pMsgDigest,
873                                     const IppsBigNumState* pPrvKey,
874                                     IppsBigNumState* pSignR, IppsBigNumState* pSignS,
875                                     IppsDLPState* pCtx))
876 IPPAPI(IppStatus, ippsDLPVerifyDSA,(const IppsBigNumState* pMsgDigest,
877                                     const IppsBigNumState* pSignR, const IppsBigNumState* pSignS,
878                                     IppDLResult* pResult,
879                                     IppsDLPState* pCtx))
880 
881 /* Shared Secret Element (DH version) */
882 IPPAPI(IppStatus, ippsDLPSharedSecretDH,(const IppsBigNumState* pPrvKeyA,
883                                          const IppsBigNumState* pPubKeyB,
884                                          IppsBigNumState* pShare,
885                                          IppsDLPState* pCtx))
886 
887 /* DSA's parameter Generation and Validation */
888 IPPAPI(IppStatus, ippsDLPGenerateDSA,(const IppsBigNumState* pSeedIn,
889                                       int nTrials, IppsDLPState* pCtx,
890                                       IppsBigNumState* pSeedOut, int* pCounter,
891                                       IppBitSupplier rndFunc, void* pRndParam))
892 IPPAPI(IppStatus, ippsDLPValidateDSA,(int nTrials, IppDLResult* pResult, IppsDLPState* pCtx,
893                                       IppBitSupplier rndFunc, void* pRndParam))
894 
895 /* DH parameter's Generation and Validation */
896 IPPAPI(IppStatus, ippsDLPGenerateDH,(const IppsBigNumState* pSeedIn,
897                                      int nTrials, IppsDLPState* pCtx,
898                                      IppsBigNumState* pSeedOut, int* pCounter,
899                                      IppBitSupplier rndFunc, void* pRndParam))
900 IPPAPI(IppStatus, ippsDLPValidateDH,(int nTrials, IppDLResult* pResult, IppsDLPState* pCtx,
901                                      IppBitSupplier rndFunc, void* pRndParam))
902 
903 
904 /*
905 // =========================================================
906 // EC Cryptography
907 // =========================================================
908 */
909 IPPAPI( const char*, ippsECCGetResultString, (IppECResult code))
910 
911 /*
912 // EC over Prime Fields
913 */
914 /* general EC initialization */
915 IPPAPI(IppStatus, ippsECCPGetSize,(int feBitSize, int* pSize))
916 IPPAPI(IppStatus, ippsECCPGetSizeStd128r1,(int* pSize))
917 IPPAPI(IppStatus, ippsECCPGetSizeStd128r2,(int* pSize))
918 IPPAPI(IppStatus, ippsECCPGetSizeStd192r1,(int* pSize))
919 IPPAPI(IppStatus, ippsECCPGetSizeStd224r1,(int* pSize))
920 IPPAPI(IppStatus, ippsECCPGetSizeStd256r1,(int* pSize))
921 IPPAPI(IppStatus, ippsECCPGetSizeStd384r1,(int* pSize))
922 IPPAPI(IppStatus, ippsECCPGetSizeStd521r1,(int* pSize))
923 IPPAPI(IppStatus, ippsECCPGetSizeStdSM2,  (int* pSize))
924 
925 IPPAPI(IppStatus, ippsECCPInit,(int feBitSize, IppsECCPState* pEC))
926 IPPAPI(IppStatus, ippsECCPInitStd128r1,(IppsECCPState* pEC))
927 IPPAPI(IppStatus, ippsECCPInitStd128r2,(IppsECCPState* pEC))
928 IPPAPI(IppStatus, ippsECCPInitStd192r1,(IppsECCPState* pEC))
929 IPPAPI(IppStatus, ippsECCPInitStd224r1,(IppsECCPState* pEC))
930 IPPAPI(IppStatus, ippsECCPInitStd256r1,(IppsECCPState* pEC))
931 IPPAPI(IppStatus, ippsECCPInitStd384r1,(IppsECCPState* pEC))
932 IPPAPI(IppStatus, ippsECCPInitStd521r1,(IppsECCPState* pEC))
933 IPPAPI(IppStatus, ippsECCPInitStdSM2,  (IppsECCPState* pEC))
934 
935 IPPAPI(IppStatus, ippsECCPSet,(const IppsBigNumState* pPrime,
936                                const IppsBigNumState* pA, const IppsBigNumState* pB,
937                                const IppsBigNumState* pGX,const IppsBigNumState* pGY,const IppsBigNumState* pOrder,
938                                int cofactor,
939                                IppsECCPState* pEC))
940 IPPAPI(IppStatus, ippsECCPSetStd,(IppECCType flag, IppsECCPState* pEC))
941 IPPAPI(IppStatus, ippsECCPSetStd128r1,(IppsECCPState* pEC))
942 IPPAPI(IppStatus, ippsECCPSetStd128r2,(IppsECCPState* pEC))
943 IPPAPI(IppStatus, ippsECCPSetStd192r1,(IppsECCPState* pEC))
944 IPPAPI(IppStatus, ippsECCPSetStd224r1,(IppsECCPState* pEC))
945 IPPAPI(IppStatus, ippsECCPSetStd256r1,(IppsECCPState* pEC))
946 IPPAPI(IppStatus, ippsECCPSetStd384r1,(IppsECCPState* pEC))
947 IPPAPI(IppStatus, ippsECCPSetStd521r1,(IppsECCPState* pEC))
948 IPPAPI(IppStatus, ippsECCPSetStdSM2,  (IppsECCPState* pEC))
949 
950 IPPAPI(IppStatus, ippsECCPBindGxyTblStd192r1,(IppsECCPState* pEC))
951 IPPAPI(IppStatus, ippsECCPBindGxyTblStd224r1,(IppsECCPState* pEC))
952 IPPAPI(IppStatus, ippsECCPBindGxyTblStd256r1,(IppsECCPState* pEC))
953 IPPAPI(IppStatus, ippsECCPBindGxyTblStd384r1,(IppsECCPState* pEC))
954 IPPAPI(IppStatus, ippsECCPBindGxyTblStd521r1,(IppsECCPState* pEC))
955 IPPAPI(IppStatus, ippsECCPBindGxyTblStdSM2,  (IppsECCPState* pEC))
956 
957 IPPAPI(IppStatus, ippsECCPGet,(IppsBigNumState* pPrime,
958                                IppsBigNumState* pA, IppsBigNumState* pB,
959                                IppsBigNumState* pGX,IppsBigNumState* pGY,IppsBigNumState* pOrder,
960                                int* cofactor,
961                                IppsECCPState* pEC))
962 IPPAPI(IppStatus, ippsECCPGetOrderBitSize,(int* pBitSize, IppsECCPState* pEC))
963 
964 IPPAPI(IppStatus, ippsECCPValidate,(int nTrials, IppECResult* pResult, IppsECCPState* pEC,
965                                     IppBitSupplier rndFunc, void* pRndParam))
966 
967 /* EC Point */
968 IPPAPI(IppStatus, ippsECCPPointGetSize,(int feBitSize, int* pSize))
969 
970 IPPAPI(IppStatus, ippsECCPPointInit,(int feBitSize, IppsECCPPointState* pPoint))
971 
972 /* Setup/retrieve point's coordinates */
973 IPPAPI(IppStatus, ippsECCPSetPoint,(const IppsBigNumState* pX, const IppsBigNumState* pY,
974                                     IppsECCPPointState* pPoint, IppsECCPState* pEC))
975 
976 IPPAPI(IppStatus, ippsECCPSetPointAtInfinity,(IppsECCPPointState* pPoint, IppsECCPState* pEC))
977 
978 IPPAPI(IppStatus, ippsECCPGetPoint,(IppsBigNumState* pX, IppsBigNumState* pY,
979                                     const IppsECCPPointState* pPoint, IppsECCPState* pEC))
980 
981 /* EC Point Operations */
982 IPPAPI(IppStatus, ippsECCPCheckPoint,(const IppsECCPPointState* pP,
983                                       IppECResult* pResult, IppsECCPState* pEC))
984 IPPAPI(IppStatus, ippsECCPComparePoint,(const IppsECCPPointState* pP, const IppsECCPPointState* pQ,
985                                         IppECResult* pResult, IppsECCPState* pEC))
986 IPPAPI(IppStatus, ippsECCPNegativePoint,(const IppsECCPPointState* pP,
987                                          IppsECCPPointState* pR, IppsECCPState* pEC))
988 IPPAPI(IppStatus, ippsECCPAddPoint,(const IppsECCPPointState* pP, const IppsECCPPointState* pQ,
989                                     IppsECCPPointState* pR, IppsECCPState* pEC))
990 IPPAPI(IppStatus, ippsECCPMulPointScalar,(const IppsECCPPointState* pP, const IppsBigNumState* pK,
991                                           IppsECCPPointState* pR, IppsECCPState* pEC))
992 
993 /* Key Generation, Setup and Validation */
994 IPPAPI(IppStatus, ippsECCPGenKeyPair,(IppsBigNumState* pPrivate, IppsECCPPointState* pPublic,
995                                       IppsECCPState* pEC,
996                                       IppBitSupplier rndFunc, void* pRndParam))
997 IPPAPI(IppStatus, ippsECCPPublicKey,(const IppsBigNumState* pPrivate,
998                                      IppsECCPPointState* pPublic,
999                                      IppsECCPState* pEC))
1000 IPPAPI(IppStatus, ippsECCPValidateKeyPair,(const IppsBigNumState* pPrivate, const IppsECCPPointState* pPublic,
1001                                            IppECResult* pResult,
1002                                            IppsECCPState* pEC))
1003 IPPAPI(IppStatus, ippsECCPSetKeyPair,(const IppsBigNumState* pPrivate, const IppsECCPPointState* pPublic,
1004                                       IppBool regular,
1005                                       IppsECCPState* pEC))
1006 
1007 /* Shared Secret (DH scheme ) */
1008 IPPAPI(IppStatus, ippsECCPSharedSecretDH,(const IppsBigNumState* pPrivateA,
1009                                           const IppsECCPPointState* pPublicB,
1010                                           IppsBigNumState* pShare,
1011                                           IppsECCPState* pEC))
1012 IPPAPI(IppStatus, ippsECCPSharedSecretDHC,(const IppsBigNumState* pPrivateA,
1013                                            const IppsECCPPointState* pPublicB,
1014                                            IppsBigNumState* pShare,
1015                                            IppsECCPState* pEC))
1016 
1017 /* Sing/Verify */
1018 IPPAPI(IppStatus, ippsECCPSignDSA,(const IppsBigNumState* pMsgDigest,
1019                         const IppsBigNumState* pPrivate,
1020                         IppsBigNumState* pSignX, IppsBigNumState* pSignY,
1021                         IppsECCPState* pEC))
1022 IPPAPI(IppStatus, ippsECCPVerifyDSA,(const IppsBigNumState* pMsgDigest,
1023                         const IppsBigNumState* pSignX, const IppsBigNumState* pSignY,
1024                         IppECResult* pResult,
1025                         IppsECCPState* pEC))
1026 
1027 IPPAPI(IppStatus, ippsECCPSignNR,(const IppsBigNumState* pMsgDigest,
1028                         const IppsBigNumState* pPrivate,
1029                         IppsBigNumState* pSignX, IppsBigNumState* pSignY,
1030                         IppsECCPState* pEC))
1031 IPPAPI(IppStatus, ippsECCPVerifyNR,(const IppsBigNumState* pMsgDigest,
1032                         const IppsBigNumState* pSignX, const IppsBigNumState* pSignY,
1033                         IppECResult* pResult,
1034                         IppsECCPState* pEC))
1035 
1036 IPPAPI(IppStatus, ippsECCPSignSM2,(const IppsBigNumState* pMsgDigest,
1037                         const IppsBigNumState* pRegPrivate,
1038                         const IppsBigNumState* pEphPrivate,
1039                         IppsBigNumState* pSignR, IppsBigNumState* pSignS,
1040                         IppsECCPState* pEC))
1041 IPPAPI(IppStatus, ippsECCPVerifySM2,(const IppsBigNumState* pMsgDigest,
1042                         const IppsECCPPointState* pRegPublic,
1043                         const IppsBigNumState* pSignR, const IppsBigNumState* pSignS,
1044                         IppECResult* pResult,
1045                         IppsECCPState* pEC))
1046 
1047 /*
1048 // GF over prime and its extension
1049 */
1050 IPPAPI(IppStatus, ippsGFpGetSize, (int feBitSize, int* pSize))
1051 IPPAPI(IppStatus, ippsGFpInitArbitrary,(const IppsBigNumState* pPrime, int primeBitSize, IppsGFpState* pGFp))
1052 IPPAPI(IppStatus, ippsGFpInitFixed,(int primeBitSize, const IppsGFpMethod* pGFpMethod, IppsGFpState* pGFp))
1053 IPPAPI(IppStatus, ippsGFpInit,    (const IppsBigNumState* pPrime, int primeBitSize, const IppsGFpMethod* pGFpMethod, IppsGFpState* pGFp))
1054 IPPAPI( const IppsGFpMethod*, ippsGFpMethod_p192r1, (void) )
1055 IPPAPI( const IppsGFpMethod*, ippsGFpMethod_p224r1, (void) )
1056 IPPAPI( const IppsGFpMethod*, ippsGFpMethod_p256r1, (void) )
1057 IPPAPI( const IppsGFpMethod*, ippsGFpMethod_p384r1, (void) )
1058 IPPAPI( const IppsGFpMethod*, ippsGFpMethod_p521r1, (void) )
1059 IPPAPI( const IppsGFpMethod*, ippsGFpMethod_p256sm2,(void) )
1060 IPPAPI( const IppsGFpMethod*, ippsGFpMethod_p256bn, (void) )
1061 IPPAPI( const IppsGFpMethod*, ippsGFpMethod_p256,   (void) )
1062 IPPAPI( const IppsGFpMethod*, ippsGFpMethod_pArb,   (void) )
1063 
1064 IPPAPI(IppStatus, ippsGFpxGetSize,(const IppsGFpState* pGroundGF, int degree, int* pSize))
1065 IPPAPI(IppStatus, ippsGFpxInit,   (const IppsGFpState* pGroundGF, int extDeg, const IppsGFpElement* const ppGroundElm[], int nElm, const IppsGFpMethod* pGFpMethod, IppsGFpState* pGFpx))
1066 IPPAPI(IppStatus, ippsGFpxInitBinomial,(const IppsGFpState* pGroundGF, int extDeg, const IppsGFpElement* pGroundElm, const IppsGFpMethod* pGFpMethod, IppsGFpState* pGFpx))
1067 IPPAPI( const IppsGFpMethod*, ippsGFpxMethod_binom2_epid2,(void) )
1068 IPPAPI( const IppsGFpMethod*, ippsGFpxMethod_binom3_epid2,(void) )
1069 IPPAPI( const IppsGFpMethod*, ippsGFpxMethod_binom2,      (void) )
1070 IPPAPI( const IppsGFpMethod*, ippsGFpxMethod_binom3,      (void) )
1071 IPPAPI( const IppsGFpMethod*, ippsGFpxMethod_binom,       (void) )
1072 IPPAPI( const IppsGFpMethod*, ippsGFpxMethod_com,         (void) )
1073 
1074 IPPAPI(IppStatus, ippsGFpScratchBufferSize,(int nExponents, int ExpBitSize, const IppsGFpState* pGFp, int* pBufferSize))
1075 
1076 IPPAPI(IppStatus, ippsGFpElementGetSize,(const IppsGFpState* pGFp, int* pElementSize))
1077 IPPAPI(IppStatus, ippsGFpElementInit,   (const Ipp32u* pA, int lenA, IppsGFpElement* pR, IppsGFpState* pGFp))
1078 
1079 IPPAPI(IppStatus, ippsGFpSetElement,      (const Ipp32u* pA, int lenA, IppsGFpElement* pR, IppsGFpState* pGFp))
1080 IPPAPI(IppStatus, ippsGFpSetElementRegular,(const IppsBigNumState* pBN, IppsGFpElement* pR, IppsGFpState* pGFp))
1081 IPPAPI(IppStatus, ippsGFpSetElementOctString,(const Ipp8u* pStr, int strSize, IppsGFpElement* pR, IppsGFpState* pGFp))
1082 IPPAPI(IppStatus, ippsGFpSetElementRandom,(IppsGFpElement* pR, IppsGFpState* pGFp, IppBitSupplier rndFunc, void* pRndParam))
1083 IPPAPI(IppStatus, ippsGFpSetElementHash,(const Ipp8u* pMsg, int msgLen, IppsGFpElement* pElm, IppsGFpState* pGFp, IppHashAlgId hashID))
1084 IPPAPI(IppStatus, ippsGFpSetElementHash_rmf,(const Ipp8u* pMsg, int msgLen, IppsGFpElement* pElm, IppsGFpState* pGFp, const IppsHashMethod* pMethod))
1085 IPPAPI(IppStatus, ippsGFpCpyElement,(const IppsGFpElement* pA, IppsGFpElement* pR, IppsGFpState* pGFp))
1086 IPPAPI(IppStatus, ippsGFpGetElement,(const IppsGFpElement* pA, Ipp32u* pDataA, int lenA, IppsGFpState* pGFp))
1087 IPPAPI(IppStatus, ippsGFpGetElementOctString,(const IppsGFpElement* pA, Ipp8u* pStr, int strSize, IppsGFpState* pGFp))
1088 
1089 IPPAPI(IppStatus, ippsGFpCmpElement,(const IppsGFpElement* pA, const IppsGFpElement* pB, int* pResult, const IppsGFpState* pGFp))
1090 IPPAPI(IppStatus, ippsGFpIsZeroElement,(const IppsGFpElement* pA, int* pResult, const IppsGFpState* pGFp))
1091 IPPAPI(IppStatus, ippsGFpIsUnityElement,(const IppsGFpElement* pA, int* pResult, const IppsGFpState* pGFp))
1092 
1093 IPPAPI(IppStatus, ippsGFpConj,(const IppsGFpElement* pA, IppsGFpElement* pR, IppsGFpState* pGFp))
1094 IPPAPI(IppStatus, ippsGFpNeg, (const IppsGFpElement* pA, IppsGFpElement* pR, IppsGFpState* pGFp))
1095 IPPAPI(IppStatus, ippsGFpInv, (const IppsGFpElement* pA, IppsGFpElement* pR, IppsGFpState* pGFp))
1096 IPPAPI(IppStatus, ippsGFpSqrt,(const IppsGFpElement* pA, IppsGFpElement* pR, IppsGFpState* pGFp))
1097 IPPAPI(IppStatus, ippsGFpSqr, (const IppsGFpElement* pA, IppsGFpElement* pR, IppsGFpState* pGFp))
1098 IPPAPI(IppStatus, ippsGFpAdd, (const IppsGFpElement* pA, const IppsGFpElement* pB,  IppsGFpElement* pR, IppsGFpState* pGFp))
1099 IPPAPI(IppStatus, ippsGFpSub, (const IppsGFpElement* pA, const IppsGFpElement* pB,  IppsGFpElement* pR, IppsGFpState* pGFp))
1100 IPPAPI(IppStatus, ippsGFpMul, (const IppsGFpElement* pA, const IppsGFpElement* pB,  IppsGFpElement* pR, IppsGFpState* pGFp))
1101 IPPAPI(IppStatus, ippsGFpExp, (const IppsGFpElement* pA, const IppsBigNumState* pE, IppsGFpElement* pR, IppsGFpState* pGFp, Ipp8u* pScratchBuffer))
1102 IPPAPI(IppStatus, ippsGFpMultiExp,(const IppsGFpElement* const ppElmA[], const IppsBigNumState* const ppE[], int nItems, IppsGFpElement* pR, IppsGFpState* pGFp, Ipp8u* pScratchBuffer))
1103 
1104 IPPAPI(IppStatus, ippsGFpAdd_PE,(const IppsGFpElement* pA, const IppsGFpElement* pParentB, IppsGFpElement* pR, IppsGFpState* pGFp))
1105 IPPAPI(IppStatus, ippsGFpSub_PE,(const IppsGFpElement* pA, const IppsGFpElement* pParentB, IppsGFpElement* pR, IppsGFpState* pGFp))
1106 IPPAPI(IppStatus, ippsGFpMul_PE,(const IppsGFpElement* pA, const IppsGFpElement* pParentB, IppsGFpElement* pR, IppsGFpState* pGFp))
1107 
1108 /* ================== */
1109 IPPAPI(IppStatus, ippsGFpECGetSize,(const IppsGFpState* pGFp, int* pSize))
1110 IPPAPI(IppStatus, ippsGFpECInit,   (const IppsGFpState* pGFp,
1111                                     const IppsGFpElement* pA, const IppsGFpElement* pB,
1112                                     IppsGFpECState* pEC))
1113 
1114 IPPAPI(IppStatus, ippsGFpECSet,(const IppsGFpElement* pA, const IppsGFpElement* pB,
1115                                 IppsGFpECState* pEC))
1116 IPPAPI(IppStatus, ippsGFpECSetSubgroup,(const IppsGFpElement* pX, const IppsGFpElement* pY,
1117                                         const IppsBigNumState* pOrder,
1118                                         const IppsBigNumState* pCofactor,
1119                                         IppsGFpECState* pEC))
1120 
1121 IPPAPI(IppStatus, ippsGFpECInitStd128r1,(const IppsGFpState* pGFp, IppsGFpECState* pEC))
1122 IPPAPI(IppStatus, ippsGFpECInitStd128r2,(const IppsGFpState* pGFp, IppsGFpECState* pEC))
1123 IPPAPI(IppStatus, ippsGFpECInitStd192r1,(const IppsGFpState* pGFp, IppsGFpECState* pEC))
1124 IPPAPI(IppStatus, ippsGFpECInitStd224r1,(const IppsGFpState* pGFp, IppsGFpECState* pEC))
1125 IPPAPI(IppStatus, ippsGFpECInitStd256r1,(const IppsGFpState* pGFp, IppsGFpECState* pEC))
1126 IPPAPI(IppStatus, ippsGFpECInitStd384r1,(const IppsGFpState* pGFp, IppsGFpECState* pEC))
1127 IPPAPI(IppStatus, ippsGFpECInitStd521r1,(const IppsGFpState* pGFp, IppsGFpECState* pEC))
1128 IPPAPI(IppStatus, ippsGFpECInitStdSM2,  (const IppsGFpState* pGFp, IppsGFpECState* pEC))
1129 IPPAPI(IppStatus, ippsGFpECInitStdBN256,(const IppsGFpState* pGFp, IppsGFpECState* pEC))
1130 
1131 IPPAPI(IppStatus, ippsGFpECBindGxyTblStd192r1,(IppsGFpECState* pEC))
1132 IPPAPI(IppStatus, ippsGFpECBindGxyTblStd224r1,(IppsGFpECState* pEC))
1133 IPPAPI(IppStatus, ippsGFpECBindGxyTblStd256r1,(IppsGFpECState* pEC))
1134 IPPAPI(IppStatus, ippsGFpECBindGxyTblStd384r1,(IppsGFpECState* pEC))
1135 IPPAPI(IppStatus, ippsGFpECBindGxyTblStd521r1,(IppsGFpECState* pEC))
1136 IPPAPI(IppStatus, ippsGFpECBindGxyTblStdSM2,  (IppsGFpECState* pEC))
1137 
1138 IPPAPI(IppStatus, ippsGFpECGet,(IppsGFpState** const ppGFp,
1139                                 IppsGFpElement* pA, IppsGFpElement* pB,
1140                                 const IppsGFpECState* pEC))
1141 IPPAPI(IppStatus, ippsGFpECGetSubgroup,(IppsGFpState** const ppGFp,
1142                                      IppsGFpElement* pX, IppsGFpElement* pY,
1143                                      IppsBigNumState* pOrder,IppsBigNumState* pCofactor,
1144                                      const IppsGFpECState* pEC))
1145 
1146 IPPAPI(IppStatus, ippsGFpECScratchBufferSize,(int nScalars, const IppsGFpECState* pEC, int* pBufferSize))
1147 
1148 IPPAPI(IppStatus, ippsGFpECVerify,(IppECResult* pResult, IppsGFpECState* pEC, Ipp8u* pScratchBuffer))
1149 
1150 IPPAPI(IppStatus, ippsGFpECPointGetSize,(const IppsGFpECState* pEC, int* pSize))
1151 IPPAPI(IppStatus, ippsGFpECPointInit,   (const IppsGFpElement* pX, const IppsGFpElement* pY, IppsGFpECPoint* pPoint, IppsGFpECState* pEC))
1152 
1153 IPPAPI(IppStatus, ippsGFpECSetPointAtInfinity,(IppsGFpECPoint* pPoint, IppsGFpECState* pEC))
1154 IPPAPI(IppStatus, ippsGFpECSetPoint,(const IppsGFpElement* pX, const IppsGFpElement* pY, IppsGFpECPoint* pPoint, IppsGFpECState* pEC))
1155 IPPAPI(IppStatus, ippsGFpECSetPointRegular,(const IppsBigNumState* pX, const IppsBigNumState* pY, IppsGFpECPoint* pPoint, IppsGFpECState* pEC))
1156 IPPAPI(IppStatus, ippsGFpECSetPointRandom,(IppsGFpECPoint* pPoint, IppsGFpECState* pEC, IppBitSupplier rndFunc, void* pRndParam, Ipp8u* pScratchBuffer))
1157 IPPAPI(IppStatus, ippsGFpECMakePoint,(const IppsGFpElement* pX, IppsGFpECPoint* pPoint, IppsGFpECState* pEC))
1158 IPPAPI(IppStatus, ippsGFpECSetPointHash,(Ipp32u hdr, const Ipp8u* pMsg, int msgLen, IppsGFpECPoint* pPoint, IppsGFpECState* pEC, IppHashAlgId hashID, Ipp8u* pScratchBuffer))
1159 IPPAPI(IppStatus, ippsGFpECSetPointHash_rmf,(Ipp32u hdr, const Ipp8u* pMsg, int msgLen, IppsGFpECPoint* pPoint, IppsGFpECState* pEC, const IppsHashMethod* pMethod, Ipp8u* pScratchBuffer))
1160 IPPAPI(IppStatus, ippsGFpECGetPoint,(const IppsGFpECPoint* pPoint, IppsGFpElement* pX, IppsGFpElement* pY, IppsGFpECState* pEC))
1161 IPPAPI(IppStatus, ippsGFpECGetPointRegular,(const IppsGFpECPoint* pPoint, IppsBigNumState* pX, IppsBigNumState* pY, IppsGFpECState* pEC))
1162 IPPAPI(IppStatus, ippsGFpECSetPointOctString,(const Ipp8u* pStr, int strLen, IppsGFpECPoint* pPoint, IppsGFpECState* pEC))
1163 IPPAPI(IppStatus, ippsGFpECGetPointOctString,(const IppsGFpECPoint* pPoint, Ipp8u* pStr, int strLen, IppsGFpECState* pEC))
1164 
1165 IPPAPI(IppStatus, ippsGFpECTstPoint,(const IppsGFpECPoint* pP, IppECResult* pResult, IppsGFpECState* pEC))
1166 IPPAPI(IppStatus, ippsGFpECTstPointInSubgroup,(const IppsGFpECPoint* pP, IppECResult* pResult, IppsGFpECState* pEC, Ipp8u* pScratchBuffer))
1167 IPPAPI(IppStatus, ippsGFpECCpyPoint,(const IppsGFpECPoint* pA, IppsGFpECPoint* pR, IppsGFpECState* pEC))
1168 IPPAPI(IppStatus, ippsGFpECCmpPoint,(const IppsGFpECPoint* pP, const IppsGFpECPoint* pQ, IppECResult* pResult, IppsGFpECState* pEC))
1169 IPPAPI(IppStatus, ippsGFpECNegPoint,(const IppsGFpECPoint* pP, IppsGFpECPoint* pR, IppsGFpECState* pEC))
1170 IPPAPI(IppStatus, ippsGFpECAddPoint,(const IppsGFpECPoint* pP, const IppsGFpECPoint* pQ, IppsGFpECPoint* pR, IppsGFpECState* pEC))
1171 IPPAPI(IppStatus, ippsGFpECMulPoint,(const IppsGFpECPoint* pP, const IppsBigNumState* pN, IppsGFpECPoint* pR, IppsGFpECState* pEC, Ipp8u* pScratchBuffer))
1172 
1173 /* keys */
1174 IPPAPI(IppStatus, ippsGFpECPrivateKey,(IppsBigNumState* pPrivate, IppsGFpECState* pEC,
1175                                        IppBitSupplier rndFunc, void* pRndParam))
1176 IPPAPI(IppStatus, ippsGFpECPublicKey,(const IppsBigNumState* pPrivate, IppsGFpECPoint* pPublic,
1177                         IppsGFpECState* pEC, Ipp8u* pScratchBuffer))
1178 IPPAPI(IppStatus, ippsGFpECTstKeyPair,(const IppsBigNumState* pPrivate, const IppsGFpECPoint* pPublic, IppECResult* pResult,
1179                         IppsGFpECState* pEC, Ipp8u* pScratchBuffer))
1180 
1181 /* DH shared secret */
1182 IPPAPI(IppStatus, ippsGFpECSharedSecretDH,(const IppsBigNumState* pPrivateA, const IppsGFpECPoint* pPublicB,
1183                         IppsBigNumState* pShare,
1184                         IppsGFpECState* pEC, Ipp8u* pScratchBuffer))
1185 IPPAPI(IppStatus, ippsGFpECSharedSecretDHC,(const IppsBigNumState* pPrivateA,
1186                         const IppsGFpECPoint* pPublicB,
1187                         IppsBigNumState* pShare,
1188                         IppsGFpECState* pEC, Ipp8u* pScratchBuffer))
1189 
1190 /* sign generation/verification of DSA, NR, SM2 */
1191 IPPAPI(IppStatus, ippsGFpECSignDSA,(const IppsBigNumState* pMsgDigest,
1192                         const IppsBigNumState* pRegPrivate,
1193                         const IppsBigNumState* pEphPrivate,
1194                         IppsBigNumState* pSignR, IppsBigNumState* pSignS,
1195                         IppsGFpECState* pEC, Ipp8u* pScratchBuffer))
1196 IPPAPI(IppStatus, ippsGFpECVerifyDSA,(const IppsBigNumState* pMsgDigest,
1197                         const IppsGFpECPoint* pRegPublic,
1198                         const IppsBigNumState* pSignR, const IppsBigNumState* pSignS,
1199                         IppECResult* pResult,
1200                         IppsGFpECState* pEC, Ipp8u* pScratchBuffer))
1201 
1202 IPPAPI(IppStatus, ippsGFpECSignNR,(const IppsBigNumState* pMsgDigest,
1203                         const IppsBigNumState* pRegPrivate,
1204                         const IppsBigNumState* pEphPrivate,
1205                         IppsBigNumState* pSignR, IppsBigNumState* pSignS,
1206                         IppsGFpECState* pEC, Ipp8u* pScratchBuffer))
1207 IPPAPI(IppStatus, ippsGFpECVerifyNR,(const IppsBigNumState* pMsgDigest,
1208                         const IppsGFpECPoint* pRegPublic,
1209                         const IppsBigNumState* pSignR, const IppsBigNumState* pSignS,
1210                         IppECResult* pResult,
1211                         IppsGFpECState* pEC, Ipp8u* pScratchBuffer))
1212 
1213 IPPAPI(IppStatus, ippsGFpECSignSM2,(const IppsBigNumState* pMsgDigest,
1214                         const IppsBigNumState* pRegPrivate,
1215                         const IppsBigNumState* pEphPrivate,
1216                         IppsBigNumState* pSignR, IppsBigNumState* pSignS,
1217                         IppsGFpECState* pEC, Ipp8u* pScratchBuffer))
1218 IPPAPI(IppStatus, ippsGFpECVerifySM2,(const IppsBigNumState* pMsgDigest,
1219                         const IppsGFpECPoint* pRegPublic,
1220                         const IppsBigNumState* pSignR, const IppsBigNumState* pSignS,
1221                         IppECResult* pResult,
1222                         IppsGFpECState* pEC, Ipp8u* pScratchBuffer))
1223 
1224 IPPAPI(IppStatus, ippsGFpECESGetSize_SM2, (const IppsGFpECState* pEC, int* pSize))
1225 IPPAPI(IppStatus, ippsGFpECESInit_SM2, (IppsGFpECState* pEC,
1226                         IppsECESState_SM2* pState, int avaliableCtxSize))
1227 IPPAPI(IppStatus, ippsGFpECESSetKey_SM2, (const IppsBigNumState* pPrivate,
1228                         const IppsGFpECPoint* pPublic,
1229                         IppsECESState_SM2* pState,
1230                         IppsGFpECState* pEC,
1231                         Ipp8u* pEcScratchBuffer))
1232 IPPAPI(IppStatus, ippsGFpECESStart_SM2, (IppsECESState_SM2* pState))
1233 IPPAPI(IppStatus, ippsGFpECESEncrypt_SM2, (const Ipp8u* pInput, Ipp8u* pOutput,
1234                         int dataLen, IppsECESState_SM2* pState))
1235 IPPAPI(IppStatus, ippsGFpECESDecrypt_SM2, (const Ipp8u* pInput, Ipp8u* pOutput,
1236                         int dataLen, IppsECESState_SM2* pState))
1237 IPPAPI(IppStatus, ippsGFpECESFinal_SM2, (Ipp8u* pTag, int tagLen, IppsECESState_SM2* pState))
1238 IPPAPI(IppStatus, ippsGFpECESGetBuffersSize_SM2, (int* pPublicKeySize,
1239                         int* pMaximumTagSize, const IppsECESState_SM2* pState))
1240 
1241 #ifdef  __cplusplus
1242 }
1243 #endif
1244 
1245 
1246 #endif /* IPPCP_H__ */
1247