ippcp.h 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860
  1. /*############################################################################
  2. # Copyright 2016 Intel Corporation
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ############################################################################*/
  16. /*
  17. // Intel(R) Integrated Performance Primitives
  18. // Cryptographic Primitives (ippCP)
  19. //
  20. //
  21. */
  22. #if !defined( __IPPCP_H__ ) || defined( _OWN_BLDPCS )
  23. #define __IPPCP_H__
  24. #if defined (_WIN32_WCE) && defined (_M_IX86) && defined (__stdcall)
  25. #define _IPP_STDCALL_CDECL
  26. #undef __stdcall
  27. #endif
  28. #ifndef __IPPDEFS_H__
  29. #include "ippdefs.h"
  30. #endif
  31. #ifndef __IPPCPDEFS_H__
  32. #include "ippcpdefs.h"
  33. #endif
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37. #if !defined( _IPP_NO_DEFAULT_LIB )
  38. #if defined( _IPP_SEQUENTIAL_DYNAMIC )
  39. #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "ippcp" )
  40. #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "ippcore" )
  41. #elif defined( _IPP_SEQUENTIAL_STATIC )
  42. #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "ippcpmt" )
  43. #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "ippcoremt" )
  44. #elif defined( _IPP_PARALLEL_DYNAMIC )
  45. #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "threaded/ippcp" )
  46. #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "threaded/ippcore" )
  47. #elif defined( _IPP_PARALLEL_STATIC )
  48. #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "threaded/ippcpmt" )
  49. #pragma comment( lib, __FILE__ "/../../lib/" _INTEL_PLATFORM "threaded/ippcoremt" )
  50. #endif
  51. #endif
  52. /* /////////////////////////////////////////////////////////////////////////////
  53. // Name: ippcpGetLibVersion
  54. // Purpose: getting of the library version
  55. // Returns: the structure of information about version of ippCP library
  56. // Parameters:
  57. //
  58. // Notes: not necessary to release the returned structure
  59. */
  60. IPPAPI( const IppLibraryVersion*, ippcpGetLibVersion, (void) )
  61. /*
  62. // =========================================================
  63. // Symmetric Ciphers
  64. // =========================================================
  65. */
  66. /* TDES */
  67. IPPAPI(IppStatus, ippsDESGetSize,(int *size))
  68. IPPAPI(IppStatus, ippsDESInit,(const Ipp8u* pKey, IppsDESSpec* pCtx))
  69. IPPAPI(IppStatus, ippsDESPack,(const IppsDESSpec* pCtx, Ipp8u* pBuffer))
  70. IPPAPI(IppStatus, ippsDESUnpack,(const Ipp8u* pBuffer, IppsDESSpec* pCtx))
  71. IPPAPI(IppStatus, ippsTDESEncryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int length,
  72. const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3,
  73. IppsCPPadding padding))
  74. IPPAPI(IppStatus, ippsTDESDecryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int length,
  75. const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3,
  76. IppsCPPadding padding))
  77. IPPAPI(IppStatus, ippsTDESEncryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int length,
  78. const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3,
  79. const Ipp8u* pIV,
  80. IppsCPPadding padding))
  81. IPPAPI(IppStatus, ippsTDESDecryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int length,
  82. const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3,
  83. const Ipp8u* pIV,
  84. IppsCPPadding padding))
  85. IPPAPI(IppStatus, ippsTDESEncryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int length, int cfbBlkSize,
  86. const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3,
  87. const Ipp8u* pIV,
  88. IppsCPPadding padding))
  89. IPPAPI(IppStatus, ippsTDESDecryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int length, int cfbBlkSize,
  90. const IppsDESSpec* pCtx1, const IppsDESSpec* pCtx2, const IppsDESSpec* pCtx3,
  91. const Ipp8u* pIV,
  92. IppsCPPadding padding))
  93. IPPAPI(IppStatus, ippsTDESEncryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize,
  94. const IppsDESSpec* pCtx1,
  95. const IppsDESSpec* pCtx2,
  96. const IppsDESSpec* pCtx3,
  97. Ipp8u* pIV))
  98. IPPAPI(IppStatus, ippsTDESDecryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize,
  99. const IppsDESSpec* pCtx1,
  100. const IppsDESSpec* pCtx2,
  101. const IppsDESSpec* pCtx3,
  102. Ipp8u* pIV))
  103. IPPAPI(IppStatus, ippsTDESEncryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
  104. const IppsDESSpec* pCtx1,
  105. const IppsDESSpec* pCtx2,
  106. const IppsDESSpec* pCtx3,
  107. Ipp8u* pCtrValue, int ctrNumBitSize))
  108. IPPAPI(IppStatus, ippsTDESDecryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
  109. const IppsDESSpec* pCtx1,
  110. const IppsDESSpec* pCtx2,
  111. const IppsDESSpec* pCtx3,
  112. Ipp8u* pCtrValue, int ctrNumBitSize))
  113. /* AES */
  114. IPPAPI(IppStatus, ippsAESGetSize,(int *pSize))
  115. IPPAPI(IppStatus, ippsAESInit,(const Ipp8u* pKey, int keyLen, IppsAESSpec* pCtx, int ctxSize))
  116. IPPAPI(IppStatus, ippsAESSetKey,(const Ipp8u* pKey, int keyLen, IppsAESSpec* pCtx))
  117. IPPAPI(IppStatus, ippsAESPack,(const IppsAESSpec* pCtx, Ipp8u* pBuffer, int buffSize))
  118. IPPAPI(IppStatus, ippsAESUnpack,(const Ipp8u* pBuffer, IppsAESSpec* pCtx, int ctxSize))
  119. IPPAPI(IppStatus, ippsAESEncryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
  120. const IppsAESSpec* pCtx))
  121. IPPAPI(IppStatus, ippsAESDecryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
  122. const IppsAESSpec* pCtx))
  123. IPPAPI(IppStatus, ippsAESEncryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
  124. const IppsAESSpec* pCtx,
  125. const Ipp8u* pIV))
  126. IPPAPI(IppStatus, ippsAESDecryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
  127. const IppsAESSpec* pCtx,
  128. const Ipp8u* pIV))
  129. IPPAPI(IppStatus, ippsAESEncryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int cfbBlkSize,
  130. const IppsAESSpec* pCtx,
  131. const Ipp8u* pIV))
  132. IPPAPI(IppStatus, ippsAESDecryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int cfbBlkSize,
  133. const IppsAESSpec* pCtx,
  134. const Ipp8u* pIV))
  135. IPPAPI(IppStatus, ippsAESEncryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize,
  136. const IppsAESSpec* pCtx,
  137. Ipp8u* pIV))
  138. IPPAPI(IppStatus, ippsAESDecryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize,
  139. const IppsAESSpec* pCtx,
  140. Ipp8u* pIV))
  141. IPPAPI(IppStatus, ippsAESEncryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
  142. const IppsAESSpec* pCtx,
  143. Ipp8u* pCtrValue, int ctrNumBitSize))
  144. IPPAPI(IppStatus, ippsAESDecryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
  145. const IppsAESSpec* pCtx,
  146. Ipp8u* pCtrValue, int ctrNumBitSize))
  147. /* SMS4 */
  148. IPPAPI(IppStatus, ippsSMS4GetSize,(int *pSize))
  149. IPPAPI(IppStatus, ippsSMS4Init,(const Ipp8u* pKey, int keyLen, IppsSMS4Spec* pCtx, int ctxSize))
  150. IPPAPI(IppStatus, ippsSMS4SetKey,(const Ipp8u* pKey, int keyLen, IppsSMS4Spec* pCtx))
  151. IPPAPI(IppStatus, ippsSMS4EncryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
  152. const IppsSMS4Spec* pCtx))
  153. IPPAPI(IppStatus, ippsSMS4DecryptECB,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
  154. const IppsSMS4Spec* pCtx))
  155. IPPAPI(IppStatus, ippsSMS4EncryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
  156. const IppsSMS4Spec* pCtx,
  157. const Ipp8u* pIV))
  158. IPPAPI(IppStatus, ippsSMS4DecryptCBC,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
  159. const IppsSMS4Spec* pCtx,
  160. const Ipp8u* pIV))
  161. IPPAPI(IppStatus, ippsSMS4EncryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int cfbBlkSize,
  162. const IppsSMS4Spec* pCtx,
  163. const Ipp8u* pIV))
  164. IPPAPI(IppStatus, ippsSMS4DecryptCFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int cfbBlkSize,
  165. const IppsSMS4Spec* pCtx,
  166. const Ipp8u* pIV))
  167. IPPAPI(IppStatus, ippsSMS4EncryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize,
  168. const IppsSMS4Spec* pCtx,
  169. Ipp8u* pIV))
  170. IPPAPI(IppStatus, ippsSMS4DecryptOFB,(const Ipp8u* pSrc, Ipp8u* pDst, int len, int ofbBlkSize,
  171. const IppsSMS4Spec* pCtx,
  172. Ipp8u* pIV))
  173. IPPAPI(IppStatus, ippsSMS4EncryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
  174. const IppsSMS4Spec* pCtx,
  175. Ipp8u* pCtrValue, int ctrNumBitSize))
  176. IPPAPI(IppStatus, ippsSMS4DecryptCTR,(const Ipp8u* pSrc, Ipp8u* pDst, int len,
  177. const IppsSMS4Spec* pCtx,
  178. Ipp8u* pCtrValue, int ctrNumBitSize))
  179. /*
  180. // =========================================================
  181. // AES based authentication & confidence Primitives
  182. // =========================================================
  183. */
  184. /*
  185. // AES-CCM
  186. */
  187. IPPAPI(IppStatus, ippsAES_CCMGetSize,(int* pSize))
  188. IPPAPI(IppStatus, ippsAES_CCMInit,(const Ipp8u* pKey, int keyLen, IppsAES_CCMState* pCtx, int ctxSize))
  189. IPPAPI(IppStatus, ippsAES_CCMMessageLen,(Ipp64u msgLen, IppsAES_CCMState* pCtx))
  190. IPPAPI(IppStatus, ippsAES_CCMTagLen,(int tagLen, IppsAES_CCMState* pCtx))
  191. IPPAPI(IppStatus, ippsAES_CCMStart,(const Ipp8u* pIV, int ivLen, const Ipp8u* pAD, int adLen, IppsAES_CCMState* pCtx))
  192. IPPAPI(IppStatus, ippsAES_CCMEncrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppsAES_CCMState* pCtx))
  193. IPPAPI(IppStatus, ippsAES_CCMDecrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppsAES_CCMState* pCtx))
  194. IPPAPI(IppStatus, ippsAES_CCMGetTag,(Ipp8u* pTag, int tagLen, const IppsAES_CCMState* pCtx))
  195. /*
  196. // AES-GCM
  197. */
  198. IPPAPI(IppStatus, ippsAES_GCMGetSize,(int * pSize))
  199. IPPAPI(IppStatus, ippsAES_GCMInit,(const Ipp8u* pKey, int keyLen, IppsAES_GCMState* pState, int ctxSize))
  200. IPPAPI(IppStatus, ippsAES_GCMReset,(IppsAES_GCMState* pState))
  201. IPPAPI(IppStatus, ippsAES_GCMProcessIV,(const Ipp8u* pIV, int ivLen,
  202. IppsAES_GCMState* pState))
  203. IPPAPI(IppStatus, ippsAES_GCMProcessAAD,(const Ipp8u* pAAD, int ivAAD,
  204. IppsAES_GCMState* pState))
  205. IPPAPI(IppStatus, ippsAES_GCMStart,(const Ipp8u* pIV, int ivLen,
  206. const Ipp8u* pAAD, int aadLen,
  207. IppsAES_GCMState* pState))
  208. IPPAPI(IppStatus, ippsAES_GCMEncrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppsAES_GCMState* pState))
  209. IPPAPI(IppStatus, ippsAES_GCMDecrypt,(const Ipp8u* pSrc, Ipp8u* pDst, int len, IppsAES_GCMState* pState))
  210. IPPAPI(IppStatus, ippsAES_GCMGetTag,(Ipp8u* pDstTag, int tagLen, const IppsAES_GCMState* pState))
  211. /*
  212. // AES-CMAC
  213. */
  214. IPPAPI(IppStatus, ippsAES_CMACGetSize,(int* pSize))
  215. IPPAPI(IppStatus, ippsAES_CMACInit,(const Ipp8u* pKey, int keyLen, IppsAES_CMACState* pState, int ctxSize))
  216. IPPAPI(IppStatus, ippsAES_CMACUpdate,(const Ipp8u* pSrc, int len, IppsAES_CMACState* pState))
  217. IPPAPI(IppStatus, ippsAES_CMACFinal,(Ipp8u* pMD, int mdLen, IppsAES_CMACState* pState))
  218. IPPAPI(IppStatus, ippsAES_CMACGetTag,(Ipp8u* pMD, int mdLen, const IppsAES_CMACState* pState))
  219. /*
  220. // =========================================================
  221. // RC4 Stream Ciphers
  222. // =========================================================
  223. */
  224. IPPAPI(IppStatus, ippsARCFourCheckKey, (const Ipp8u *pKey, int keyLen, IppBool* pIsWeak))
  225. IPPAPI(IppStatus, ippsARCFourGetSize, (int* pSize))
  226. IPPAPI(IppStatus, ippsARCFourInit, (const Ipp8u *pKey, int keyLen, IppsARCFourState *pCtx))
  227. IPPAPI(IppStatus, ippsARCFourReset, (IppsARCFourState* pCtx))
  228. IPPAPI(IppStatus, ippsARCFourPack,(const IppsARCFourState* pCtx, Ipp8u* pBuffer))
  229. IPPAPI(IppStatus, ippsARCFourUnpack,(const Ipp8u* pBuffer, IppsARCFourState* pCtx))
  230. IPPAPI(IppStatus, ippsARCFourEncrypt, (const Ipp8u *pSrc, Ipp8u *pDst, int length, IppsARCFourState *pCtx))
  231. IPPAPI(IppStatus, ippsARCFourDecrypt, (const Ipp8u *pSrc, Ipp8u *pDst, int length, IppsARCFourState *pCtx))
  232. /*
  233. // =========================================================
  234. // One-Way Hash Functions
  235. // =========================================================
  236. */
  237. /* SHA1 Hash Primitives */
  238. IPPAPI(IppStatus, ippsSHA1GetSize,(int* pSize))
  239. IPPAPI(IppStatus, ippsSHA1Init,(IppsSHA1State* pCtx))
  240. IPPAPI(IppStatus, ippsSHA1Duplicate,(const IppsSHA1State* pSrcCtx, IppsSHA1State* pDstCtx))
  241. IPPAPI(IppStatus, ippsSHA1Pack,(const IppsSHA1State* pCtx, Ipp8u* pBuffer))
  242. IPPAPI(IppStatus, ippsSHA1Unpack,(const Ipp8u* pBuffer, IppsSHA1State* pCtx))
  243. IPPAPI(IppStatus, ippsSHA1Update,(const Ipp8u* pSrc, int len, IppsSHA1State* pCtx))
  244. IPPAPI(IppStatus, ippsSHA1GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA1State* pCtx))
  245. IPPAPI(IppStatus, ippsSHA1Final,(Ipp8u* pMD, IppsSHA1State* pCtx))
  246. IPPAPI(IppStatus, ippsSHA1MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
  247. /* SHA224 Hash Primitives */
  248. IPPAPI(IppStatus, ippsSHA224GetSize,(int* pSize))
  249. IPPAPI(IppStatus, ippsSHA224Init,(IppsSHA224State* pCtx))
  250. IPPAPI(IppStatus, ippsSHA224Duplicate,(const IppsSHA224State* pSrcCtx, IppsSHA224State* pDstCtx))
  251. IPPAPI(IppStatus, ippsSHA224Pack,(const IppsSHA224State* pCtx, Ipp8u* pBuffer))
  252. IPPAPI(IppStatus, ippsSHA224Unpack,(const Ipp8u* pBuffer, IppsSHA224State* pCtx))
  253. IPPAPI(IppStatus, ippsSHA224Update,(const Ipp8u* pSrc, int len, IppsSHA224State* pCtx))
  254. IPPAPI(IppStatus, ippsSHA224GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA224State* pCtx))
  255. IPPAPI(IppStatus, ippsSHA224Final,(Ipp8u* pMD, IppsSHA224State* pCtx))
  256. IPPAPI(IppStatus, ippsSHA224MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
  257. /* SHA256 Hash Primitives */
  258. IPPAPI(IppStatus, ippsSHA256GetSize,(int* pSize))
  259. IPPAPI(IppStatus, ippsSHA256Init,(IppsSHA256State* pCtx))
  260. IPPAPI(IppStatus, ippsSHA256Duplicate,(const IppsSHA256State* pSrcCtx, IppsSHA256State* pDstCtx))
  261. IPPAPI(IppStatus, ippsSHA256Pack,(const IppsSHA256State* pCtx, Ipp8u* pBuffer))
  262. IPPAPI(IppStatus, ippsSHA256Unpack,(const Ipp8u* pBuffer, IppsSHA256State* pCtx))
  263. IPPAPI(IppStatus, ippsSHA256Update,(const Ipp8u* pSrc, int len, IppsSHA256State* pCtx))
  264. IPPAPI(IppStatus, ippsSHA256GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA256State* pCtx))
  265. IPPAPI(IppStatus, ippsSHA256Final,(Ipp8u* pMD, IppsSHA256State* pCtx))
  266. IPPAPI(IppStatus, ippsSHA256MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
  267. /* SHA384 Hash Primitives */
  268. IPPAPI(IppStatus, ippsSHA384GetSize,(int* pSize))
  269. IPPAPI(IppStatus, ippsSHA384Init,(IppsSHA384State* pCtx))
  270. IPPAPI(IppStatus, ippsSHA384Duplicate,(const IppsSHA384State* pSrcCtx, IppsSHA384State* pDstCtx))
  271. IPPAPI(IppStatus, ippsSHA384Pack,(const IppsSHA384State* pCtx, Ipp8u* pBuffer))
  272. IPPAPI(IppStatus, ippsSHA384Unpack,(const Ipp8u* pBuffer, IppsSHA384State* pCtx))
  273. IPPAPI(IppStatus, ippsSHA384Update,(const Ipp8u* pSrc, int len, IppsSHA384State* pCtx))
  274. IPPAPI(IppStatus, ippsSHA384GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA384State* pCtx))
  275. IPPAPI(IppStatus, ippsSHA384Final,(Ipp8u* pMD, IppsSHA384State* pCtx))
  276. IPPAPI(IppStatus, ippsSHA384MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
  277. /* SHA512 Hash Primitives */
  278. IPPAPI(IppStatus, ippsSHA512GetSize,(int* pSize))
  279. IPPAPI(IppStatus, ippsSHA512Init,(IppsSHA512State* pCtx))
  280. IPPAPI(IppStatus, ippsSHA512Duplicate,(const IppsSHA512State* pSrcCtx, IppsSHA512State* pDstCtx))
  281. IPPAPI(IppStatus, ippsSHA512Pack,(const IppsSHA512State* pCtx, Ipp8u* pBuffer))
  282. IPPAPI(IppStatus, ippsSHA512Unpack,(const Ipp8u* pBuffer, IppsSHA512State* pCtx))
  283. IPPAPI(IppStatus, ippsSHA512Update,(const Ipp8u* pSrc, int len, IppsSHA512State* pCtx))
  284. IPPAPI(IppStatus, ippsSHA512GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSHA512State* pCtx))
  285. IPPAPI(IppStatus, ippsSHA512Final,(Ipp8u* pMD, IppsSHA512State* pCtx))
  286. IPPAPI(IppStatus, ippsSHA512MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
  287. /* MD5 Hash Primitives */
  288. IPPAPI(IppStatus, ippsMD5GetSize,(int* pSize))
  289. IPPAPI(IppStatus, ippsMD5Init,(IppsMD5State* pCtx))
  290. IPPAPI(IppStatus, ippsMD5Duplicate,(const IppsMD5State* pSrcCtx, IppsMD5State* pDstCtx))
  291. IPPAPI(IppStatus, ippsMD5Pack,(const IppsMD5State* pCtx, Ipp8u* pBuffer))
  292. IPPAPI(IppStatus, ippsMD5Unpack,(const Ipp8u* pBuffer, IppsMD5State* pCtx))
  293. IPPAPI(IppStatus, ippsMD5Update,(const Ipp8u* pSrc, int len, IppsMD5State* pCtx))
  294. IPPAPI(IppStatus, ippsMD5GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsMD5State* pCtx))
  295. IPPAPI(IppStatus, ippsMD5Final,(Ipp8u* pMD, IppsMD5State* pCtx))
  296. IPPAPI(IppStatus, ippsMD5MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
  297. /* SM3 Hash Primitives */
  298. IPPAPI(IppStatus, ippsSM3GetSize,(int* pSize))
  299. IPPAPI(IppStatus, ippsSM3Init,(IppsSM3State* pCtx))
  300. IPPAPI(IppStatus, ippsSM3Duplicate,(const IppsSM3State* pSrcCtx, IppsSM3State* pDstCtx))
  301. IPPAPI(IppStatus, ippsSM3Pack,(const IppsSM3State* pCtx, Ipp8u* pBuffer))
  302. IPPAPI(IppStatus, ippsSM3Unpack,(const Ipp8u* pBuffer, IppsSM3State* pCtx))
  303. IPPAPI(IppStatus, ippsSM3Update,(const Ipp8u* pSrc, int len, IppsSM3State* pCtx))
  304. IPPAPI(IppStatus, ippsSM3GetTag,(Ipp8u* pTag, Ipp32u tagLen, const IppsSM3State* pCtx))
  305. IPPAPI(IppStatus, ippsSM3Final,(Ipp8u* pMD, IppsSM3State* pCtx))
  306. IPPAPI(IppStatus, ippsSM3MessageDigest,(const Ipp8u* pMsg, int len, Ipp8u* pMD))
  307. /* generalized Hash Primitives */
  308. IPPAPI(IppStatus, ippsHashGetSize,(int* pSize))
  309. IPPAPI(IppStatus, ippsHashInit,(IppsHashState* pCtx, IppHashAlgId hashAlg))
  310. IPPAPI(IppStatus, ippsHashPack,(const IppsHashState* pCtx, Ipp8u* pBuffer, int bufSize))
  311. IPPAPI(IppStatus, ippsHashUnpack,(const Ipp8u* pBuffer, IppsHashState* pCtx))
  312. IPPAPI(IppStatus, ippsHashDuplicate,(const IppsHashState* pSrcCtx, IppsHashState* pDstCtx))
  313. IPPAPI(IppStatus, ippsHashUpdate,(const Ipp8u* pSrc, int len, IppsHashState* pCtx))
  314. IPPAPI(IppStatus, ippsHashGetTag,(Ipp8u* pMD, int tagLen, const IppsHashState* pCtx))
  315. IPPAPI(IppStatus, ippsHashFinal,(Ipp8u* pMD, IppsHashState* pCtx))
  316. IPPAPI(IppStatus, ippsHashMessage,(const Ipp8u* pMsg, int len, Ipp8u* pMD, IppHashAlgId hashAlg))
  317. /* general MGF Primitives*/
  318. IPPAPI(IppStatus, ippsMGF,(const Ipp8u* pSeed, int seedLen, Ipp8u* pMask, int maskLen, IppHashAlgId hashAlg))
  319. /*
  320. // =========================================================
  321. // Keyed-Hash Message Authentication Codes
  322. // =========================================================
  323. */
  324. IPPAPI(IppStatus, ippsHMAC_GetSize,(int* pSize))
  325. IPPAPI(IppStatus, ippsHMAC_Init,(const Ipp8u* pKey, int keyLen, IppsHMACState* pCtx, IppHashAlgId hashAlg))
  326. IPPAPI(IppStatus, ippsHMAC_Pack,(const IppsHMACState* pCtx, Ipp8u* pBuffer, int bufSize))
  327. IPPAPI(IppStatus, ippsHMAC_Unpack,(const Ipp8u* pBuffer, IppsHMACState* pCtx))
  328. IPPAPI(IppStatus, ippsHMAC_Duplicate,(const IppsHMACState* pSrcCtx, IppsHMACState* pDstCtx))
  329. IPPAPI(IppStatus, ippsHMAC_Update,(const Ipp8u* pSrc, int len, IppsHMACState* pCtx))
  330. IPPAPI(IppStatus, ippsHMAC_Final,(Ipp8u* pMD, int mdLen, IppsHMACState* pCtx))
  331. IPPAPI(IppStatus, ippsHMAC_GetTag,(Ipp8u* pMD, int mdLen, const IppsHMACState* pCtx))
  332. IPPAPI(IppStatus, ippsHMAC_Message,(const Ipp8u* pMsg, int msgLen,
  333. const Ipp8u* pKey, int keyLen,
  334. Ipp8u* pMD, int mdLen,
  335. IppHashAlgId hashAlg))
  336. /*
  337. // =========================================================
  338. // Big Number Integer Arithmetic
  339. // =========================================================
  340. */
  341. /* Signed BigNum Operations */
  342. IPPAPI(IppStatus, ippsBigNumGetSize,(int length, int* pSize))
  343. IPPAPI(IppStatus, ippsBigNumInit,(int length, IppsBigNumState* pBN))
  344. IPPAPI(IppStatus, ippsCmpZero_BN,(const IppsBigNumState* pBN, Ipp32u* pResult))
  345. IPPAPI(IppStatus, ippsCmp_BN,(const IppsBigNumState* pA, const IppsBigNumState* pB, Ipp32u* pResult))
  346. IPPAPI(IppStatus, ippsGetSize_BN,(const IppsBigNumState* pBN, int* pSize))
  347. IPPAPI(IppStatus, ippsSet_BN,(IppsBigNumSGN sgn,
  348. int length, const Ipp32u* pData,
  349. IppsBigNumState* pBN))
  350. IPPAPI(IppStatus, ippsGet_BN,(IppsBigNumSGN* pSgn,
  351. int* pLength, Ipp32u* pData,
  352. const IppsBigNumState* pBN))
  353. IPPAPI(IppStatus, ippsRef_BN,(IppsBigNumSGN* pSgn, int* bitSize, Ipp32u** const ppData,
  354. const IppsBigNumState* pBN))
  355. IPPAPI(IppStatus, ippsExtGet_BN,(IppsBigNumSGN* pSgn,
  356. int* pBitSize, Ipp32u* pData,
  357. const IppsBigNumState* pBN))
  358. IPPAPI(IppStatus, ippsAdd_BN, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR))
  359. IPPAPI(IppStatus, ippsSub_BN, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR))
  360. IPPAPI(IppStatus, ippsMul_BN, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR))
  361. IPPAPI(IppStatus, ippsMAC_BN_I, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pR))
  362. IPPAPI(IppStatus, ippsDiv_BN, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pQ, IppsBigNumState* pR))
  363. IPPAPI(IppStatus, ippsMod_BN, (IppsBigNumState* pA, IppsBigNumState* pM, IppsBigNumState* pR))
  364. IPPAPI(IppStatus, ippsGcd_BN, (IppsBigNumState* pA, IppsBigNumState* pB, IppsBigNumState* pGCD))
  365. IPPAPI(IppStatus, ippsModInv_BN,(IppsBigNumState* pA, IppsBigNumState* pM, IppsBigNumState* pInv))
  366. IPPAPI(IppStatus, ippsSetOctString_BN,(const Ipp8u* pStr, int strLen, IppsBigNumState* pBN))
  367. IPPAPI(IppStatus, ippsGetOctString_BN,(Ipp8u* pStr, int strLen, const IppsBigNumState* pBN))
  368. /* Montgomery Operations */
  369. IPPAPI(IppStatus, ippsMontGetSize,(IppsExpMethod method, int length, int* pSize))
  370. IPPAPI(IppStatus, ippsMontInit,(IppsExpMethod method, int length, IppsMontState* pCtx))
  371. IPPAPI(IppStatus, ippsMontSet,(const Ipp32u* pModulo, int size, IppsMontState* pCtx))
  372. IPPAPI(IppStatus, ippsMontGet,(Ipp32u* pModulo, int* pSize, const IppsMontState* pCtx))
  373. IPPAPI(IppStatus, ippsMontForm,(const IppsBigNumState* pA, IppsMontState* pCtx, IppsBigNumState* pR))
  374. IPPAPI(IppStatus, ippsMontMul, (const IppsBigNumState* pA, const IppsBigNumState* pB, IppsMontState* m, IppsBigNumState* pR))
  375. IPPAPI(IppStatus, ippsMontExp, (const IppsBigNumState* pA, const IppsBigNumState* pE, IppsMontState* m, IppsBigNumState* pR))
  376. /* Pseudo-Random Number Generation */
  377. IPPAPI(IppStatus, ippsPRNGGetSize,(int* pSize))
  378. IPPAPI(IppStatus, ippsPRNGInit, (int seedBits, IppsPRNGState* pCtx))
  379. IPPAPI(IppStatus, ippsPRNGSetModulus,(const IppsBigNumState* pMod, IppsPRNGState* pCtx))
  380. IPPAPI(IppStatus, ippsPRNGSetH0, (const IppsBigNumState* pH0, IppsPRNGState* pCtx))
  381. IPPAPI(IppStatus, ippsPRNGSetAugment,(const IppsBigNumState* pAug, IppsPRNGState* pCtx))
  382. IPPAPI(IppStatus, ippsPRNGSetSeed, (const IppsBigNumState* pSeed,IppsPRNGState* pCtx))
  383. IPPAPI(IppStatus, ippsPRNGGetSeed, (const IppsPRNGState* pCtx,IppsBigNumState* pSeed))
  384. IPPAPI(IppStatus, ippsPRNGen, (Ipp32u* pRand, int nBits, void* pCtx))
  385. IPPAPI(IppStatus, ippsPRNGen_BN, (IppsBigNumState* pRand, int nBits, void* pCtx))
  386. IPPAPI(IppStatus, ippsPRNGenRDRAND, (Ipp32u* pRand, int nBits, void* pCtx))
  387. IPPAPI(IppStatus, ippsPRNGenRDRAND_BN,(IppsBigNumState* pRand, int nBits, void* pCtx))
  388. IPPAPI(IppStatus, ippsTRNGenRDSEED, (Ipp32u* pRand, int nBits, void* pCtx))
  389. IPPAPI(IppStatus, ippsTRNGenRDSEED_BN,(IppsBigNumState* pRand, int nBits, void* pCtx))
  390. /* Probable Prime Number Generation */
  391. IPPAPI(IppStatus, ippsPrimeGetSize,(int nMaxBits, int* pSize))
  392. IPPAPI(IppStatus, ippsPrimeInit, (int nMaxBits, IppsPrimeState* pCtx))
  393. IPPAPI(IppStatus, ippsPrimeGen, (int nBits, int nTrials, IppsPrimeState* pCtx,
  394. IppBitSupplier rndFunc, void* pRndParam))
  395. IPPAPI(IppStatus, ippsPrimeTest,(int nTrials, Ipp32u* pResult, IppsPrimeState* pCtx,
  396. IppBitSupplier rndFunc, void* pRndParam))
  397. IPPAPI(IppStatus, ippsPrimeGen_BN,(IppsBigNumState* pPrime, int nBits, int nTrials, IppsPrimeState* pCtx,
  398. IppBitSupplier rndFunc, void* pRndParam))
  399. IPPAPI(IppStatus, ippsPrimeTest_BN,(const IppsBigNumState* pPrime, int nTrials, Ipp32u* pResult, IppsPrimeState* pCtx,
  400. IppBitSupplier rndFunc, void* pRndParam))
  401. IPPAPI(IppStatus, ippsPrimeGet, (Ipp32u* pPrime, int* pLen, const IppsPrimeState* pCtx))
  402. IPPAPI(IppStatus, ippsPrimeGet_BN,(IppsBigNumState* pPrime, const IppsPrimeState* pCtx))
  403. IPPAPI(IppStatus, ippsPrimeSet, (const Ipp32u* pPrime, int nBits, IppsPrimeState* pCtx))
  404. IPPAPI(IppStatus, ippsPrimeSet_BN,(const IppsBigNumState* pPrime, IppsPrimeState* pCtx))
  405. /*
  406. // =========================================================
  407. // RSA Cryptography
  408. // =========================================================
  409. */
  410. IPPAPI(IppStatus, ippsRSA_GetSizePublicKey,(int rsaModulusBitSize, int pubicExpBitSize, int* pKeySize))
  411. IPPAPI(IppStatus, ippsRSA_InitPublicKey,(int rsaModulusBitSize, int publicExpBitSize,
  412. IppsRSAPublicKeyState* pKey, int keyCtxSize))
  413. IPPAPI(IppStatus, ippsRSA_SetPublicKey,(const IppsBigNumState* pModulus,
  414. const IppsBigNumState* pPublicExp,
  415. IppsRSAPublicKeyState* pKey))
  416. IPPAPI(IppStatus, ippsRSA_GetPublicKey,(IppsBigNumState* pModulus,
  417. IppsBigNumState* pPublicExp,
  418. const IppsRSAPublicKeyState* pKey))
  419. IPPAPI(IppStatus, ippsRSA_GetSizePrivateKeyType1,(int rsaModulusBitSize, int privateExpBitSize, int* pKeySize))
  420. IPPAPI(IppStatus, ippsRSA_InitPrivateKeyType1,(int rsaModulusBitSize, int privateExpBitSize,
  421. IppsRSAPrivateKeyState* pKey, int keyCtxSize))
  422. IPPAPI(IppStatus, ippsRSA_SetPrivateKeyType1,(const IppsBigNumState* pModulus,
  423. const IppsBigNumState* pPrivateExp,
  424. IppsRSAPrivateKeyState* pKey))
  425. IPPAPI(IppStatus, ippsRSA_GetPrivateKeyType1,(IppsBigNumState* pModulus,
  426. IppsBigNumState* pPrivateExp,
  427. const IppsRSAPrivateKeyState* pKey))
  428. IPPAPI(IppStatus, ippsRSA_GetSizePrivateKeyType2,(int factorPbitSize, int factorQbitSize, int* pKeySize))
  429. IPPAPI(IppStatus, ippsRSA_InitPrivateKeyType2,(int factorPbitSize, int factorQbitSize,
  430. IppsRSAPrivateKeyState* pKey, int keyCtxSize))
  431. IPPAPI(IppStatus, ippsRSA_SetPrivateKeyType2,(const IppsBigNumState* pFactorP,
  432. const IppsBigNumState* pFactorQ,
  433. const IppsBigNumState* pCrtExpP,
  434. const IppsBigNumState* pCrtExpQ,
  435. const IppsBigNumState* pInverseQ,
  436. IppsRSAPrivateKeyState* pKey))
  437. IPPAPI(IppStatus, ippsRSA_GetPrivateKeyType2,(IppsBigNumState* pFactorP,
  438. IppsBigNumState* pFactorQ,
  439. IppsBigNumState* pCrtExpP,
  440. IppsBigNumState* pCrtExpQ,
  441. IppsBigNumState* pInverseQ,
  442. const IppsRSAPrivateKeyState* pKey))
  443. IPPAPI(IppStatus, ippsRSA_GetBufferSizePublicKey,(int* pBufferSize, const IppsRSAPublicKeyState* pKey))
  444. IPPAPI(IppStatus, ippsRSA_GetBufferSizePrivateKey,(int* pBufferSize, const IppsRSAPrivateKeyState* pKey))
  445. IPPAPI(IppStatus, ippsRSA_Encrypt,(const IppsBigNumState* pPtxt,
  446. IppsBigNumState* pCtxt,
  447. const IppsRSAPublicKeyState* pKey,
  448. Ipp8u* pScratchBuffer))
  449. IPPAPI(IppStatus, ippsRSA_Decrypt,(const IppsBigNumState* pCtxt,
  450. IppsBigNumState* pPtxt,
  451. const IppsRSAPrivateKeyState* pKey,
  452. Ipp8u* pScratchBuffer))
  453. IPPAPI(IppStatus, ippsRSA_GenerateKeys,(const IppsBigNumState* pSrcPublicExp,
  454. IppsBigNumState* pModulus,
  455. IppsBigNumState* pPublicExp,
  456. IppsBigNumState* pPrivateExp,
  457. IppsRSAPrivateKeyState* pPrivateKeyType2,
  458. Ipp8u* pScratchBuffer,
  459. int nTrials,
  460. IppsPrimeState* pPrimeGen,
  461. IppBitSupplier rndFunc, void* pRndParam))
  462. IPPAPI(IppStatus, ippsRSA_ValidateKeys,(int* pResult,
  463. const IppsRSAPublicKeyState* pPublicKey,
  464. const IppsRSAPrivateKeyState* pPrivateKeyType2,
  465. const IppsRSAPrivateKeyState* pPrivateKeyType1,
  466. Ipp8u* pScratchBuffer,
  467. int nTrials,
  468. IppsPrimeState* pPrimeGen,
  469. IppBitSupplier rndFunc, void* pRndParam))
  470. /* encryption scheme: RSAES-OAEP */
  471. IPPAPI(IppStatus, ippsRSAEncrypt_OAEP,(const Ipp8u* pSrc, int srcLen,
  472. const Ipp8u* pLabel, int labLen,
  473. const Ipp8u* pSeed,
  474. Ipp8u* pDst,
  475. const IppsRSAPublicKeyState* pKey,
  476. IppHashAlgId hashAlg,
  477. Ipp8u* pBuffer))
  478. IPPAPI(IppStatus, ippsRSADecrypt_OAEP,(const Ipp8u* pSrc,
  479. const Ipp8u* pLab, int labLen,
  480. Ipp8u* pDst, int* pDstLen,
  481. const IppsRSAPrivateKeyState* pKey,
  482. IppHashAlgId hashAlg,
  483. Ipp8u* pBuffer))
  484. /* encryption scheme: RSAES-PKCS_v1_5 */
  485. IPPAPI(IppStatus, ippsRSAEncrypt_PKCSv15,(const Ipp8u* pSrc, int srcLen,
  486. const Ipp8u* pRndPS,
  487. Ipp8u* pDst,
  488. const IppsRSAPublicKeyState* pKey,
  489. Ipp8u* pBuffer))
  490. IPPAPI(IppStatus, ippsRSADecrypt_PKCSv15,(const Ipp8u* pSrc,
  491. Ipp8u* pDst, int* pDstLen,
  492. const IppsRSAPrivateKeyState* pKey,
  493. Ipp8u* pBuffer))
  494. /* signature scheme : RSA-SSA-PSS */
  495. IPPAPI(IppStatus, ippsRSASign_PSS,(const Ipp8u* pMsg, int msgLen,
  496. const Ipp8u* pSalt, int saltLen,
  497. Ipp8u* pSign,
  498. const IppsRSAPrivateKeyState* pPrvKey,
  499. const IppsRSAPublicKeyState* pPubKey,
  500. IppHashAlgId hashAlg,
  501. Ipp8u* pBuffer))
  502. IPPAPI(IppStatus, ippsRSAVerify_PSS,(const Ipp8u* pMsg, int msgLen,
  503. const Ipp8u* pSign,
  504. int* pIsValid,
  505. const IppsRSAPublicKeyState* pKey,
  506. IppHashAlgId hashAlg,
  507. Ipp8u* pBuffer))
  508. /* signature scheme : RSA-SSA-PKCS1-v1_5 */
  509. IPPAPI(IppStatus, ippsRSASign_PKCS1v15,(const Ipp8u* pMsg, int msgLen,
  510. Ipp8u* pSign,
  511. const IppsRSAPrivateKeyState* pPrvKey,
  512. const IppsRSAPublicKeyState* pPubKey,
  513. IppHashAlgId hashAlg,
  514. Ipp8u* pBuffer))
  515. IPPAPI(IppStatus, ippsRSAVerify_PKCS1v15,(const Ipp8u* pMsg, int msgLen,
  516. const Ipp8u* pSign, int* pIsValid,
  517. const IppsRSAPublicKeyState* pKey,
  518. IppHashAlgId hashAlg,
  519. Ipp8u* pBuffer))
  520. /*
  521. // =========================================================
  522. // DL Cryptography
  523. // =========================================================
  524. */
  525. IPPAPI( const char*, ippsDLGetResultString, (IppDLResult code))
  526. /* Initialization */
  527. IPPAPI(IppStatus, ippsDLPGetSize,(int bitSizeP, int bitSizeR, int* pSize))
  528. IPPAPI(IppStatus, ippsDLPInit, (int bitSizeP, int bitSizeR, IppsDLPState* pCtx))
  529. IPPAPI(IppStatus, ippsDLPPack,(const IppsDLPState* pCtx, Ipp8u* pBuffer))
  530. IPPAPI(IppStatus, ippsDLPUnpack,(const Ipp8u* pBuffer, IppsDLPState* pCtx))
  531. /* Set Up and Retrieve Domain Parameters */
  532. IPPAPI(IppStatus, ippsDLPSet,(const IppsBigNumState* pP,
  533. const IppsBigNumState* pR,
  534. const IppsBigNumState* pG,
  535. IppsDLPState* pCtx))
  536. IPPAPI(IppStatus, ippsDLPGet,(IppsBigNumState* pP,
  537. IppsBigNumState* pR,
  538. IppsBigNumState* pG,
  539. IppsDLPState* pCtx))
  540. IPPAPI(IppStatus, ippsDLPSetDP,(const IppsBigNumState* pDP, IppDLPKeyTag tag, IppsDLPState* pCtx))
  541. IPPAPI(IppStatus, ippsDLPGetDP,(IppsBigNumState* pDP, IppDLPKeyTag tag, const IppsDLPState* pCtx))
  542. /* Key Generation, Validation and Set Up */
  543. IPPAPI(IppStatus, ippsDLPGenKeyPair,(IppsBigNumState* pPrvKey, IppsBigNumState* pPubKey,
  544. IppsDLPState* pCtx,
  545. IppBitSupplier rndFunc, void* pRndParam))
  546. IPPAPI(IppStatus, ippsDLPPublicKey, (const IppsBigNumState* pPrvKey,
  547. IppsBigNumState* pPubKey,
  548. IppsDLPState* pCtx))
  549. IPPAPI(IppStatus, ippsDLPValidateKeyPair,(const IppsBigNumState* pPrvKey,
  550. const IppsBigNumState* pPubKey,
  551. IppDLResult* pResult,
  552. IppsDLPState* pCtx))
  553. IPPAPI(IppStatus, ippsDLPSetKeyPair,(const IppsBigNumState* pPrvKey,
  554. const IppsBigNumState* pPubKey,
  555. IppsDLPState* pCtx))
  556. /* Singing/Verifying (DSA version) */
  557. IPPAPI(IppStatus, ippsDLPSignDSA, (const IppsBigNumState* pMsgDigest,
  558. const IppsBigNumState* pPrvKey,
  559. IppsBigNumState* pSignR, IppsBigNumState* pSignS,
  560. IppsDLPState* pCtx))
  561. IPPAPI(IppStatus, ippsDLPVerifyDSA,(const IppsBigNumState* pMsgDigest,
  562. const IppsBigNumState* pSignR, const IppsBigNumState* pSignS,
  563. IppDLResult* pResult,
  564. IppsDLPState* pCtx))
  565. /* Shared Secret Element (DH version) */
  566. IPPAPI(IppStatus, ippsDLPSharedSecretDH,(const IppsBigNumState* pPrvKeyA,
  567. const IppsBigNumState* pPubKeyB,
  568. IppsBigNumState* pShare,
  569. IppsDLPState* pCtx))
  570. /* DSA's parameter Generation and Validation */
  571. IPPAPI(IppStatus, ippsDLPGenerateDSA,(const IppsBigNumState* pSeedIn,
  572. int nTrials, IppsDLPState* pCtx,
  573. IppsBigNumState* pSeedOut, int* pCounter,
  574. IppBitSupplier rndFunc, void* pRndParam))
  575. IPPAPI(IppStatus, ippsDLPValidateDSA,(int nTrials, IppDLResult* pResult, IppsDLPState* pCtx,
  576. IppBitSupplier rndFunc, void* pRndParam))
  577. /* DH parameter's Generation and Validation */
  578. IPPAPI(IppStatus, ippsDLPGenerateDH,(const IppsBigNumState* pSeedIn,
  579. int nTrials, IppsDLPState* pCtx,
  580. IppsBigNumState* pSeedOut, int* pCounter,
  581. IppBitSupplier rndFunc, void* pRndParam))
  582. IPPAPI(IppStatus, ippsDLPValidateDH,(int nTrials, IppDLResult* pResult, IppsDLPState* pCtx,
  583. IppBitSupplier rndFunc, void* pRndParam))
  584. /*
  585. // =========================================================
  586. // EC Cryptography
  587. // =========================================================
  588. */
  589. IPPAPI( const char*, ippsECCGetResultString, (IppECResult code))
  590. /*
  591. // EC over Prime Fields
  592. */
  593. /* general EC initialization */
  594. IPPAPI(IppStatus, ippsECCPGetSize,(int feBitSize, int* pSize))
  595. IPPAPI(IppStatus, ippsECCPInit,(int feBitSize, IppsECCPState* pECC))
  596. IPPAPI(IppStatus, ippsECCPSet,(const IppsBigNumState* pPrime,
  597. const IppsBigNumState* pA, const IppsBigNumState* pB,
  598. const IppsBigNumState* pGX,const IppsBigNumState* pGY,const IppsBigNumState* pOrder,
  599. int cofactor,
  600. IppsECCPState* pECC))
  601. /* standard EC initialization */
  602. IPPAPI(IppStatus, ippsECCPGetSizeStd128r1,(int* pSize))
  603. IPPAPI(IppStatus, ippsECCPGetSizeStd128r2,(int* pSize))
  604. IPPAPI(IppStatus, ippsECCPGetSizeStd192r1,(int* pSize))
  605. IPPAPI(IppStatus, ippsECCPGetSizeStd224r1,(int* pSize))
  606. IPPAPI(IppStatus, ippsECCPGetSizeStd256r1,(int* pSize))
  607. IPPAPI(IppStatus, ippsECCPGetSizeStd384r1,(int* pSize))
  608. IPPAPI(IppStatus, ippsECCPGetSizeStd521r1,(int* pSize))
  609. IPPAPI(IppStatus, ippsECCPGetSizeStdSM2,(int* pSize))
  610. IPPAPI(IppStatus, ippsECCPInitStd128r1,(IppsECCPState* pECC))
  611. IPPAPI(IppStatus, ippsECCPInitStd128r2,(IppsECCPState* pECC))
  612. IPPAPI(IppStatus, ippsECCPInitStd192r1,(IppsECCPState* pECC))
  613. IPPAPI(IppStatus, ippsECCPInitStd224r1,(IppsECCPState* pECC))
  614. IPPAPI(IppStatus, ippsECCPInitStd256r1,(IppsECCPState* pECC))
  615. IPPAPI(IppStatus, ippsECCPInitStd384r1,(IppsECCPState* pECC))
  616. IPPAPI(IppStatus, ippsECCPInitStd521r1,(IppsECCPState* pECC))
  617. IPPAPI(IppStatus, ippsECCPInitStdSM2,(IppsECCPState* pECC))
  618. IPPAPI(IppStatus, ippsECCPSetStd128r1,(IppsECCPState* pECC))
  619. IPPAPI(IppStatus, ippsECCPSetStd128r2,(IppsECCPState* pECC))
  620. IPPAPI(IppStatus, ippsECCPSetStd192r1,(IppsECCPState* pECC))
  621. IPPAPI(IppStatus, ippsECCPSetStd224r1,(IppsECCPState* pECC))
  622. IPPAPI(IppStatus, ippsECCPSetStd256r1,(IppsECCPState* pECC))
  623. IPPAPI(IppStatus, ippsECCPSetStd384r1,(IppsECCPState* pECC))
  624. IPPAPI(IppStatus, ippsECCPSetStd521r1,(IppsECCPState* pECC))
  625. IPPAPI(IppStatus, ippsECCPSetStdSM2,(IppsECCPState* pECC))
  626. IPPAPI(IppStatus, ippsECCPSetStd,(IppECCType flag, IppsECCPState* pECC))
  627. IPPAPI(IppStatus, ippsECCPGet,(IppsBigNumState* pPrime,
  628. IppsBigNumState* pA, IppsBigNumState* pB,
  629. IppsBigNumState* pGX,IppsBigNumState* pGY,IppsBigNumState* pOrder,
  630. int* cofactor,
  631. IppsECCPState* pECC))
  632. IPPAPI(IppStatus, ippsECCPGetOrderBitSize,(int* pBitSize, IppsECCPState* pECC))
  633. IPPAPI(IppStatus, ippsECCPValidate,(int nTrials, IppECResult* pResult, IppsECCPState* pECC,
  634. IppBitSupplier rndFunc, void* pRndParam))
  635. /* EC Point */
  636. IPPAPI(IppStatus, ippsECCPPointGetSize,(int feBitSize, int* pSize))
  637. IPPAPI(IppStatus, ippsECCPPointInit,(int feBitSize, IppsECCPPointState* pPoint))
  638. /* Setup/retrieve point's coordinates */
  639. IPPAPI(IppStatus, ippsECCPSetPoint,(const IppsBigNumState* pX, const IppsBigNumState* pY,
  640. IppsECCPPointState* pPoint, IppsECCPState* pECC))
  641. IPPAPI(IppStatus, ippsECCPSetPointAtInfinity,(IppsECCPPointState* pPoint, IppsECCPState* pECC))
  642. IPPAPI(IppStatus, ippsECCPGetPoint,(IppsBigNumState* pX, IppsBigNumState* pY,
  643. const IppsECCPPointState* pPoint, IppsECCPState* pECC))
  644. /* EC Point Operations */
  645. IPPAPI(IppStatus, ippsECCPCheckPoint,(const IppsECCPPointState* pP,
  646. IppECResult* pResult, IppsECCPState* pECC))
  647. IPPAPI(IppStatus, ippsECCPComparePoint,(const IppsECCPPointState* pP, const IppsECCPPointState* pQ,
  648. IppECResult* pResult, IppsECCPState* pECC))
  649. IPPAPI(IppStatus, ippsECCPNegativePoint,(const IppsECCPPointState* pP,
  650. IppsECCPPointState* pR, IppsECCPState* pECC))
  651. IPPAPI(IppStatus, ippsECCPAddPoint,(const IppsECCPPointState* pP, const IppsECCPPointState* pQ,
  652. IppsECCPPointState* pR, IppsECCPState* pECC))
  653. IPPAPI(IppStatus, ippsECCPMulPointScalar,(const IppsECCPPointState* pP, const IppsBigNumState* pK,
  654. IppsECCPPointState* pR, IppsECCPState* pECC))
  655. /* Key Generation, Setup and Validation */
  656. IPPAPI(IppStatus, ippsECCPGenKeyPair,(IppsBigNumState* pPrivate, IppsECCPPointState* pPublic,
  657. IppsECCPState* pECC,
  658. IppBitSupplier rndFunc, void* pRndParam))
  659. IPPAPI(IppStatus, ippsECCPPublicKey,(const IppsBigNumState* pPrivate,
  660. IppsECCPPointState* pPublic,
  661. IppsECCPState* pECC))
  662. IPPAPI(IppStatus, ippsECCPValidateKeyPair,(const IppsBigNumState* pPrivate, const IppsECCPPointState* pPublic,
  663. IppECResult* pResult,
  664. IppsECCPState* pECC))
  665. IPPAPI(IppStatus, ippsECCPSetKeyPair,(const IppsBigNumState* pPrivate, const IppsECCPPointState* pPublic,
  666. IppBool regular,
  667. IppsECCPState* pECC))
  668. /* Shared Secret (DH scheme ) */
  669. IPPAPI(IppStatus, ippsECCPSharedSecretDH,(const IppsBigNumState* pPrivateA,
  670. const IppsECCPPointState* pPublicB,
  671. IppsBigNumState* pShare,
  672. IppsECCPState* pECC))
  673. IPPAPI(IppStatus, ippsECCPSharedSecretDHC,(const IppsBigNumState* pPrivateA,
  674. const IppsECCPPointState* pPublicB,
  675. IppsBigNumState* pShare,
  676. IppsECCPState* pECC))
  677. /* Sing/Verify */
  678. IPPAPI(IppStatus, ippsECCPSignDSA,(const IppsBigNumState* pMsgDigest,
  679. const IppsBigNumState* pPrivate,
  680. IppsBigNumState* pSignX, IppsBigNumState* pSignY,
  681. IppsECCPState* pECC))
  682. IPPAPI(IppStatus, ippsECCPVerifyDSA,(const IppsBigNumState* pMsgDigest,
  683. const IppsBigNumState* pSignX, const IppsBigNumState* pSignY,
  684. IppECResult* pResult,
  685. IppsECCPState* pECC))
  686. IPPAPI(IppStatus, ippsECCPSignNR,(const IppsBigNumState* pMsgDigest,
  687. const IppsBigNumState* pPrivate,
  688. IppsBigNumState* pSignX, IppsBigNumState* pSignY,
  689. IppsECCPState* pECC))
  690. IPPAPI(IppStatus, ippsECCPVerifyNR,(const IppsBigNumState* pMsgDigest,
  691. const IppsBigNumState* pSignX, const IppsBigNumState* pSignY,
  692. IppECResult* pResult,
  693. IppsECCPState* pECC))
  694. IPPAPI(IppStatus, ippsECCPSignSM2,(const IppsBigNumState* pMsgDigest,
  695. const IppsBigNumState* pRegPrivate,
  696. const IppsBigNumState* pEphPrivate,
  697. IppsBigNumState* pSignR, IppsBigNumState* pSignS,
  698. IppsECCPState* pECC))
  699. IPPAPI(IppStatus, ippsECCPVerifySM2,(const IppsBigNumState* pMsgDigest,
  700. const IppsECCPPointState* pRegPublic,
  701. const IppsBigNumState* pSignR, const IppsBigNumState* pSignS,
  702. IppECResult* pResult,
  703. IppsECCPState* pECC))
  704. #ifdef __cplusplus
  705. }
  706. #endif
  707. #if defined (_IPP_STDCALL_CDECL)
  708. #undef _IPP_STDCALL_CDECL
  709. #define __stdcall __cdecl
  710. #endif
  711. #endif /* __IPPCP_H__ */