123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205 |
- <!-- HTML header for doxygen 1.8.10-->
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.8.11"/>
- <title>Intel® Enhanced Privacy ID SDK: epid/common/math/pairing.c File Reference</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="dynsections.js"></script>
- <link href="navtree.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="resize.js"></script>
- <script type="text/javascript" src="navtreedata.js"></script>
- <script type="text/javascript" src="navtree.js"></script>
- <script type="text/javascript">
- $(document).ready(initResizable);
- $(window).load(resizeHeight);
- </script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- <link href="epidstyle.css" rel="stylesheet" type="text/css"/>
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname"><a
- onclick="storeLink('index.html')"
- id="projectlink"
- class="index.html"
- href="index.html">Intel® Enhanced Privacy ID SDK</a>
-  <span id="projectnumber">2.0.0</span>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.11 -->
- </div><!-- top -->
- <div id="side-nav" class="ui-resizable side-nav-resizable">
- <div id="nav-tree">
- <div id="nav-tree-contents">
- <div id="nav-sync" class="sync"></div>
- </div>
- </div>
- <div id="splitbar" style="-moz-user-select:none;"
- class="ui-resizable-handle">
- </div>
- </div>
- <script type="text/javascript">
- $(document).ready(function(){initNavTree('pairing_8c.html','');});
- </script>
- <div id="doc-content">
- <div class="header">
- <div class="summary">
- <a href="#nested-classes">Data Structures</a> |
- <a href="#define-members">Macros</a> |
- <a href="#func-members">Functions</a> </div>
- <div class="headertitle">
- <div class="title">pairing.c File Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <p>Pairing implementation.
- <a href="#details">More...</a></p>
- <div class="textblock"><code>#include <limits.h></code><br />
- <code>#include "<a class="el" href="pairing_8h.html">epid/common/math/pairing.h</a>"</code><br />
- <code>#include "epid/common/math/bignum-internal.h"</code><br />
- <code>#include "epid/common/math/finitefield-internal.h"</code><br />
- <code>#include "epid/common/math/ecgroup-internal.h"</code><br />
- <code>#include "epid/common/math/pairing-internal.h"</code><br />
- <code>#include "<a class="el" href="memory_8h.html">epid/common/memory.h</a>"</code><br />
- <code>#include "ext/ipp/include/ippcp.h"</code><br />
- <code>#include "ext/ipp/include/ippcpepid.h"</code><br />
- </div><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
- Data Structures</h2></td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_fq_elem_dat.html">FqElemDat</a></td></tr>
- <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Data for element in Fq. <a href="struct_fq_elem_dat.html#details">More...</a><br /></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_fq2_elem_dat.html">Fq2ElemDat</a></td></tr>
- <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Data for element in Fq2. <a href="struct_fq2_elem_dat.html#details">More...</a><br /></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_fq6_elem_dat.html">Fq6ElemDat</a></td></tr>
- <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Data for element in Fq2^3. <a href="struct_fq6_elem_dat.html#details">More...</a><br /></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_fq12_elem_dat.html">Fq12ElemDat</a></td></tr>
- <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Data for element in Fq2^3^2. <a href="struct_fq12_elem_dat.html#details">More...</a><br /></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
- Macros</h2></td></tr>
- <tr class="memitem:a05172cee9b4cc2d463a7cd7b66d1123b"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="pairing_8c.html#a05172cee9b4cc2d463a7cd7b66d1123b">BREAK_ON_IPP_ERROR</a>(sts, ret) </td></tr>
- <tr class="memdesc:a05172cee9b4cc2d463a7cd7b66d1123b"><td class="mdescLeft"> </td><td class="mdescRight">Handle Ipp Errors with Break. <a href="#a05172cee9b4cc2d463a7cd7b66d1123b">More...</a><br /></td></tr>
- <tr class="separator:a05172cee9b4cc2d463a7cd7b66d1123b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ae10abdda5f1cafa6919c41f0d7f7caf8"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="pairing_8c.html#ae10abdda5f1cafa6919c41f0d7f7caf8">RETURN_ON_IPP_ERROR</a>(sts) </td></tr>
- <tr class="memdesc:ae10abdda5f1cafa6919c41f0d7f7caf8"><td class="mdescLeft"> </td><td class="mdescRight">Handle Ipp Errors with Return. <a href="#ae10abdda5f1cafa6919c41f0d7f7caf8">More...</a><br /></td></tr>
- <tr class="separator:ae10abdda5f1cafa6919c41f0d7f7caf8"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a5638f861b82f1746ea1af0b384ef8ff1"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="pairing_8c.html#a5638f861b82f1746ea1af0b384ef8ff1">BREAK_ON_EPID_ERROR</a>(ret)</td></tr>
- <tr class="memdesc:a5638f861b82f1746ea1af0b384ef8ff1"><td class="mdescLeft"> </td><td class="mdescRight">Handle SDK Error with Break. <a href="#a5638f861b82f1746ea1af0b384ef8ff1">More...</a><br /></td></tr>
- <tr class="separator:a5638f861b82f1746ea1af0b384ef8ff1"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
- Functions</h2></td></tr>
- <tr class="memitem:ga29f79a645871830754d396b9b4a2a0cc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> </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>
- <tr class="memdesc:ga29f79a645871830754d396b9b4a2a0cc"><td class="mdescLeft"> </td><td class="mdescRight">Constructs a new Pairing State. <a href="group___pairing_primitives.html#ga29f79a645871830754d396b9b4a2a0cc">More...</a><br /></td></tr>
- <tr class="separator:ga29f79a645871830754d396b9b4a2a0cc"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:gad54aebdc331d39b73000fdca9e04f94d"><td class="memItemLeft" align="right" valign="top">void </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>
- <tr class="memdesc:gad54aebdc331d39b73000fdca9e04f94d"><td class="mdescLeft"> </td><td class="mdescRight">Frees a previously allocated by PairingState. <a href="group___pairing_primitives.html#gad54aebdc331d39b73000fdca9e04f94d">More...</a><br /></td></tr>
- <tr class="separator:gad54aebdc331d39b73000fdca9e04f94d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ga5dd07d13536e27c37eaeee285297066c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> </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>
- <tr class="memdesc:ga5dd07d13536e27c37eaeee285297066c"><td class="mdescLeft"> </td><td class="mdescRight">Computes an Optimal Ate Pairing for two parameters. <a href="group___pairing_primitives.html#ga5dd07d13536e27c37eaeee285297066c">More...</a><br /></td></tr>
- <tr class="separator:ga5dd07d13536e27c37eaeee285297066c"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <div class="textblock"><p>Pairing implementation. </p>
- </div><h2 class="groupheader">Macro Definition Documentation</h2>
- <a class="anchor" id="a5638f861b82f1746ea1af0b384ef8ff1"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">#define BREAK_ON_EPID_ERROR</td>
- <td>(</td>
- <td class="paramtype"> </td>
- <td class="paramname">ret</td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">if</span> (<a class="code" href="group___error_codes.html#ggafdb27c77c2c4b32c807e326a8a0da360a8a6861e14322ca9193498ffc955537f9">kEpidNoErr</a> != (ret)) { \</div><div class="line"> break; \</div><div class="line"> }</div><div class="ttc" id="group___error_codes_html_ggafdb27c77c2c4b32c807e326a8a0da360a8a6861e14322ca9193498ffc955537f9"><div class="ttname"><a href="group___error_codes.html#ggafdb27c77c2c4b32c807e326a8a0da360a8a6861e14322ca9193498ffc955537f9">kEpidNoErr</a></div><div class="ttdoc">no error </div><div class="ttdef"><b>Definition:</b> errors.h:41</div></div>
- </div><!-- fragment -->
- <p>Handle SDK Error with Break. </p>
- </div>
- </div>
- <a class="anchor" id="a05172cee9b4cc2d463a7cd7b66d1123b"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">#define BREAK_ON_IPP_ERROR</td>
- <td>(</td>
- <td class="paramtype"> </td>
- <td class="paramname">sts, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype"> </td>
- <td class="paramname">ret </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <b>Value:</b><div class="fragment"><div class="line">{ \</div><div class="line"> IppStatus temp_sts = (sts); \</div><div class="line"> if (ippStsNoErr != temp_sts) { \</div><div class="line"> if (ippStsContextMatchErr == temp_sts) { \</div><div class="line"> (ret) = <a class="code" href="group___error_codes.html#ggafdb27c77c2c4b32c807e326a8a0da360a1739ecb620f4bede2e1b84e52a96cee6">kEpidMathErr</a>; \</div><div class="line"> } <span class="keywordflow">else</span> { \</div><div class="line"> (ret) = <a class="code" href="group___error_codes.html#ggafdb27c77c2c4b32c807e326a8a0da360ad134d6cc95a9dcb1b1a9f9c358047cbf">kEpidBadArgErr</a>; \</div><div class="line"> } \</div><div class="line"> break; \</div><div class="line"> } \</div><div class="line"> }</div><div class="ttc" id="group___error_codes_html_ggafdb27c77c2c4b32c807e326a8a0da360a1739ecb620f4bede2e1b84e52a96cee6"><div class="ttname"><a href="group___error_codes.html#ggafdb27c77c2c4b32c807e326a8a0da360a1739ecb620f4bede2e1b84e52a96cee6">kEpidMathErr</a></div><div class="ttdoc">internal math error </div><div class="ttdef"><b>Definition:</b> errors.h:53</div></div>
- <div class="ttc" id="group___error_codes_html_ggafdb27c77c2c4b32c807e326a8a0da360ad134d6cc95a9dcb1b1a9f9c358047cbf"><div class="ttname"><a href="group___error_codes.html#ggafdb27c77c2c4b32c807e326a8a0da360ad134d6cc95a9dcb1b1a9f9c358047cbf">kEpidBadArgErr</a></div><div class="ttdoc">incorrect arg to function </div><div class="ttdef"><b>Definition:</b> errors.h:50</div></div>
- </div><!-- fragment -->
- <p>Handle Ipp Errors with Break. </p>
- </div>
- </div>
- <a class="anchor" id="ae10abdda5f1cafa6919c41f0d7f7caf8"></a>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">#define RETURN_ON_IPP_ERROR</td>
- <td>(</td>
- <td class="paramtype"> </td>
- <td class="paramname">sts</td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <b>Value:</b><div class="fragment"><div class="line">{ \</div><div class="line"> IppStatus temp_sts = (sts); \</div><div class="line"> if (ippStsNoErr != temp_sts) { \</div><div class="line"> if (ippStsContextMatchErr == temp_sts) { \</div><div class="line"> return <a class="code" href="group___error_codes.html#ggafdb27c77c2c4b32c807e326a8a0da360a1739ecb620f4bede2e1b84e52a96cee6">kEpidMathErr</a>; \</div><div class="line"> } <span class="keywordflow">else</span> { \</div><div class="line"> return <a class="code" href="group___error_codes.html#ggafdb27c77c2c4b32c807e326a8a0da360ad134d6cc95a9dcb1b1a9f9c358047cbf">kEpidBadArgErr</a>; \</div><div class="line"> } \</div><div class="line"> } \</div><div class="line"> }</div><div class="ttc" id="group___error_codes_html_ggafdb27c77c2c4b32c807e326a8a0da360a1739ecb620f4bede2e1b84e52a96cee6"><div class="ttname"><a href="group___error_codes.html#ggafdb27c77c2c4b32c807e326a8a0da360a1739ecb620f4bede2e1b84e52a96cee6">kEpidMathErr</a></div><div class="ttdoc">internal math error </div><div class="ttdef"><b>Definition:</b> errors.h:53</div></div>
- <div class="ttc" id="group___error_codes_html_ggafdb27c77c2c4b32c807e326a8a0da360ad134d6cc95a9dcb1b1a9f9c358047cbf"><div class="ttname"><a href="group___error_codes.html#ggafdb27c77c2c4b32c807e326a8a0da360ad134d6cc95a9dcb1b1a9f9c358047cbf">kEpidBadArgErr</a></div><div class="ttdoc">incorrect arg to function </div><div class="ttdef"><b>Definition:</b> errors.h:50</div></div>
- </div><!-- fragment -->
- <p>Handle Ipp Errors with Return. </p>
- </div>
- </div>
- </div><!-- contents -->
- </div><!-- doc-content -->
- <!-- HTML footer for doxygen 1.8.10-->
- <!-- start footer part -->
- <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
- <ul>
- <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="pairing_8c.html">pairing.c</a></li>
- <li class="footer">
- © 2016 Intel Corporation
- </li>
- </ul>
- </div>
- </body>
- </html>
|