<!-- 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.14"/> <title>Intel® Enhanced Privacy ID SDK: epid/member/tiny/math/efq2.h 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"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(initResizable); /* @license-end */</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">6.0.1</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.14 --> </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"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ $(document).ready(function(){initNavTree('efq2_8h.html','');}); /* @license-end */ </script> <div id="doc-content"> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">efq2.h File Reference</div> </div> </div><!--header--> <div class="contents"> <p>Definition of EFq2 math. <a href="#details">More...</a></p> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:a9181b09474d800c65fd89aee2c28ebab"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="efq2_8h.html#a9181b09474d800c65fd89aee2c28ebab">EFq2IsInf</a> (<a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const *in)</td></tr> <tr class="memdesc:a9181b09474d800c65fd89aee2c28ebab"><td class="mdescLeft"> </td><td class="mdescRight">Test if a point is infinity. <a href="#a9181b09474d800c65fd89aee2c28ebab">More...</a><br /></td></tr> <tr class="separator:a9181b09474d800c65fd89aee2c28ebab"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:af1da3e171d605db6f5ea0a70dc01ac27"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="efq2_8h.html#af1da3e171d605db6f5ea0a70dc01ac27">EFq2FromAffine</a> (<a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> *result, <a class="el" href="struct_ecc_point_fq2.html">EccPointFq2</a> const *in)</td></tr> <tr class="memdesc:af1da3e171d605db6f5ea0a70dc01ac27"><td class="mdescLeft"> </td><td class="mdescRight">Convert a point from Affine to Jacobi representation. <a href="#af1da3e171d605db6f5ea0a70dc01ac27">More...</a><br /></td></tr> <tr class="separator:af1da3e171d605db6f5ea0a70dc01ac27"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a484e6af5efc2042d865999dac9489684"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="efq2_8h.html#a484e6af5efc2042d865999dac9489684">EFq2ToAffine</a> (<a class="el" href="struct_ecc_point_fq2.html">EccPointFq2</a> *result, <a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const *in)</td></tr> <tr class="memdesc:a484e6af5efc2042d865999dac9489684"><td class="mdescLeft"> </td><td class="mdescRight">Convert a point from Jacobi to Affine representation. <a href="#a484e6af5efc2042d865999dac9489684">More...</a><br /></td></tr> <tr class="separator:a484e6af5efc2042d865999dac9489684"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a1db50d99360ed019ca4dcd2f9bcf210a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="efq2_8h.html#a1db50d99360ed019ca4dcd2f9bcf210a">EFq2Dbl</a> (<a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> *result, <a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const *in)</td></tr> <tr class="memdesc:a1db50d99360ed019ca4dcd2f9bcf210a"><td class="mdescLeft"> </td><td class="mdescRight">Double a point in EFq2. <a href="#a1db50d99360ed019ca4dcd2f9bcf210a">More...</a><br /></td></tr> <tr class="separator:a1db50d99360ed019ca4dcd2f9bcf210a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a6cbfb24b20b29b2e678e259aa6c0e2db"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="efq2_8h.html#a6cbfb24b20b29b2e678e259aa6c0e2db">EFq2Add</a> (<a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> *result, <a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const *left, <a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const *right)</td></tr> <tr class="memdesc:a6cbfb24b20b29b2e678e259aa6c0e2db"><td class="mdescLeft"> </td><td class="mdescRight">Add two points in EFq2. <a href="#a6cbfb24b20b29b2e678e259aa6c0e2db">More...</a><br /></td></tr> <tr class="separator:a6cbfb24b20b29b2e678e259aa6c0e2db"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a977bd074ed0dec943ad0cf19a01c0cf7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="efq2_8h.html#a977bd074ed0dec943ad0cf19a01c0cf7">EFq2Neg</a> (<a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> *result, <a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const *in)</td></tr> <tr class="memdesc:a977bd074ed0dec943ad0cf19a01c0cf7"><td class="mdescLeft"> </td><td class="mdescRight">Negate a point on EFq2. <a href="#a977bd074ed0dec943ad0cf19a01c0cf7">More...</a><br /></td></tr> <tr class="separator:a977bd074ed0dec943ad0cf19a01c0cf7"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a3ad678e3701e1211fa01ddc54f2bc5e4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="efq2_8h.html#a3ad678e3701e1211fa01ddc54f2bc5e4">EFq2MulSSCM</a> (<a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> *result, <a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const *left, <a class="el" href="struct_fp_elem.html">FpElem</a> const *right)</td></tr> <tr class="memdesc:a3ad678e3701e1211fa01ddc54f2bc5e4"><td class="mdescLeft"> </td><td class="mdescRight">Multiply two points in EFq. <a href="#a3ad678e3701e1211fa01ddc54f2bc5e4">More...</a><br /></td></tr> <tr class="separator:a3ad678e3701e1211fa01ddc54f2bc5e4"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2064ea9b48565a164314da4b487aaabd"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="efq2_8h.html#a2064ea9b48565a164314da4b487aaabd">EFq2Eq</a> (<a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const *left, <a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const *right)</td></tr> <tr class="memdesc:a2064ea9b48565a164314da4b487aaabd"><td class="mdescLeft"> </td><td class="mdescRight">Test if two points on EFq2 are equal. <a href="#a2064ea9b48565a164314da4b487aaabd">More...</a><br /></td></tr> <tr class="separator:a2064ea9b48565a164314da4b487aaabd"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a26c35eefbd1ee11a5d078c44d295ff5a"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="efq2_8h.html#a26c35eefbd1ee11a5d078c44d295ff5a">EFq2OnCurve</a> (<a class="el" href="struct_ecc_point_fq2.html">EccPointFq2</a> const *in)</td></tr> <tr class="memdesc:a26c35eefbd1ee11a5d078c44d295ff5a"><td class="mdescLeft"> </td><td class="mdescRight">Test if a point is in EFq2. <a href="#a26c35eefbd1ee11a5d078c44d295ff5a">More...</a><br /></td></tr> <tr class="separator:a26c35eefbd1ee11a5d078c44d295ff5a"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>Definition of EFq2 math. </p> </div><h2 class="groupheader">Function Documentation</h2> <a id="a6cbfb24b20b29b2e678e259aa6c0e2db"></a> <h2 class="memtitle"><span class="permalink"><a href="#a6cbfb24b20b29b2e678e259aa6c0e2db">◆ </a></span>EFq2Add()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void EFq2Add </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> * </td> <td class="paramname"><em>result</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const * </td> <td class="paramname"><em>left</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const * </td> <td class="paramname"><em>right</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Add two points in EFq2. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>of adding left and right. </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">left</td><td>The first operand to be added. </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">right</td><td>The second operand to be added. </td></tr> </table> </dd> </dl> </div> </div> <a id="a1db50d99360ed019ca4dcd2f9bcf210a"></a> <h2 class="memtitle"><span class="permalink"><a href="#a1db50d99360ed019ca4dcd2f9bcf210a">◆ </a></span>EFq2Dbl()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void EFq2Dbl </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> * </td> <td class="paramname"><em>result</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const * </td> <td class="paramname"><em>in</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Double a point in EFq2. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>target. </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>the value to double. </td></tr> </table> </dd> </dl> </div> </div> <a id="a2064ea9b48565a164314da4b487aaabd"></a> <h2 class="memtitle"><span class="permalink"><a href="#a2064ea9b48565a164314da4b487aaabd">◆ </a></span>EFq2Eq()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int EFq2Eq </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const * </td> <td class="paramname"><em>left</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const * </td> <td class="paramname"><em>right</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Test if two points on EFq2 are equal. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[in]</td><td class="paramname">left</td><td>The first operand to be tested. </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">right</td><td>The second operand to be tested. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>A value different from zero (i.e., true) if indeed the values are equal. Zero (i.e., false) otherwise. </dd></dl> </div> </div> <a id="af1da3e171d605db6f5ea0a70dc01ac27"></a> <h2 class="memtitle"><span class="permalink"><a href="#af1da3e171d605db6f5ea0a70dc01ac27">◆ </a></span>EFq2FromAffine()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void EFq2FromAffine </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> * </td> <td class="paramname"><em>result</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="struct_ecc_point_fq2.html">EccPointFq2</a> const * </td> <td class="paramname"><em>in</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Convert a point from Affine to Jacobi representation. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>target. </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>value to set. </td></tr> </table> </dd> </dl> </div> </div> <a id="a9181b09474d800c65fd89aee2c28ebab"></a> <h2 class="memtitle"><span class="permalink"><a href="#a9181b09474d800c65fd89aee2c28ebab">◆ </a></span>EFq2IsInf()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int EFq2IsInf </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const * </td> <td class="paramname"><em>in</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Test if a point is infinity. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>the point to test. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>A value different from zero (i.e., true) indeed the value is infinity. Zero (i.e., false) otherwise. </dd></dl> </div> </div> <a id="a3ad678e3701e1211fa01ddc54f2bc5e4"></a> <h2 class="memtitle"><span class="permalink"><a href="#a3ad678e3701e1211fa01ddc54f2bc5e4">◆ </a></span>EFq2MulSSCM()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void EFq2MulSSCM </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> * </td> <td class="paramname"><em>result</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const * </td> <td class="paramname"><em>left</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> const * </td> <td class="paramname"><em>right</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Multiply two points in EFq. </p> <p>This function is mitigated against software side-channel attacks.</p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>of multiplying left and right. </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">left</td><td>The first operand to be multiplied. </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">right</td><td>The second operand to be multiplied. </td></tr> </table> </dd> </dl> </div> </div> <a id="a977bd074ed0dec943ad0cf19a01c0cf7"></a> <h2 class="memtitle"><span class="permalink"><a href="#a977bd074ed0dec943ad0cf19a01c0cf7">◆ </a></span>EFq2Neg()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void EFq2Neg </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> * </td> <td class="paramname"><em>result</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const * </td> <td class="paramname"><em>in</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Negate a point on EFq2. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>the negative of the element. </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>the element to negate. </td></tr> </table> </dd> </dl> </div> </div> <a id="a26c35eefbd1ee11a5d078c44d295ff5a"></a> <h2 class="memtitle"><span class="permalink"><a href="#a26c35eefbd1ee11a5d078c44d295ff5a">◆ </a></span>EFq2OnCurve()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int EFq2OnCurve </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_ecc_point_fq2.html">EccPointFq2</a> const * </td> <td class="paramname"><em>in</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Test if a point is in EFq2. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>the point to test. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>A value different from zero (i.e., true) indeed the point is on the curve. Zero (i.e., false) otherwise. </dd></dl> </div> </div> <a id="a484e6af5efc2042d865999dac9489684"></a> <h2 class="memtitle"><span class="permalink"><a href="#a484e6af5efc2042d865999dac9489684">◆ </a></span>EFq2ToAffine()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int EFq2ToAffine </td> <td>(</td> <td class="paramtype"><a class="el" href="struct_ecc_point_fq2.html">EccPointFq2</a> * </td> <td class="paramname"><em>result</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="struct_ecc_point_jacobi_fq2.html">EccPointJacobiFq2</a> const * </td> <td class="paramname"><em>in</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Convert a point from Jacobi to Affine representation. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>target. </td></tr> <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>value to set. </td></tr> </table> </dd> </dl> <dl class="section return"><dt>Returns</dt><dd>1 on success, 0 on failure </dd></dl> </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_512d3e62841a8535b716ec4cf8b9e950.html">member</a></li><li class="navelem"><a class="el" href="dir_ea12d375fc1eb79df248c0adf953af4f.html">tiny</a></li><li class="navelem"><a class="el" href="dir_5f2fc2cf41db41de2b55e03ffa7a1d16.html">math</a></li><li class="navelem"><a class="el" href="efq2_8h.html">efq2.h</a></li> <li class="footer"> © 2016-2017 Intel Corporation </li> </ul> </div> </body> </html>