group___pairing_primitives.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <!-- HTML header for doxygen 1.8.10-->
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  6. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  7. <meta name="generator" content="Doxygen 1.8.11"/>
  8. <title>Intel&reg; Enhanced Privacy ID SDK: pairing</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="resize.js"></script>
  14. <script type="text/javascript" src="navtreedata.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <script type="text/javascript">
  17. $(document).ready(initResizable);
  18. $(window).load(resizeHeight);
  19. </script>
  20. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  21. <link href="epidstyle.css" rel="stylesheet" type="text/css"/>
  22. </head>
  23. <body>
  24. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  25. <div id="titlearea">
  26. <table cellspacing="0" cellpadding="0">
  27. <tbody>
  28. <tr style="height: 56px;">
  29. <td id="projectalign" style="padding-left: 0.5em;">
  30. <div id="projectname"><a
  31. onclick="storeLink('index.html')"
  32. id="projectlink"
  33. class="index.html"
  34. href="index.html">Intel&reg; Enhanced Privacy ID SDK</a>
  35. &#160;<span id="projectnumber">2.0.0</span>
  36. </div>
  37. </td>
  38. </tr>
  39. </tbody>
  40. </table>
  41. </div>
  42. <!-- end header part -->
  43. <!-- Generated by Doxygen 1.8.11 -->
  44. </div><!-- top -->
  45. <div id="side-nav" class="ui-resizable side-nav-resizable">
  46. <div id="nav-tree">
  47. <div id="nav-tree-contents">
  48. <div id="nav-sync" class="sync"></div>
  49. </div>
  50. </div>
  51. <div id="splitbar" style="-moz-user-select:none;"
  52. class="ui-resizable-handle">
  53. </div>
  54. </div>
  55. <script type="text/javascript">
  56. $(document).ready(function(){initNavTree('group___pairing_primitives.html','');});
  57. </script>
  58. <div id="doc-content">
  59. <div class="header">
  60. <div class="summary">
  61. <a href="#typedef-members">Typedefs</a> &#124;
  62. <a href="#func-members">Functions</a> </div>
  63. <div class="headertitle">
  64. <div class="title">pairing<div class="ingroups"><a class="el" href="group___epid_module.html">epid</a> &raquo; <a class="el" href="group___epid_common.html">common</a> &raquo; <a class="el" href="group___epid_math.html">math</a></div></div> </div>
  65. </div><!--header-->
  66. <div class="contents">
  67. <p>Pairing operations.
  68. <a href="#details">More...</a></p>
  69. <table class="memberdecls">
  70. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
  71. Typedefs</h2></td></tr>
  72. <tr class="memitem:ga3f1fa61d25487f96dfb0ffef4ad35607"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3f1fa61d25487f96dfb0ffef4ad35607"></a>
  73. typedef struct <a class="el" href="group___pairing_primitives.html#ga3f1fa61d25487f96dfb0ffef4ad35607">PairingState</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___pairing_primitives.html#ga3f1fa61d25487f96dfb0ffef4ad35607">PairingState</a></td></tr>
  74. <tr class="memdesc:ga3f1fa61d25487f96dfb0ffef4ad35607"><td class="mdescLeft">&#160;</td><td class="mdescRight">A pairing. <br /></td></tr>
  75. <tr class="separator:ga3f1fa61d25487f96dfb0ffef4ad35607"><td class="memSeparator" colspan="2">&#160;</td></tr>
  76. </table><table class="memberdecls">
  77. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  78. Functions</h2></td></tr>
  79. <tr class="memitem:ga29f79a645871830754d396b9b4a2a0cc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___pairing_primitives.html#ga29f79a645871830754d396b9b4a2a0cc">NewPairingState</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> const *ga, <a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> const *gb, <a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *ff, <a class="el" href="struct_big_num_str.html">BigNumStr</a> const *t, <a class="el" href="stdtypes_8h.html#ad5c9d4ba3dc37783a528b0925dc981a0">bool</a> neg, <a class="el" href="group___pairing_primitives.html#ga3f1fa61d25487f96dfb0ffef4ad35607">PairingState</a> **ps)</td></tr>
  80. <tr class="memdesc:ga29f79a645871830754d396b9b4a2a0cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a new Pairing State. <a href="#ga29f79a645871830754d396b9b4a2a0cc">More...</a><br /></td></tr>
  81. <tr class="separator:ga29f79a645871830754d396b9b4a2a0cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  82. <tr class="memitem:gad54aebdc331d39b73000fdca9e04f94d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___pairing_primitives.html#gad54aebdc331d39b73000fdca9e04f94d">DeletePairingState</a> (<a class="el" href="group___pairing_primitives.html#ga3f1fa61d25487f96dfb0ffef4ad35607">PairingState</a> **ps)</td></tr>
  83. <tr class="memdesc:gad54aebdc331d39b73000fdca9e04f94d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Frees a previously allocated by PairingState. <a href="#gad54aebdc331d39b73000fdca9e04f94d">More...</a><br /></td></tr>
  84. <tr class="separator:gad54aebdc331d39b73000fdca9e04f94d"><td class="memSeparator" colspan="2">&#160;</td></tr>
  85. <tr class="memitem:ga5dd07d13536e27c37eaeee285297066c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___pairing_primitives.html#ga5dd07d13536e27c37eaeee285297066c">Pairing</a> (<a class="el" href="group___pairing_primitives.html#ga3f1fa61d25487f96dfb0ffef4ad35607">PairingState</a> *ps, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *d, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> const *a, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> const *b)</td></tr>
  86. <tr class="memdesc:ga5dd07d13536e27c37eaeee285297066c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes an Optimal Ate Pairing for two parameters. <a href="#ga5dd07d13536e27c37eaeee285297066c">More...</a><br /></td></tr>
  87. <tr class="separator:ga5dd07d13536e27c37eaeee285297066c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  88. </table>
  89. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  90. <p>Pairing operations. </p>
  91. <p>Provides APIs for defining and using a pairing relationship between two Elliptic Curve Groups. </p>
  92. <h2 class="groupheader">Function Documentation</h2>
  93. <a class="anchor" id="gad54aebdc331d39b73000fdca9e04f94d"></a>
  94. <div class="memitem">
  95. <div class="memproto">
  96. <table class="memname">
  97. <tr>
  98. <td class="memname">void DeletePairingState </td>
  99. <td>(</td>
  100. <td class="paramtype"><a class="el" href="group___pairing_primitives.html#ga3f1fa61d25487f96dfb0ffef4ad35607">PairingState</a> **&#160;</td>
  101. <td class="paramname"><em>ps</em></td><td>)</td>
  102. <td></td>
  103. </tr>
  104. </table>
  105. </div><div class="memdoc">
  106. <p>Frees a previously allocated by PairingState. </p>
  107. <p>Frees memory pointed to by pairing state. Nulls the pointer.</p>
  108. <dl class="params"><dt>Parameters</dt><dd>
  109. <table class="params">
  110. <tr><td class="paramdir">[in]</td><td class="paramname">ps</td><td>The Pairing state. Can be NULL.</td></tr>
  111. </table>
  112. </dd>
  113. </dl>
  114. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___pairing_primitives.html#ga29f79a645871830754d396b9b4a2a0cc" title="Constructs a new Pairing State. ">NewPairingState</a> </dd></dl>
  115. </div>
  116. </div>
  117. <a class="anchor" id="ga29f79a645871830754d396b9b4a2a0cc"></a>
  118. <div class="memitem">
  119. <div class="memproto">
  120. <table class="memname">
  121. <tr>
  122. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> NewPairingState </td>
  123. <td>(</td>
  124. <td class="paramtype"><a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> const *&#160;</td>
  125. <td class="paramname"><em>ga</em>, </td>
  126. </tr>
  127. <tr>
  128. <td class="paramkey"></td>
  129. <td></td>
  130. <td class="paramtype"><a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> const *&#160;</td>
  131. <td class="paramname"><em>gb</em>, </td>
  132. </tr>
  133. <tr>
  134. <td class="paramkey"></td>
  135. <td></td>
  136. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> *&#160;</td>
  137. <td class="paramname"><em>ff</em>, </td>
  138. </tr>
  139. <tr>
  140. <td class="paramkey"></td>
  141. <td></td>
  142. <td class="paramtype"><a class="el" href="struct_big_num_str.html">BigNumStr</a> const *&#160;</td>
  143. <td class="paramname"><em>t</em>, </td>
  144. </tr>
  145. <tr>
  146. <td class="paramkey"></td>
  147. <td></td>
  148. <td class="paramtype"><a class="el" href="stdtypes_8h.html#ad5c9d4ba3dc37783a528b0925dc981a0">bool</a>&#160;</td>
  149. <td class="paramname"><em>neg</em>, </td>
  150. </tr>
  151. <tr>
  152. <td class="paramkey"></td>
  153. <td></td>
  154. <td class="paramtype"><a class="el" href="group___pairing_primitives.html#ga3f1fa61d25487f96dfb0ffef4ad35607">PairingState</a> **&#160;</td>
  155. <td class="paramname"><em>ps</em>&#160;</td>
  156. </tr>
  157. <tr>
  158. <td></td>
  159. <td>)</td>
  160. <td></td><td></td>
  161. </tr>
  162. </table>
  163. </div><div class="memdoc">
  164. <p>Constructs a new Pairing State. </p>
  165. <p>Allocates memory and creates a new Pairing State for Optimal Ate Pairing.</p>
  166. <p>Use <a class="el" href="group___pairing_primitives.html#gad54aebdc331d39b73000fdca9e04f94d" title="Frees a previously allocated by PairingState. ">DeletePairingState()</a> to free memory.</p>
  167. <dl class="params"><dt>Parameters</dt><dd>
  168. <table class="params">
  169. <tr><td class="paramdir">[in]</td><td class="paramname">ga</td><td>The EcGroup from which the first parameter of the pairing is taken. </td></tr>
  170. <tr><td class="paramdir">[in]</td><td class="paramname">gb</td><td>The EcGroup from which the second parameter of the pairing is taken. </td></tr>
  171. <tr><td class="paramdir">[in]</td><td class="paramname">ff</td><td>The result finite field. Must be a Fq12 field. </td></tr>
  172. <tr><td class="paramdir">[in]</td><td class="paramname">t</td><td>A positive integer such that 6(t^2) == q - p, where p and q are parameters of G1. </td></tr>
  173. <tr><td class="paramdir">[in]</td><td class="paramname">neg</td><td>Select the alternate "negate" processing path for Optimal Ate Pairing. </td></tr>
  174. <tr><td class="paramdir">[out]</td><td class="paramname">ps</td><td>Newly constructed Pairing State.</td></tr>
  175. </table>
  176. </dd>
  177. </dl>
  178. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
  179. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___pairing_primitives.html#gad54aebdc331d39b73000fdca9e04f94d" title="Frees a previously allocated by PairingState. ">DeletePairingState</a> </dd></dl>
  180. </div>
  181. </div>
  182. <a class="anchor" id="ga5dd07d13536e27c37eaeee285297066c"></a>
  183. <div class="memitem">
  184. <div class="memproto">
  185. <table class="memname">
  186. <tr>
  187. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> Pairing </td>
  188. <td>(</td>
  189. <td class="paramtype"><a class="el" href="group___pairing_primitives.html#ga3f1fa61d25487f96dfb0ffef4ad35607">PairingState</a> *&#160;</td>
  190. <td class="paramname"><em>ps</em>, </td>
  191. </tr>
  192. <tr>
  193. <td class="paramkey"></td>
  194. <td></td>
  195. <td class="paramtype"><a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> *&#160;</td>
  196. <td class="paramname"><em>d</em>, </td>
  197. </tr>
  198. <tr>
  199. <td class="paramkey"></td>
  200. <td></td>
  201. <td class="paramtype"><a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> const *&#160;</td>
  202. <td class="paramname"><em>a</em>, </td>
  203. </tr>
  204. <tr>
  205. <td class="paramkey"></td>
  206. <td></td>
  207. <td class="paramtype"><a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> const *&#160;</td>
  208. <td class="paramname"><em>b</em>&#160;</td>
  209. </tr>
  210. <tr>
  211. <td></td>
  212. <td>)</td>
  213. <td></td><td></td>
  214. </tr>
  215. </table>
  216. </div><div class="memdoc">
  217. <p>Computes an Optimal Ate Pairing for two parameters. </p>
  218. <dl class="params"><dt>Parameters</dt><dd>
  219. <table class="params">
  220. <tr><td class="paramdir">[in]</td><td class="paramname">ps</td><td>The pairing state. </td></tr>
  221. <tr><td class="paramdir">[out]</td><td class="paramname">d</td><td>The result of the pairing. Will be in ff used to create the pairing state. </td></tr>
  222. <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>The first value to pair. Must be in ga used to create ps. </td></tr>
  223. <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>The second value to pair. Must be in gb used to create ps</td></tr>
  224. </table>
  225. </dd>
  226. </dl>
  227. <dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a> </dd></dl>
  228. </div>
  229. </div>
  230. </div><!-- contents -->
  231. </div><!-- doc-content -->
  232. <!-- HTML footer for doxygen 1.8.10-->
  233. <!-- start footer part -->
  234. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  235. <ul>
  236. <li class="footer">
  237. &copy; 2016 Intel Corporation
  238. </li>
  239. </ul>
  240. </div>
  241. </body>
  242. </html>