ippcp.h 69 KB

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