ecgroup_8c.html 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  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: epid/common/math/ecgroup.c File Reference</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('ecgroup_8c.html','');});
  57. </script>
  58. <div id="doc-content">
  59. <div class="header">
  60. <div class="summary">
  61. <a href="#define-members">Macros</a> &#124;
  62. <a href="#func-members">Functions</a> </div>
  63. <div class="headertitle">
  64. <div class="title">ecgroup.c File Reference</div> </div>
  65. </div><!--header-->
  66. <div class="contents">
  67. <p>Elliptic curve group implementation.
  68. <a href="#details">More...</a></p>
  69. <div class="textblock"><code>#include &lt;string.h&gt;</code><br />
  70. <code>#include &quot;epid/common/math/bignum-internal.h&quot;</code><br />
  71. <code>#include &quot;epid/common/math/ecgroup-internal.h&quot;</code><br />
  72. <code>#include &quot;<a class="el" href="ecgroup_8h.html">epid/common/math/ecgroup.h</a>&quot;</code><br />
  73. <code>#include &quot;epid/common/math/finitefield-internal.h&quot;</code><br />
  74. <code>#include &quot;<a class="el" href="memory_8h.html">epid/common/memory.h</a>&quot;</code><br />
  75. <code>#include &quot;ext/ipp/include/ippcp.h&quot;</code><br />
  76. <code>#include &quot;ext/ipp/include/ippcpepid.h&quot;</code><br />
  77. </div><table class="memberdecls">
  78. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
  79. Macros</h2></td></tr>
  80. <tr class="memitem:a26d8b2ac362504939125b9196abc8aaa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a26d8b2ac362504939125b9196abc8aaa"></a>
  81. #define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ecgroup_8c.html#a26d8b2ac362504939125b9196abc8aaa">EPID_ECHASH_WATCHDOG</a>&#160;&#160;&#160;(50)</td></tr>
  82. <tr class="memdesc:a26d8b2ac362504939125b9196abc8aaa"><td class="mdescLeft">&#160;</td><td class="mdescRight">The number of attempts to hash a message to an element. <br /></td></tr>
  83. <tr class="separator:a26d8b2ac362504939125b9196abc8aaa"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. </table><table class="memberdecls">
  85. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  86. Functions</h2></td></tr>
  87. <tr class="memitem:gaf4e23677dd378ef2e0cf55df79cbdb62"><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___ec_group_primitives.html#gaf4e23677dd378ef2e0cf55df79cbdb62">NewEcGroup</a> (<a class="el" href="group___finite_field_primitives.html#gab281b24e336a8b3d7d90079d862d969e">FiniteField</a> const *ff, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *a, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *b, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *x, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *y, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *order, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *cofactor, <a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> **g)</td></tr>
  88. <tr class="memdesc:gaf4e23677dd378ef2e0cf55df79cbdb62"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a new EcGroup. <a href="group___ec_group_primitives.html#gaf4e23677dd378ef2e0cf55df79cbdb62">More...</a><br /></td></tr>
  89. <tr class="separator:gaf4e23677dd378ef2e0cf55df79cbdb62"><td class="memSeparator" colspan="2">&#160;</td></tr>
  90. <tr class="memitem:gab7af276256c27610eda85ff432b846ea"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ec_group_primitives.html#gab7af276256c27610eda85ff432b846ea">DeleteEcGroup</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> **g)</td></tr>
  91. <tr class="memdesc:gab7af276256c27610eda85ff432b846ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a previously allocated EcGroup. <a href="group___ec_group_primitives.html#gab7af276256c27610eda85ff432b846ea">More...</a><br /></td></tr>
  92. <tr class="separator:gab7af276256c27610eda85ff432b846ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. <tr class="memitem:ga6417b0ce72ba96de00c329e322fec7fb"><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___ec_group_primitives.html#ga6417b0ce72ba96de00c329e322fec7fb">NewEcPoint</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> const *g, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> **p)</td></tr>
  94. <tr class="memdesc:ga6417b0ce72ba96de00c329e322fec7fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new EcPoint. <a href="group___ec_group_primitives.html#ga6417b0ce72ba96de00c329e322fec7fb">More...</a><br /></td></tr>
  95. <tr class="separator:ga6417b0ce72ba96de00c329e322fec7fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  96. <tr class="memitem:ga8cb086d792bffb79b3ca07e6ca4ce0e7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___ec_group_primitives.html#ga8cb086d792bffb79b3ca07e6ca4ce0e7">DeleteEcPoint</a> (<a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> **p)</td></tr>
  97. <tr class="memdesc:ga8cb086d792bffb79b3ca07e6ca4ce0e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a previously allocated EcPoint. <a href="group___ec_group_primitives.html#ga8cb086d792bffb79b3ca07e6ca4ce0e7">More...</a><br /></td></tr>
  98. <tr class="separator:ga8cb086d792bffb79b3ca07e6ca4ce0e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. <tr class="memitem:ac0a2b4aa2484318938498e29c8ee4a9b"><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="ecgroup_8c.html#ac0a2b4aa2484318938498e29c8ee4a9b">eccontains</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *g, void const *p_str, size_t strlen, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> *p, <a class="el" href="stdtypes_8h.html#ad5c9d4ba3dc37783a528b0925dc981a0">bool</a> *in_group)</td></tr>
  100. <tr class="memdesc:ac0a2b4aa2484318938498e29c8ee4a9b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check and initialize element if it is in elliptic curve group. <a href="#ac0a2b4aa2484318938498e29c8ee4a9b">More...</a><br /></td></tr>
  101. <tr class="separator:ac0a2b4aa2484318938498e29c8ee4a9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
  102. <tr class="memitem:ga2d433f567fa2419465a49604f4da21ad"><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___ec_group_primitives.html#ga2d433f567fa2419465a49604f4da21ad">ReadEcPoint</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *g, void const *p_str, size_t strlen, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> *p)</td></tr>
  103. <tr class="memdesc:ga2d433f567fa2419465a49604f4da21ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deserializes an EcPoint from a string. <a href="group___ec_group_primitives.html#ga2d433f567fa2419465a49604f4da21ad">More...</a><br /></td></tr>
  104. <tr class="separator:ga2d433f567fa2419465a49604f4da21ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. <tr class="memitem:ga4bb7d6691ffbb6e947c1068453e27fbd"><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___ec_group_primitives.html#ga4bb7d6691ffbb6e947c1068453e27fbd">WriteEcPoint</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *g, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> const *p, void *p_str, size_t strlen)</td></tr>
  106. <tr class="memdesc:ga4bb7d6691ffbb6e947c1068453e27fbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serializes an EcPoint to a string. <a href="group___ec_group_primitives.html#ga4bb7d6691ffbb6e947c1068453e27fbd">More...</a><br /></td></tr>
  107. <tr class="separator:ga4bb7d6691ffbb6e947c1068453e27fbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
  108. <tr class="memitem:ga25c9013cc76907d73765eb7a96aa8c96"><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___ec_group_primitives.html#ga25c9013cc76907d73765eb7a96aa8c96">EcMul</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *g, <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, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> *r)</td></tr>
  109. <tr class="memdesc:ga25c9013cc76907d73765eb7a96aa8c96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multiplies two elements in an elliptic curve group. <a href="group___ec_group_primitives.html#ga25c9013cc76907d73765eb7a96aa8c96">More...</a><br /></td></tr>
  110. <tr class="separator:ga25c9013cc76907d73765eb7a96aa8c96"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. <tr class="memitem:ga01bf8d6fa60a2e445490966b3a06c270"><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___ec_group_primitives.html#ga01bf8d6fa60a2e445490966b3a06c270">EcExp</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *g, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> const *a, <a class="el" href="struct_big_num_str.html">BigNumStr</a> const *b, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> *r)</td></tr>
  112. <tr class="memdesc:ga01bf8d6fa60a2e445490966b3a06c270"><td class="mdescLeft">&#160;</td><td class="mdescRight">Raises a point in an elliptic curve group to a power. <a href="group___ec_group_primitives.html#ga01bf8d6fa60a2e445490966b3a06c270">More...</a><br /></td></tr>
  113. <tr class="separator:ga01bf8d6fa60a2e445490966b3a06c270"><td class="memSeparator" colspan="2">&#160;</td></tr>
  114. <tr class="memitem:gaf3b6a548aa6f0d4f028a14feca251f57"><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___ec_group_primitives.html#gaf3b6a548aa6f0d4f028a14feca251f57">EcSscmExp</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *g, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> const *a, <a class="el" href="struct_big_num_str.html">BigNumStr</a> const *b, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> *r)</td></tr>
  115. <tr class="memdesc:gaf3b6a548aa6f0d4f028a14feca251f57"><td class="mdescLeft">&#160;</td><td class="mdescRight">Software side-channel mitigated implementation of EcExp. <a href="group___ec_group_primitives.html#gaf3b6a548aa6f0d4f028a14feca251f57">More...</a><br /></td></tr>
  116. <tr class="separator:gaf3b6a548aa6f0d4f028a14feca251f57"><td class="memSeparator" colspan="2">&#160;</td></tr>
  117. <tr class="memitem:gae96c38e004ccd2211290ad6e66415ec4"><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___ec_group_primitives.html#gae96c38e004ccd2211290ad6e66415ec4">EcMultiExp</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *g, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> const **a, <a class="el" href="struct_big_num_str.html">BigNumStr</a> const **b, size_t m, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> *r)</td></tr>
  118. <tr class="memdesc:gae96c38e004ccd2211290ad6e66415ec4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multi-exponentiates elements in elliptic curve group. <a href="group___ec_group_primitives.html#gae96c38e004ccd2211290ad6e66415ec4">More...</a><br /></td></tr>
  119. <tr class="separator:gae96c38e004ccd2211290ad6e66415ec4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  120. <tr class="memitem:ga40e3431d3dbe8cf7a65ada7b7811cba4"><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___ec_group_primitives.html#ga40e3431d3dbe8cf7a65ada7b7811cba4">EcSscmMultiExp</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *g, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> const **a, <a class="el" href="struct_big_num_str.html">BigNumStr</a> const **b, size_t m, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> *r)</td></tr>
  121. <tr class="memdesc:ga40e3431d3dbe8cf7a65ada7b7811cba4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Software side-channel mitigated implementation of EcMultiExp. <a href="group___ec_group_primitives.html#ga40e3431d3dbe8cf7a65ada7b7811cba4">More...</a><br /></td></tr>
  122. <tr class="separator:ga40e3431d3dbe8cf7a65ada7b7811cba4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  123. <tr class="memitem:ga3f96c43d14d24de0f7a5e214aef64196"><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___ec_group_primitives.html#ga3f96c43d14d24de0f7a5e214aef64196">EcGetRandom</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *g, <a class="el" href="group___epid_common.html#ga6119a2c0323a3fca9e502b24bc378c2c">BitSupplier</a> rnd_func, void *rnd_func_param, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> *r)</td></tr>
  124. <tr class="memdesc:ga3f96c43d14d24de0f7a5e214aef64196"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generates a random element from an elliptic curve group. <a href="group___ec_group_primitives.html#ga3f96c43d14d24de0f7a5e214aef64196">More...</a><br /></td></tr>
  125. <tr class="separator:ga3f96c43d14d24de0f7a5e214aef64196"><td class="memSeparator" colspan="2">&#160;</td></tr>
  126. <tr class="memitem:ga4d0f32aede3066eae500241b387bd970"><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___ec_group_primitives.html#ga4d0f32aede3066eae500241b387bd970">EcInGroup</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *g, void const *p_str, size_t strlen, <a class="el" href="stdtypes_8h.html#ad5c9d4ba3dc37783a528b0925dc981a0">bool</a> *in_group)</td></tr>
  127. <tr class="memdesc:ga4d0f32aede3066eae500241b387bd970"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if a point is in an elliptic curve group. <a href="group___ec_group_primitives.html#ga4d0f32aede3066eae500241b387bd970">More...</a><br /></td></tr>
  128. <tr class="separator:ga4d0f32aede3066eae500241b387bd970"><td class="memSeparator" colspan="2">&#160;</td></tr>
  129. <tr class="memitem:gadc22ee07864a7ee681a881029b69d76a"><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___ec_group_primitives.html#gadc22ee07864a7ee681a881029b69d76a">EcHash</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *g, void const *msg, size_t msg_len, <a class="el" href="group___epid_types.html#ga5e450438f6f9a5eacd0cf5ce354ec890">HashAlg</a> hash_alg, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> *r)</td></tr>
  130. <tr class="memdesc:gadc22ee07864a7ee681a881029b69d76a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Hashes an arbitrary message to an element in an elliptic curve group. <a href="group___ec_group_primitives.html#gadc22ee07864a7ee681a881029b69d76a">More...</a><br /></td></tr>
  131. <tr class="separator:gadc22ee07864a7ee681a881029b69d76a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  132. <tr class="memitem:ga8a6114a48214a327d4ec04fd25e5940e"><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___ec_group_primitives.html#ga8a6114a48214a327d4ec04fd25e5940e">EcMakePoint</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *g, <a class="el" href="group___finite_field_primitives.html#ga6cff5c7c06b07a87442b810ccc0a86fa">FfElement</a> const *x, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> *r)</td></tr>
  133. <tr class="memdesc:ga8a6114a48214a327d4ec04fd25e5940e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets an EcPoint variable to a point on a curve. <a href="group___ec_group_primitives.html#ga8a6114a48214a327d4ec04fd25e5940e">More...</a><br /></td></tr>
  134. <tr class="separator:ga8a6114a48214a327d4ec04fd25e5940e"><td class="memSeparator" colspan="2">&#160;</td></tr>
  135. <tr class="memitem:ga0b6d7a3398251e9352fb29ef4abef466"><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___ec_group_primitives.html#ga0b6d7a3398251e9352fb29ef4abef466">EcInverse</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *g, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> const *p, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> *r)</td></tr>
  136. <tr class="memdesc:ga0b6d7a3398251e9352fb29ef4abef466"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes the additive inverse of an EcPoint. <a href="group___ec_group_primitives.html#ga0b6d7a3398251e9352fb29ef4abef466">More...</a><br /></td></tr>
  137. <tr class="separator:ga0b6d7a3398251e9352fb29ef4abef466"><td class="memSeparator" colspan="2">&#160;</td></tr>
  138. <tr class="memitem:gad3b3c63c48fa24e8dea07837b05bc061"><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___ec_group_primitives.html#gad3b3c63c48fa24e8dea07837b05bc061">EcIsEqual</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *g, <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, <a class="el" href="stdtypes_8h.html#ad5c9d4ba3dc37783a528b0925dc981a0">bool</a> *is_equal)</td></tr>
  139. <tr class="memdesc:gad3b3c63c48fa24e8dea07837b05bc061"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if two EcPoints are equal. <a href="group___ec_group_primitives.html#gad3b3c63c48fa24e8dea07837b05bc061">More...</a><br /></td></tr>
  140. <tr class="separator:gad3b3c63c48fa24e8dea07837b05bc061"><td class="memSeparator" colspan="2">&#160;</td></tr>
  141. <tr class="memitem:ga9cf15b34bc4ff12e58b169dd989d8210"><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___ec_group_primitives.html#ga9cf15b34bc4ff12e58b169dd989d8210">EcIsIdentity</a> (<a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *g, <a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> const *p, <a class="el" href="stdtypes_8h.html#ad5c9d4ba3dc37783a528b0925dc981a0">bool</a> *is_identity)</td></tr>
  142. <tr class="memdesc:ga9cf15b34bc4ff12e58b169dd989d8210"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if an EcPoint is the identity element. <a href="group___ec_group_primitives.html#ga9cf15b34bc4ff12e58b169dd989d8210">More...</a><br /></td></tr>
  143. <tr class="separator:ga9cf15b34bc4ff12e58b169dd989d8210"><td class="memSeparator" colspan="2">&#160;</td></tr>
  144. </table>
  145. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  146. <div class="textblock"><p>Elliptic curve group implementation. </p>
  147. </div><h2 class="groupheader">Function Documentation</h2>
  148. <a class="anchor" id="ac0a2b4aa2484318938498e29c8ee4a9b"></a>
  149. <div class="memitem">
  150. <div class="memproto">
  151. <table class="memname">
  152. <tr>
  153. <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> eccontains </td>
  154. <td>(</td>
  155. <td class="paramtype"><a class="el" href="group___ec_group_primitives.html#gac91c5a7623c17a868dd15b2e9aaf7159">EcGroup</a> *&#160;</td>
  156. <td class="paramname"><em>g</em>, </td>
  157. </tr>
  158. <tr>
  159. <td class="paramkey"></td>
  160. <td></td>
  161. <td class="paramtype">void const *&#160;</td>
  162. <td class="paramname"><em>p_str</em>, </td>
  163. </tr>
  164. <tr>
  165. <td class="paramkey"></td>
  166. <td></td>
  167. <td class="paramtype">size_t&#160;</td>
  168. <td class="paramname"><em>strlen</em>, </td>
  169. </tr>
  170. <tr>
  171. <td class="paramkey"></td>
  172. <td></td>
  173. <td class="paramtype"><a class="el" href="group___ec_group_primitives.html#ga85c1d5e106031b385a6e23e598ac98fa">EcPoint</a> *&#160;</td>
  174. <td class="paramname"><em>p</em>, </td>
  175. </tr>
  176. <tr>
  177. <td class="paramkey"></td>
  178. <td></td>
  179. <td class="paramtype"><a class="el" href="stdtypes_8h.html#ad5c9d4ba3dc37783a528b0925dc981a0">bool</a> *&#160;</td>
  180. <td class="paramname"><em>in_group</em>&#160;</td>
  181. </tr>
  182. <tr>
  183. <td></td>
  184. <td>)</td>
  185. <td></td><td></td>
  186. </tr>
  187. </table>
  188. </div><div class="memdoc">
  189. <p>Check and initialize element if it is in elliptic curve group. </p>
  190. <p>This is internal function. Takes a value p as input. If p is indeed an element of g, it outputs true, otherwise, it outputs false.</p>
  191. <p>This is only used to check if input buffer are actually valid elements in group. If p is in g, this fills p and initializes it to internal FfElement format.</p>
  192. <dl class="params"><dt>Parameters</dt><dd>
  193. <table class="params">
  194. <tr><td class="paramdir">[in]</td><td class="paramname">g</td><td>The eliptic curve group in which to perform the check </td></tr>
  195. <tr><td class="paramdir">[in]</td><td class="paramname">p_str</td><td>Serialized eliptic curve group element to check </td></tr>
  196. <tr><td class="paramdir">[in]</td><td class="paramname">strlen</td><td>The size of p_str in bytes. </td></tr>
  197. <tr><td class="paramdir">[out]</td><td class="paramname">p</td><td>Deserialized value of p_str </td></tr>
  198. <tr><td class="paramdir">[out]</td><td class="paramname">in_group</td><td>Result of the check</td></tr>
  199. </table>
  200. </dd>
  201. </dl>
  202. <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>
  203. <dl class="section see"><dt>See also</dt><dd><a class="el" href="group___ec_group_primitives.html#ga6417b0ce72ba96de00c329e322fec7fb" title="Creates a new EcPoint. ">NewEcPoint</a> </dd></dl>
  204. </div>
  205. </div>
  206. </div><!-- contents -->
  207. </div><!-- doc-content -->
  208. <!-- HTML footer for doxygen 1.8.10-->
  209. <!-- start footer part -->
  210. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  211. <ul>
  212. <li class="navelem"><a class="el" href="dir_12b90d9c027aaf878a834df729679a56.html">epid</a></li><li class="navelem"><a class="el" href="dir_f6bef457d5f671b6e774bfccc16651f6.html">common</a></li><li class="navelem"><a class="el" href="dir_f169ebf8da29290a918fa4b3f7151050.html">math</a></li><li class="navelem"><a class="el" href="ecgroup_8c.html">ecgroup.c</a></li>
  213. <li class="footer">
  214. &copy; 2016 Intel Corporation
  215. </li>
  216. </ul>
  217. </div>
  218. </body>
  219. </html>