blob: d56429a56253f38823820683b1e40436274fd46a [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>AMCL: ecp2_BLS381.h Source File</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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.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">AMCL
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_df7310d1a865926cc859bcfb1880083f.html">include</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">ecp2_BLS381.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="ecp2__BLS381_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> Licensed to the Apache Software Foundation (ASF) under one</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> or more contributor license agreements. See the NOTICE file</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> distributed with this work for additional information</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> regarding copyright ownership. The ASF licenses this file</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> to you under the Apache License, Version 2.0 (the</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> &quot;License&quot;); you may not use this file except in compliance</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> with the License. You may obtain a copy of the License at</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> http://www.apache.org/licenses/LICENSE-2.0</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> Unless required by applicable law or agreed to in writing,</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> software distributed under the License is distributed on an</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> KIND, either express or implied. See the License for the</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> specific language governing permissions and limitations</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> under the License.</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#ifndef ECP2_BLS381_H</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#define ECP2_BLS381_H</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="fp2__BLS381_8h.html">fp2_BLS381.h</a>&quot;</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;<span class="preprocessor">#include &quot;config_curve_BLS381.h&quot;</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="structECP2__BLS381.html"> 37</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct</span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160;{</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;<span class="comment">// int inf; /**&lt; Infinity Flag */</span></div><div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="structECP2__BLS381.html#a334e19b20dc35a8117e105bd4c519709"> 40</a></span>&#160; <a class="code" href="structFP2__BLS381.html">FP2_BLS381</a> <a class="code" href="structECP2__BLS381.html#a334e19b20dc35a8117e105bd4c519709">x</a>; </div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="structECP2__BLS381.html#ae8424716de5d48342c0ee5d79d40948a"> 41</a></span>&#160; <a class="code" href="structFP2__BLS381.html">FP2_BLS381</a> <a class="code" href="structECP2__BLS381.html#ae8424716de5d48342c0ee5d79d40948a">y</a>; </div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="structECP2__BLS381.html#a0df8d468341bc1ce4debf108b94c3479"> 42</a></span>&#160; <a class="code" href="structFP2__BLS381.html">FP2_BLS381</a> <a class="code" href="structECP2__BLS381.html#a0df8d468341bc1ce4debf108b94c3479">z</a>; </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160;} <a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a>;</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160;<span class="comment">/* Curve Params - see rom_zzz.c */</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="ecp2__BLS381_8h.html#a8e691e13173dea68aa5c3f550e0fb130">CURVE_A_BLS381</a>; </div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">int</span> <a class="code" href="ecp2__BLS381_8h.html#aef116dd1c5955c3e86fd9b22c39e3841">CURVE_B_I_BLS381</a>; </div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="big__384__58_8h.html#ab8c68dbf8612f8f005c402a289c5da31">BIG_384_58</a> <a class="code" href="ecp2__BLS381_8h.html#a6cd99de9ded2845d418ca1c79fb95417">CURVE_B_BLS381</a>; </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="big__384__58_8h.html#ab8c68dbf8612f8f005c402a289c5da31">BIG_384_58</a> <a class="code" href="ecp2__BLS381_8h.html#ab0db0beafd90432eb12fb013f5466d68">CURVE_Order_BLS381</a>; </div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="big__384__58_8h.html#ab8c68dbf8612f8f005c402a289c5da31">BIG_384_58</a> <a class="code" href="ecp2__BLS381_8h.html#a97ea26d6174e376a165ff28ea07cc2e6">CURVE_Cof_BLS381</a>; </div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="big__384__58_8h.html#ab8c68dbf8612f8f005c402a289c5da31">BIG_384_58</a> <a class="code" href="ecp2__BLS381_8h.html#ae6e182a64e658ae2f24b4ce059dc1a7c">CURVE_Bnx_BLS381</a>; </div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="big__384__58_8h.html#ab8c68dbf8612f8f005c402a289c5da31">BIG_384_58</a> <a class="code" href="ecp2__BLS381_8h.html#a1214b4014ddfebcc990efe1f496d0698">Fra_BLS381</a>; </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="big__384__58_8h.html#ab8c68dbf8612f8f005c402a289c5da31">BIG_384_58</a> <a class="code" href="ecp2__BLS381_8h.html#a80db75c3cbe43f3353897b39d21e4f34">Frb_BLS381</a>; </div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;<span class="comment">/* Generator point on G1 */</span></div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="big__384__58_8h.html#ab8c68dbf8612f8f005c402a289c5da31">BIG_384_58</a> <a class="code" href="ecp2__BLS381_8h.html#a4a7bbe17c22d85afe7ec7fe1a08aab4d">CURVE_Gx_BLS381</a>; </div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="big__384__58_8h.html#ab8c68dbf8612f8f005c402a289c5da31">BIG_384_58</a> <a class="code" href="ecp2__BLS381_8h.html#a0ff01e0d2b4a0f06e9a8ac6c8346687c">CURVE_Gy_BLS381</a>; </div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;<span class="comment">/* For Pairings only */</span></div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160;<span class="comment">/* Generator point on G2 */</span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="big__384__58_8h.html#ab8c68dbf8612f8f005c402a289c5da31">BIG_384_58</a> <a class="code" href="ecp2__BLS381_8h.html#a6d14c89595a7ed214cd12c0148688d2c">CURVE_Pxa_BLS381</a>; </div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="big__384__58_8h.html#ab8c68dbf8612f8f005c402a289c5da31">BIG_384_58</a> <a class="code" href="ecp2__BLS381_8h.html#aa3b577d06eb5c4ac47dea6f19de11e1f">CURVE_Pxb_BLS381</a>; </div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="big__384__58_8h.html#ab8c68dbf8612f8f005c402a289c5da31">BIG_384_58</a> <a class="code" href="ecp2__BLS381_8h.html#a958833196ced4525eef425ae31c17931">CURVE_Pya_BLS381</a>; </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;<span class="keyword">extern</span> <span class="keyword">const</span> <a class="code" href="big__384__58_8h.html#ab8c68dbf8612f8f005c402a289c5da31">BIG_384_58</a> <a class="code" href="ecp2__BLS381_8h.html#a035ac94764dc5dd600c2d57e599456d0">CURVE_Pyb_BLS381</a>; </div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<span class="comment">/* ECP2 E(Fp2) prototypes */</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="ecp2__BLS381_8h.html#a4a28bbafc3034b9d0398c70326b24acf">ECP2_BLS381_isinf</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="ecp2__BLS381_8h.html#ad3f1993e5db7426164444406682d0c61">ECP2_BLS381_copy</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P,<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *Q);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="ecp2__BLS381_8h.html#a522906a3d016800143b3a2501a753c99">ECP2_BLS381_inf</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="ecp2__BLS381_8h.html#aea45b0695afe03966bb22dddaaae6176">ECP2_BLS381_equals</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P,<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *Q);</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="ecp2__BLS381_8h.html#a56267fe030680d3201f411e7111493d7">ECP2_BLS381_affine</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P);</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="ecp2__BLS381_8h.html#a38091f2eeb30632ecbd3813caff7df9e">ECP2_BLS381_get</a>(<a class="code" href="structFP2__BLS381.html">FP2_BLS381</a> *x,<a class="code" href="structFP2__BLS381.html">FP2_BLS381</a> *y,<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P);</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="ecp2__BLS381_8h.html#af722a098ce6831fbf999929870dd548f">ECP2_BLS381_output</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P);</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="ecp2__BLS381_8h.html#ad5159dd59c2b3744cf04c1d086a0d9ab">ECP2_BLS381_outputxyz</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P);</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="ecp2__BLS381_8h.html#a0d91bc6967f5690ee224ed7959c1216f">ECP2_BLS381_toOctet</a>(<a class="code" href="structoctet.html">octet</a> *S,<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P);</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="ecp2__BLS381_8h.html#abe582b085f5c69960213da026064816c">ECP2_BLS381_fromOctet</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P,<a class="code" href="structoctet.html">octet</a> *S);</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="ecp2__BLS381_8h.html#a3e25883a298d369d138992d9c539d324">ECP2_BLS381_rhs</a>(<a class="code" href="structFP2__BLS381.html">FP2_BLS381</a> *r,<a class="code" href="structFP2__BLS381.html">FP2_BLS381</a> *x);</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="ecp2__BLS381_8h.html#abaf387b0d44d6132252b204bbd0599a8">ECP2_BLS381_set</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P,<a class="code" href="structFP2__BLS381.html">FP2_BLS381</a> *x,<a class="code" href="structFP2__BLS381.html">FP2_BLS381</a> *y);</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="ecp2__BLS381_8h.html#a38b5fb3b588c7b5b47c0b0535c5a1d08">ECP2_BLS381_setx</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P,<a class="code" href="structFP2__BLS381.html">FP2_BLS381</a> *x);</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="ecp2__BLS381_8h.html#a78c4f7d1e2efcc015386aaa52fc49e4d">ECP2_BLS381_neg</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P);</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="ecp2__BLS381_8h.html#a8767288711365883432ac2d9a5cb6af0">ECP2_BLS381_dbl</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P);</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">int</span> <a class="code" href="ecp2__BLS381_8h.html#a4939a57920bc1af14ea89ba784e7a126">ECP2_BLS381_add</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P,<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *Q);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="ecp2__BLS381_8h.html#a432ef0bb3613a8e0049a105f87e16e48">ECP2_BLS381_sub</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P,<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *Q);</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="ecp2__BLS381_8h.html#ae3ae50bdca827a70f1c36b7a77be6bd2">ECP2_BLS381_mul</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P,<a class="code" href="big__384__58_8h.html#ab8c68dbf8612f8f005c402a289c5da31">BIG_384_58</a> b);</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="ecp2__BLS381_8h.html#a624221d2365056ca9394a8d9cd8fd6b5">ECP2_BLS381_frob</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P,<a class="code" href="structFP2__BLS381.html">FP2_BLS381</a> *f);</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="ecp2__BLS381_8h.html#a76371fcdc4cc04393d67b740a44a90cd">ECP2_BLS381_mul4</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P,<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *Q,<a class="code" href="big__384__58_8h.html#ab8c68dbf8612f8f005c402a289c5da31">BIG_384_58</a> *b);</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="ecp2__BLS381_8h.html#aeb7753e333275c09ffd4755c80cf78ca">ECP2_BLS381_mapit</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *P,<a class="code" href="structoctet.html">octet</a> *w);</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160;</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span> <a class="code" href="ecp2__BLS381_8h.html#ac1187e5720d09ad969800e9a50cc477e">ECP2_BLS381_generator</a>(<a class="code" href="structECP2__BLS381.html">ECP2_BLS381</a> *G);</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160;</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="ecp2__BLS381_8h_html_a624221d2365056ca9394a8d9cd8fd6b5"><div class="ttname"><a href="ecp2__BLS381_8h.html#a624221d2365056ca9394a8d9cd8fd6b5">ECP2_BLS381_frob</a></div><div class="ttdeci">void ECP2_BLS381_frob(ECP2_BLS381 *P, FP2_BLS381 *f)</div><div class="ttdoc">Multiplies an ECP2 instance P by the internal modulus p, using precalculated Frobenius constant f.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:518</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a38091f2eeb30632ecbd3813caff7df9e"><div class="ttname"><a href="ecp2__BLS381_8h.html#a38091f2eeb30632ecbd3813caff7df9e">ECP2_BLS381_get</a></div><div class="ttdeci">int ECP2_BLS381_get(FP2_BLS381 *x, FP2_BLS381 *y, ECP2_BLS381 *P)</div><div class="ttdoc">Extract x and y coordinates of an ECP2 point P.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:129</div></div>
<div class="ttc" id="structFP2__BLS381_html"><div class="ttname"><a href="structFP2__BLS381.html">FP2_BLS381</a></div><div class="ttdoc">FP2 Structure - quadratic extension field.</div><div class="ttdef"><b>Definition:</b> fp2_BLS381.h:36</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_ac1187e5720d09ad969800e9a50cc477e"><div class="ttname"><a href="ecp2__BLS381_8h.html#ac1187e5720d09ad969800e9a50cc477e">ECP2_BLS381_generator</a></div><div class="ttdeci">void ECP2_BLS381_generator(ECP2_BLS381 *G)</div><div class="ttdoc">Get Group Generator from ROM.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:714</div></div>
<div class="ttc" id="big__384__58_8h_html_ab8c68dbf8612f8f005c402a289c5da31"><div class="ttname"><a href="big__384__58_8h.html#ab8c68dbf8612f8f005c402a289c5da31">BIG_384_58</a></div><div class="ttdeci">chunk BIG_384_58[NLEN_384_58]</div><div class="ttdef"><b>Definition:</b> big_384_58.h:58</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a6d14c89595a7ed214cd12c0148688d2c"><div class="ttname"><a href="ecp2__BLS381_8h.html#a6d14c89595a7ed214cd12c0148688d2c">CURVE_Pxa_BLS381</a></div><div class="ttdeci">const BIG_384_58 CURVE_Pxa_BLS381</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_ab0db0beafd90432eb12fb013f5466d68"><div class="ttname"><a href="ecp2__BLS381_8h.html#ab0db0beafd90432eb12fb013f5466d68">CURVE_Order_BLS381</a></div><div class="ttdeci">const BIG_384_58 CURVE_Order_BLS381</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_abe582b085f5c69960213da026064816c"><div class="ttname"><a href="ecp2__BLS381_8h.html#abe582b085f5c69960213da026064816c">ECP2_BLS381_fromOctet</a></div><div class="ttdeci">int ECP2_BLS381_fromOctet(ECP2_BLS381 *P, octet *S)</div><div class="ttdoc">Creates an ECP2 point from an octet string.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:200</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a4a28bbafc3034b9d0398c70326b24acf"><div class="ttname"><a href="ecp2__BLS381_8h.html#a4a28bbafc3034b9d0398c70326b24acf">ECP2_BLS381_isinf</a></div><div class="ttdeci">int ECP2_BLS381_isinf(ECP2_BLS381 *P)</div><div class="ttdoc">Tests for ECP2 point equal to infinity.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:25</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a8767288711365883432ac2d9a5cb6af0"><div class="ttname"><a href="ecp2__BLS381_8h.html#a8767288711365883432ac2d9a5cb6af0">ECP2_BLS381_dbl</a></div><div class="ttdeci">int ECP2_BLS381_dbl(ECP2_BLS381 *P)</div><div class="ttdoc">Doubles an ECP2 instance P.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:304</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a38b5fb3b588c7b5b47c0b0535c5a1d08"><div class="ttname"><a href="ecp2__BLS381_8h.html#a38b5fb3b588c7b5b47c0b0535c5a1d08">ECP2_BLS381_setx</a></div><div class="ttdeci">int ECP2_BLS381_setx(ECP2_BLS381 *P, FP2_BLS381 *x)</div><div class="ttdoc">Set ECP to point(x,[y]) given x.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:275</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_abaf387b0d44d6132252b204bbd0599a8"><div class="ttname"><a href="ecp2__BLS381_8h.html#abaf387b0d44d6132252b204bbd0599a8">ECP2_BLS381_set</a></div><div class="ttdeci">int ECP2_BLS381_set(ECP2_BLS381 *P, FP2_BLS381 *x, FP2_BLS381 *y)</div><div class="ttdoc">Set ECP2 to point(x,y) given x and y.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:253</div></div>
<div class="ttc" id="structoctet_html"><div class="ttname"><a href="structoctet.html">octet</a></div><div class="ttdoc">Portable representation of a big positive number.</div><div class="ttdef"><b>Definition:</b> amcl.h:209</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a0d91bc6967f5690ee224ed7959c1216f"><div class="ttname"><a href="ecp2__BLS381_8h.html#a0d91bc6967f5690ee224ed7959c1216f">ECP2_BLS381_toOctet</a></div><div class="ttdeci">void ECP2_BLS381_toOctet(octet *S, ECP2_BLS381 *P)</div><div class="ttdoc">Formats and outputs an ECP2 point to an octet string.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:179</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a035ac94764dc5dd600c2d57e599456d0"><div class="ttname"><a href="ecp2__BLS381_8h.html#a035ac94764dc5dd600c2d57e599456d0">CURVE_Pyb_BLS381</a></div><div class="ttdeci">const BIG_384_58 CURVE_Pyb_BLS381</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a1214b4014ddfebcc990efe1f496d0698"><div class="ttname"><a href="ecp2__BLS381_8h.html#a1214b4014ddfebcc990efe1f496d0698">Fra_BLS381</a></div><div class="ttdeci">const BIG_384_58 Fra_BLS381</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_ad3f1993e5db7426164444406682d0c61"><div class="ttname"><a href="ecp2__BLS381_8h.html#ad3f1993e5db7426164444406682d0c61">ECP2_BLS381_copy</a></div><div class="ttdeci">void ECP2_BLS381_copy(ECP2_BLS381 *P, ECP2_BLS381 *Q)</div><div class="ttdoc">Copy ECP2 point to another ECP2 point.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:32</div></div>
<div class="ttc" id="structECP2__BLS381_html_a334e19b20dc35a8117e105bd4c519709"><div class="ttname"><a href="structECP2__BLS381.html#a334e19b20dc35a8117e105bd4c519709">ECP2_BLS381::x</a></div><div class="ttdeci">FP2_BLS381 x</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.h:40</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_ad5159dd59c2b3744cf04c1d086a0d9ab"><div class="ttname"><a href="ecp2__BLS381_8h.html#ad5159dd59c2b3744cf04c1d086a0d9ab">ECP2_BLS381_outputxyz</a></div><div class="ttdeci">void ECP2_BLS381_outputxyz(ECP2_BLS381 *P)</div><div class="ttdoc">Formats and outputs an ECP2 point to the console, in projective coordinates.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:159</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a56267fe030680d3201f411e7111493d7"><div class="ttname"><a href="ecp2__BLS381_8h.html#a56267fe030680d3201f411e7111493d7">ECP2_BLS381_affine</a></div><div class="ttdeci">void ECP2_BLS381_affine(ECP2_BLS381 *P)</div><div class="ttdoc">Converts an ECP2 point from Projective (x,y,z) coordinates to affine (x,y) coordinates.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:105</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_ae6e182a64e658ae2f24b4ce059dc1a7c"><div class="ttname"><a href="ecp2__BLS381_8h.html#ae6e182a64e658ae2f24b4ce059dc1a7c">CURVE_Bnx_BLS381</a></div><div class="ttdeci">const BIG_384_58 CURVE_Bnx_BLS381</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_aea45b0695afe03966bb22dddaaae6176"><div class="ttname"><a href="ecp2__BLS381_8h.html#aea45b0695afe03966bb22dddaaae6176">ECP2_BLS381_equals</a></div><div class="ttdeci">int ECP2_BLS381_equals(ECP2_BLS381 *P, ECP2_BLS381 *Q)</div><div class="ttdoc">Tests for equality of two ECP2s.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:89</div></div>
<div class="ttc" id="structECP2__BLS381_html_a0df8d468341bc1ce4debf108b94c3479"><div class="ttname"><a href="structECP2__BLS381.html#a0df8d468341bc1ce4debf108b94c3479">ECP2_BLS381::z</a></div><div class="ttdeci">FP2_BLS381 z</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.h:42</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a8e691e13173dea68aa5c3f550e0fb130"><div class="ttname"><a href="ecp2__BLS381_8h.html#a8e691e13173dea68aa5c3f550e0fb130">CURVE_A_BLS381</a></div><div class="ttdeci">const int CURVE_A_BLS381</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a76371fcdc4cc04393d67b740a44a90cd"><div class="ttname"><a href="ecp2__BLS381_8h.html#a76371fcdc4cc04393d67b740a44a90cd">ECP2_BLS381_mul4</a></div><div class="ttdeci">void ECP2_BLS381_mul4(ECP2_BLS381 *P, ECP2_BLS381 *Q, BIG_384_58 *b)</div><div class="ttdoc">Calculates P=b[0]*Q[0]+b[1]*Q[1]+b[2]*Q[2]+b[3]*Q[3].</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_ae3ae50bdca827a70f1c36b7a77be6bd2"><div class="ttname"><a href="ecp2__BLS381_8h.html#ae3ae50bdca827a70f1c36b7a77be6bd2">ECP2_BLS381_mul</a></div><div class="ttdeci">void ECP2_BLS381_mul(ECP2_BLS381 *P, BIG_384_58 b)</div><div class="ttdoc">Multiplies an ECP2 instance P by a BIG, side-channel resistant.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:455</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_aeb7753e333275c09ffd4755c80cf78ca"><div class="ttname"><a href="ecp2__BLS381_8h.html#aeb7753e333275c09ffd4755c80cf78ca">ECP2_BLS381_mapit</a></div><div class="ttdeci">void ECP2_BLS381_mapit(ECP2_BLS381 *P, octet *w)</div><div class="ttdoc">Maps random BIG to curve point of correct order.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:625</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a3e25883a298d369d138992d9c539d324"><div class="ttname"><a href="ecp2__BLS381_8h.html#a3e25883a298d369d138992d9c539d324">ECP2_BLS381_rhs</a></div><div class="ttdeci">void ECP2_BLS381_rhs(FP2_BLS381 *r, FP2_BLS381 *x)</div><div class="ttdoc">Calculate Right Hand Side of curve equation y^2=f(x)</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:219</div></div>
<div class="ttc" id="structECP2__BLS381_html_ae8424716de5d48342c0ee5d79d40948a"><div class="ttname"><a href="structECP2__BLS381.html#ae8424716de5d48342c0ee5d79d40948a">ECP2_BLS381::y</a></div><div class="ttdeci">FP2_BLS381 y</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.h:41</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a4a7bbe17c22d85afe7ec7fe1a08aab4d"><div class="ttname"><a href="ecp2__BLS381_8h.html#a4a7bbe17c22d85afe7ec7fe1a08aab4d">CURVE_Gx_BLS381</a></div><div class="ttdeci">const BIG_384_58 CURVE_Gx_BLS381</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a4939a57920bc1af14ea89ba784e7a126"><div class="ttname"><a href="ecp2__BLS381_8h.html#a4939a57920bc1af14ea89ba784e7a126">ECP2_BLS381_add</a></div><div class="ttdeci">int ECP2_BLS381_add(ECP2_BLS381 *P, ECP2_BLS381 *Q)</div><div class="ttdoc">Adds ECP2 instance Q to ECP2 instance P.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:358</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a80db75c3cbe43f3353897b39d21e4f34"><div class="ttname"><a href="ecp2__BLS381_8h.html#a80db75c3cbe43f3353897b39d21e4f34">Frb_BLS381</a></div><div class="ttdeci">const BIG_384_58 Frb_BLS381</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_aef116dd1c5955c3e86fd9b22c39e3841"><div class="ttname"><a href="ecp2__BLS381_8h.html#aef116dd1c5955c3e86fd9b22c39e3841">CURVE_B_I_BLS381</a></div><div class="ttdeci">const int CURVE_B_I_BLS381</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a78c4f7d1e2efcc015386aaa52fc49e4d"><div class="ttname"><a href="ecp2__BLS381_8h.html#a78c4f7d1e2efcc015386aaa52fc49e4d">ECP2_BLS381_neg</a></div><div class="ttdeci">void ECP2_BLS381_neg(ECP2_BLS381 *P)</div><div class="ttdoc">Negation of an ECP2 point.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:294</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a97ea26d6174e376a165ff28ea07cc2e6"><div class="ttname"><a href="ecp2__BLS381_8h.html#a97ea26d6174e376a165ff28ea07cc2e6">CURVE_Cof_BLS381</a></div><div class="ttdeci">const BIG_384_58 CURVE_Cof_BLS381</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_aa3b577d06eb5c4ac47dea6f19de11e1f"><div class="ttname"><a href="ecp2__BLS381_8h.html#aa3b577d06eb5c4ac47dea6f19de11e1f">CURVE_Pxb_BLS381</a></div><div class="ttdeci">const BIG_384_58 CURVE_Pxb_BLS381</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a432ef0bb3613a8e0049a105f87e16e48"><div class="ttname"><a href="ecp2__BLS381_8h.html#a432ef0bb3613a8e0049a105f87e16e48">ECP2_BLS381_sub</a></div><div class="ttdeci">void ECP2_BLS381_sub(ECP2_BLS381 *P, ECP2_BLS381 *Q)</div><div class="ttdoc">Subtracts ECP instance Q from ECP2 instance P.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:445</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_af722a098ce6831fbf999929870dd548f"><div class="ttname"><a href="ecp2__BLS381_8h.html#af722a098ce6831fbf999929870dd548f">ECP2_BLS381_output</a></div><div class="ttdeci">void ECP2_BLS381_output(ECP2_BLS381 *P)</div><div class="ttdoc">Formats and outputs an ECP2 point to the console, converted to affine coordinates.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:142</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a958833196ced4525eef425ae31c17931"><div class="ttname"><a href="ecp2__BLS381_8h.html#a958833196ced4525eef425ae31c17931">CURVE_Pya_BLS381</a></div><div class="ttdeci">const BIG_384_58 CURVE_Pya_BLS381</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a6cd99de9ded2845d418ca1c79fb95417"><div class="ttname"><a href="ecp2__BLS381_8h.html#a6cd99de9ded2845d418ca1c79fb95417">CURVE_B_BLS381</a></div><div class="ttdeci">const BIG_384_58 CURVE_B_BLS381</div></div>
<div class="ttc" id="fp2__BLS381_8h_html"><div class="ttname"><a href="fp2__BLS381_8h.html">fp2_BLS381.h</a></div><div class="ttdoc">FP2 Header File.</div></div>
<div class="ttc" id="structECP2__BLS381_html"><div class="ttname"><a href="structECP2__BLS381.html">ECP2_BLS381</a></div><div class="ttdoc">ECP2 Structure - Elliptic Curve Point over quadratic extension field.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.h:37</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a0ff01e0d2b4a0f06e9a8ac6c8346687c"><div class="ttname"><a href="ecp2__BLS381_8h.html#a0ff01e0d2b4a0f06e9a8ac6c8346687c">CURVE_Gy_BLS381</a></div><div class="ttdeci">const BIG_384_58 CURVE_Gy_BLS381</div></div>
<div class="ttc" id="ecp2__BLS381_8h_html_a522906a3d016800143b3a2501a753c99"><div class="ttname"><a href="ecp2__BLS381_8h.html#a522906a3d016800143b3a2501a753c99">ECP2_BLS381_inf</a></div><div class="ttdeci">void ECP2_BLS381_inf(ECP2_BLS381 *P)</div><div class="ttdoc">Set ECP2 to point-at-infinity.</div><div class="ttdef"><b>Definition:</b> ecp2_BLS381.c:41</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>