• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.14"/>
8<title>Intel&reg; Enhanced Privacy ID SDK: epid/member/tiny/math/fp.h 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/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
18  $(document).ready(initResizable);
19/* @license-end */</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">6.0.1</span>
36</div>
37  </td>
38 </tr>
39 </tbody>
40</table>
41</div>
42<!-- end header part -->
43<!-- Generated by Doxygen 1.8.14 -->
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/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
57$(document).ready(function(){initNavTree('fp_8h.html','');});
58/* @license-end */
59</script>
60<div id="doc-content">
61<div class="header">
62  <div class="summary">
63<a href="#func-members">Functions</a>  </div>
64  <div class="headertitle">
65<div class="title">fp.h File Reference</div>  </div>
66</div><!--header-->
67<div class="contents">
68
69<p>Definition of Fp math.
70<a href="#details">More...</a></p>
71<div class="textblock"><code>#include &lt;stddef.h&gt;</code><br />
72<code>#include &lt;stdint.h&gt;</code><br />
73<code>#include &quot;<a class="el" href="bitsupplier_8h.html">epid/common/bitsupplier.h</a>&quot;</code><br />
74</div><table class="memberdecls">
75<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
76Functions</h2></td></tr>
77<tr class="memitem:ac2eab44a7aa9679d107667ffc035ee0a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fp_8h.html#ac2eab44a7aa9679d107667ffc035ee0a">FpInField</a> (<a class="el" href="struct_fp_elem.html">FpElem</a> const *in)</td></tr>
78<tr class="memdesc:ac2eab44a7aa9679d107667ffc035ee0a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if an element is in Fp.  <a href="#ac2eab44a7aa9679d107667ffc035ee0a">More...</a><br /></td></tr>
79<tr class="separator:ac2eab44a7aa9679d107667ffc035ee0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
80<tr class="memitem:a55152abe8b866eba5a0c83cfb1bbe5f6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fp_8h.html#a55152abe8b866eba5a0c83cfb1bbe5f6">FpAdd</a> (<a class="el" href="struct_fp_elem.html">FpElem</a> *result, <a class="el" href="struct_fp_elem.html">FpElem</a> const *left, <a class="el" href="struct_fp_elem.html">FpElem</a> const *right)</td></tr>
81<tr class="memdesc:a55152abe8b866eba5a0c83cfb1bbe5f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add two elements of Fp.  <a href="#a55152abe8b866eba5a0c83cfb1bbe5f6">More...</a><br /></td></tr>
82<tr class="separator:a55152abe8b866eba5a0c83cfb1bbe5f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
83<tr class="memitem:a9392597a6fe50e5c102ce21b8a1ae6c2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fp_8h.html#a9392597a6fe50e5c102ce21b8a1ae6c2">FpMul</a> (<a class="el" href="struct_fp_elem.html">FpElem</a> *result, <a class="el" href="struct_fp_elem.html">FpElem</a> const *left, <a class="el" href="struct_fp_elem.html">FpElem</a> const *right)</td></tr>
84<tr class="memdesc:a9392597a6fe50e5c102ce21b8a1ae6c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multiply two elements of Fp.  <a href="#a9392597a6fe50e5c102ce21b8a1ae6c2">More...</a><br /></td></tr>
85<tr class="separator:a9392597a6fe50e5c102ce21b8a1ae6c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
86<tr class="memitem:aa9cc9f5e33bba75420b83cb2d49ca280"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fp_8h.html#aa9cc9f5e33bba75420b83cb2d49ca280">FpSub</a> (<a class="el" href="struct_fp_elem.html">FpElem</a> *result, <a class="el" href="struct_fp_elem.html">FpElem</a> const *left, <a class="el" href="struct_fp_elem.html">FpElem</a> const *right)</td></tr>
87<tr class="memdesc:aa9cc9f5e33bba75420b83cb2d49ca280"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subtract two elements of Fp.  <a href="#aa9cc9f5e33bba75420b83cb2d49ca280">More...</a><br /></td></tr>
88<tr class="separator:aa9cc9f5e33bba75420b83cb2d49ca280"><td class="memSeparator" colspan="2">&#160;</td></tr>
89<tr class="memitem:ab06b1b1a59f1138aa6c4d746ab707f86"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fp_8h.html#ab06b1b1a59f1138aa6c4d746ab707f86">FpExp</a> (<a class="el" href="struct_fp_elem.html">FpElem</a> *result, <a class="el" href="struct_fp_elem.html">FpElem</a> const *base, <a class="el" href="struct_very_large_int.html">VeryLargeInt</a> const *exp)</td></tr>
90<tr class="memdesc:ab06b1b1a59f1138aa6c4d746ab707f86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exponentiate an element of Fp by a large integer.  <a href="#ab06b1b1a59f1138aa6c4d746ab707f86">More...</a><br /></td></tr>
91<tr class="separator:ab06b1b1a59f1138aa6c4d746ab707f86"><td class="memSeparator" colspan="2">&#160;</td></tr>
92<tr class="memitem:a0524fd074857712ea61ea5717ff54fd3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fp_8h.html#a0524fd074857712ea61ea5717ff54fd3">FpNeg</a> (<a class="el" href="struct_fp_elem.html">FpElem</a> *result, <a class="el" href="struct_fp_elem.html">FpElem</a> const *in)</td></tr>
93<tr class="memdesc:a0524fd074857712ea61ea5717ff54fd3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Negate an element of Fp.  <a href="#a0524fd074857712ea61ea5717ff54fd3">More...</a><br /></td></tr>
94<tr class="separator:a0524fd074857712ea61ea5717ff54fd3"><td class="memSeparator" colspan="2">&#160;</td></tr>
95<tr class="memitem:a7bb685bd810368d8077f638ffcab2554"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fp_8h.html#a7bb685bd810368d8077f638ffcab2554">FpEq</a> (<a class="el" href="struct_fp_elem.html">FpElem</a> const *left, <a class="el" href="struct_fp_elem.html">FpElem</a> const *right)</td></tr>
96<tr class="memdesc:a7bb685bd810368d8077f638ffcab2554"><td class="mdescLeft">&#160;</td><td class="mdescRight">Test if two elements in Fp are equal.  <a href="#a7bb685bd810368d8077f638ffcab2554">More...</a><br /></td></tr>
97<tr class="separator:a7bb685bd810368d8077f638ffcab2554"><td class="memSeparator" colspan="2">&#160;</td></tr>
98<tr class="memitem:a9e7500fe8ee73592b002ed675d1758b3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fp_8h.html#a9e7500fe8ee73592b002ed675d1758b3">FpInv</a> (<a class="el" href="struct_fp_elem.html">FpElem</a> *result, <a class="el" href="struct_fp_elem.html">FpElem</a> const *in)</td></tr>
99<tr class="memdesc:a9e7500fe8ee73592b002ed675d1758b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Invert an element of Fp.  <a href="#a9e7500fe8ee73592b002ed675d1758b3">More...</a><br /></td></tr>
100<tr class="separator:a9e7500fe8ee73592b002ed675d1758b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
101<tr class="memitem:a6c06b175fd82b5db555508f2d26713f8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fp_8h.html#a6c06b175fd82b5db555508f2d26713f8">FpRand</a> (<a class="el" href="struct_fp_elem.html">FpElem</a> *result, <a class="el" href="group___epid_common.html#ga6119a2c0323a3fca9e502b24bc378c2c">BitSupplier</a> rnd_func, void *rnd_param)</td></tr>
102<tr class="memdesc:a6c06b175fd82b5db555508f2d26713f8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate a random element of Fp.  <a href="#a6c06b175fd82b5db555508f2d26713f8">More...</a><br /></td></tr>
103<tr class="separator:a6c06b175fd82b5db555508f2d26713f8"><td class="memSeparator" colspan="2">&#160;</td></tr>
104<tr class="memitem:a54743809639797b4d4445c221291048b"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fp_8h.html#a54743809639797b4d4445c221291048b">FpRandNonzero</a> (<a class="el" href="struct_fp_elem.html">FpElem</a> *result, <a class="el" href="group___epid_common.html#ga6119a2c0323a3fca9e502b24bc378c2c">BitSupplier</a> rnd_func, void *rnd_param)</td></tr>
105<tr class="memdesc:a54743809639797b4d4445c221291048b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate a non-zero random element of Fp.  <a href="#a54743809639797b4d4445c221291048b">More...</a><br /></td></tr>
106<tr class="separator:a54743809639797b4d4445c221291048b"><td class="memSeparator" colspan="2">&#160;</td></tr>
107<tr class="memitem:adf010ec5710d4013e33efd7e5ba8f9ad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fp_8h.html#adf010ec5710d4013e33efd7e5ba8f9ad">FpClear</a> (<a class="el" href="struct_fp_elem.html">FpElem</a> *result)</td></tr>
108<tr class="memdesc:adf010ec5710d4013e33efd7e5ba8f9ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear an element of Fp.  <a href="#adf010ec5710d4013e33efd7e5ba8f9ad">More...</a><br /></td></tr>
109<tr class="separator:adf010ec5710d4013e33efd7e5ba8f9ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
110<tr class="memitem:a23bf42c7024a318970a6b60c02d9a08d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fp_8h.html#a23bf42c7024a318970a6b60c02d9a08d">FpSet</a> (<a class="el" href="struct_fp_elem.html">FpElem</a> *result, uint32_t in)</td></tr>
111<tr class="memdesc:a23bf42c7024a318970a6b60c02d9a08d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a element of Fp's value.  <a href="#a23bf42c7024a318970a6b60c02d9a08d">More...</a><br /></td></tr>
112<tr class="separator:a23bf42c7024a318970a6b60c02d9a08d"><td class="memSeparator" colspan="2">&#160;</td></tr>
113<tr class="memitem:a472b0a9229b0eff0ca445f158efa1175"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="fp_8h.html#a472b0a9229b0eff0ca445f158efa1175">FpFromHash</a> (<a class="el" href="struct_fp_elem.html">FpElem</a> *result, unsigned char const *hash, size_t len)</td></tr>
114<tr class="memdesc:a472b0a9229b0eff0ca445f158efa1175"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reinterpret a buffer as an element of Fp.  <a href="#a472b0a9229b0eff0ca445f158efa1175">More...</a><br /></td></tr>
115<tr class="separator:a472b0a9229b0eff0ca445f158efa1175"><td class="memSeparator" colspan="2">&#160;</td></tr>
116</table>
117<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
118<div class="textblock"><p>Definition of Fp math. </p>
119</div><h2 class="groupheader">Function Documentation</h2>
120<a id="a55152abe8b866eba5a0c83cfb1bbe5f6"></a>
121<h2 class="memtitle"><span class="permalink"><a href="#a55152abe8b866eba5a0c83cfb1bbe5f6">&#9670;&nbsp;</a></span>FpAdd()</h2>
122
123<div class="memitem">
124<div class="memproto">
125      <table class="memname">
126        <tr>
127          <td class="memname">void FpAdd </td>
128          <td>(</td>
129          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> *&#160;</td>
130          <td class="paramname"><em>result</em>, </td>
131        </tr>
132        <tr>
133          <td class="paramkey"></td>
134          <td></td>
135          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> const *&#160;</td>
136          <td class="paramname"><em>left</em>, </td>
137        </tr>
138        <tr>
139          <td class="paramkey"></td>
140          <td></td>
141          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> const *&#160;</td>
142          <td class="paramname"><em>right</em>&#160;</td>
143        </tr>
144        <tr>
145          <td></td>
146          <td>)</td>
147          <td></td><td></td>
148        </tr>
149      </table>
150</div><div class="memdoc">
151
152<p>Add two elements of Fp. </p>
153<dl class="params"><dt>Parameters</dt><dd>
154  <table class="params">
155    <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>of adding left and right. </td></tr>
156    <tr><td class="paramdir">[in]</td><td class="paramname">left</td><td>The first operand to be added. </td></tr>
157    <tr><td class="paramdir">[in]</td><td class="paramname">right</td><td>The second operand to be added. </td></tr>
158  </table>
159  </dd>
160</dl>
161
162</div>
163</div>
164<a id="adf010ec5710d4013e33efd7e5ba8f9ad"></a>
165<h2 class="memtitle"><span class="permalink"><a href="#adf010ec5710d4013e33efd7e5ba8f9ad">&#9670;&nbsp;</a></span>FpClear()</h2>
166
167<div class="memitem">
168<div class="memproto">
169      <table class="memname">
170        <tr>
171          <td class="memname">void FpClear </td>
172          <td>(</td>
173          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> *&#160;</td>
174          <td class="paramname"><em>result</em></td><td>)</td>
175          <td></td>
176        </tr>
177      </table>
178</div><div class="memdoc">
179
180<p>Clear an element of Fp. </p>
181<dl class="params"><dt>Parameters</dt><dd>
182  <table class="params">
183    <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>value to clear. </td></tr>
184  </table>
185  </dd>
186</dl>
187
188</div>
189</div>
190<a id="a7bb685bd810368d8077f638ffcab2554"></a>
191<h2 class="memtitle"><span class="permalink"><a href="#a7bb685bd810368d8077f638ffcab2554">&#9670;&nbsp;</a></span>FpEq()</h2>
192
193<div class="memitem">
194<div class="memproto">
195      <table class="memname">
196        <tr>
197          <td class="memname">int FpEq </td>
198          <td>(</td>
199          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> const *&#160;</td>
200          <td class="paramname"><em>left</em>, </td>
201        </tr>
202        <tr>
203          <td class="paramkey"></td>
204          <td></td>
205          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> const *&#160;</td>
206          <td class="paramname"><em>right</em>&#160;</td>
207        </tr>
208        <tr>
209          <td></td>
210          <td>)</td>
211          <td></td><td></td>
212        </tr>
213      </table>
214</div><div class="memdoc">
215
216<p>Test if two elements in Fp are equal. </p>
217<dl class="params"><dt>Parameters</dt><dd>
218  <table class="params">
219    <tr><td class="paramdir">[in]</td><td class="paramname">left</td><td>The first operand to be tested. </td></tr>
220    <tr><td class="paramdir">[in]</td><td class="paramname">right</td><td>The second operand to be tested. </td></tr>
221  </table>
222  </dd>
223</dl>
224<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>
225
226</div>
227</div>
228<a id="ab06b1b1a59f1138aa6c4d746ab707f86"></a>
229<h2 class="memtitle"><span class="permalink"><a href="#ab06b1b1a59f1138aa6c4d746ab707f86">&#9670;&nbsp;</a></span>FpExp()</h2>
230
231<div class="memitem">
232<div class="memproto">
233      <table class="memname">
234        <tr>
235          <td class="memname">void FpExp </td>
236          <td>(</td>
237          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> *&#160;</td>
238          <td class="paramname"><em>result</em>, </td>
239        </tr>
240        <tr>
241          <td class="paramkey"></td>
242          <td></td>
243          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> const *&#160;</td>
244          <td class="paramname"><em>base</em>, </td>
245        </tr>
246        <tr>
247          <td class="paramkey"></td>
248          <td></td>
249          <td class="paramtype"><a class="el" href="struct_very_large_int.html">VeryLargeInt</a> const *&#160;</td>
250          <td class="paramname"><em>exp</em>&#160;</td>
251        </tr>
252        <tr>
253          <td></td>
254          <td>)</td>
255          <td></td><td></td>
256        </tr>
257      </table>
258</div><div class="memdoc">
259
260<p>Exponentiate an element of Fp by a large integer. </p>
261<dl class="params"><dt>Parameters</dt><dd>
262  <table class="params">
263    <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>target. </td></tr>
264    <tr><td class="paramdir">[in]</td><td class="paramname">base</td><td>the base. </td></tr>
265    <tr><td class="paramdir">[in]</td><td class="paramname">exp</td><td>the exponent. </td></tr>
266  </table>
267  </dd>
268</dl>
269
270</div>
271</div>
272<a id="a472b0a9229b0eff0ca445f158efa1175"></a>
273<h2 class="memtitle"><span class="permalink"><a href="#a472b0a9229b0eff0ca445f158efa1175">&#9670;&nbsp;</a></span>FpFromHash()</h2>
274
275<div class="memitem">
276<div class="memproto">
277      <table class="memname">
278        <tr>
279          <td class="memname">void FpFromHash </td>
280          <td>(</td>
281          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> *&#160;</td>
282          <td class="paramname"><em>result</em>, </td>
283        </tr>
284        <tr>
285          <td class="paramkey"></td>
286          <td></td>
287          <td class="paramtype">unsigned char const *&#160;</td>
288          <td class="paramname"><em>hash</em>, </td>
289        </tr>
290        <tr>
291          <td class="paramkey"></td>
292          <td></td>
293          <td class="paramtype">size_t&#160;</td>
294          <td class="paramname"><em>len</em>&#160;</td>
295        </tr>
296        <tr>
297          <td></td>
298          <td>)</td>
299          <td></td><td></td>
300        </tr>
301      </table>
302</div><div class="memdoc">
303
304<p>Reinterpret a buffer as an element of Fp. </p>
305<dl class="params"><dt>Parameters</dt><dd>
306  <table class="params">
307    <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>target. </td></tr>
308    <tr><td class="paramdir">[in]</td><td class="paramname">hash</td><td>buffer to reinterpret. </td></tr>
309    <tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>length of hash in bytes. </td></tr>
310  </table>
311  </dd>
312</dl>
313
314</div>
315</div>
316<a id="ac2eab44a7aa9679d107667ffc035ee0a"></a>
317<h2 class="memtitle"><span class="permalink"><a href="#ac2eab44a7aa9679d107667ffc035ee0a">&#9670;&nbsp;</a></span>FpInField()</h2>
318
319<div class="memitem">
320<div class="memproto">
321      <table class="memname">
322        <tr>
323          <td class="memname">int FpInField </td>
324          <td>(</td>
325          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> const *&#160;</td>
326          <td class="paramname"><em>in</em></td><td>)</td>
327          <td></td>
328        </tr>
329      </table>
330</div><div class="memdoc">
331
332<p>Test if an element is in Fp. </p>
333<dl class="params"><dt>Parameters</dt><dd>
334  <table class="params">
335    <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>the element to test </td></tr>
336  </table>
337  </dd>
338</dl>
339<dl class="section return"><dt>Returns</dt><dd>A value different from zero (i.e., true) indeed the value is in the field. Zero (i.e., false) otherwise. </dd></dl>
340
341</div>
342</div>
343<a id="a9e7500fe8ee73592b002ed675d1758b3"></a>
344<h2 class="memtitle"><span class="permalink"><a href="#a9e7500fe8ee73592b002ed675d1758b3">&#9670;&nbsp;</a></span>FpInv()</h2>
345
346<div class="memitem">
347<div class="memproto">
348      <table class="memname">
349        <tr>
350          <td class="memname">void FpInv </td>
351          <td>(</td>
352          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> *&#160;</td>
353          <td class="paramname"><em>result</em>, </td>
354        </tr>
355        <tr>
356          <td class="paramkey"></td>
357          <td></td>
358          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> const *&#160;</td>
359          <td class="paramname"><em>in</em>&#160;</td>
360        </tr>
361        <tr>
362          <td></td>
363          <td>)</td>
364          <td></td><td></td>
365        </tr>
366      </table>
367</div><div class="memdoc">
368
369<p>Invert an element of Fp. </p>
370<dl class="params"><dt>Parameters</dt><dd>
371  <table class="params">
372    <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>target. </td></tr>
373    <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>the value to invert. </td></tr>
374  </table>
375  </dd>
376</dl>
377
378</div>
379</div>
380<a id="a9392597a6fe50e5c102ce21b8a1ae6c2"></a>
381<h2 class="memtitle"><span class="permalink"><a href="#a9392597a6fe50e5c102ce21b8a1ae6c2">&#9670;&nbsp;</a></span>FpMul()</h2>
382
383<div class="memitem">
384<div class="memproto">
385      <table class="memname">
386        <tr>
387          <td class="memname">void FpMul </td>
388          <td>(</td>
389          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> *&#160;</td>
390          <td class="paramname"><em>result</em>, </td>
391        </tr>
392        <tr>
393          <td class="paramkey"></td>
394          <td></td>
395          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> const *&#160;</td>
396          <td class="paramname"><em>left</em>, </td>
397        </tr>
398        <tr>
399          <td class="paramkey"></td>
400          <td></td>
401          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> const *&#160;</td>
402          <td class="paramname"><em>right</em>&#160;</td>
403        </tr>
404        <tr>
405          <td></td>
406          <td>)</td>
407          <td></td><td></td>
408        </tr>
409      </table>
410</div><div class="memdoc">
411
412<p>Multiply two elements of Fp. </p>
413<dl class="params"><dt>Parameters</dt><dd>
414  <table class="params">
415    <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>of multiplying left and right. </td></tr>
416    <tr><td class="paramdir">[in]</td><td class="paramname">left</td><td>The first operand to be multiplied. </td></tr>
417    <tr><td class="paramdir">[in]</td><td class="paramname">right</td><td>The second operand to be multiplied. </td></tr>
418  </table>
419  </dd>
420</dl>
421
422</div>
423</div>
424<a id="a0524fd074857712ea61ea5717ff54fd3"></a>
425<h2 class="memtitle"><span class="permalink"><a href="#a0524fd074857712ea61ea5717ff54fd3">&#9670;&nbsp;</a></span>FpNeg()</h2>
426
427<div class="memitem">
428<div class="memproto">
429      <table class="memname">
430        <tr>
431          <td class="memname">void FpNeg </td>
432          <td>(</td>
433          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> *&#160;</td>
434          <td class="paramname"><em>result</em>, </td>
435        </tr>
436        <tr>
437          <td class="paramkey"></td>
438          <td></td>
439          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> const *&#160;</td>
440          <td class="paramname"><em>in</em>&#160;</td>
441        </tr>
442        <tr>
443          <td></td>
444          <td>)</td>
445          <td></td><td></td>
446        </tr>
447      </table>
448</div><div class="memdoc">
449
450<p>Negate an element of Fp. </p>
451<dl class="params"><dt>Parameters</dt><dd>
452  <table class="params">
453    <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>target. </td></tr>
454    <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>the value to negate. </td></tr>
455  </table>
456  </dd>
457</dl>
458
459</div>
460</div>
461<a id="a6c06b175fd82b5db555508f2d26713f8"></a>
462<h2 class="memtitle"><span class="permalink"><a href="#a6c06b175fd82b5db555508f2d26713f8">&#9670;&nbsp;</a></span>FpRand()</h2>
463
464<div class="memitem">
465<div class="memproto">
466      <table class="memname">
467        <tr>
468          <td class="memname">int FpRand </td>
469          <td>(</td>
470          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> *&#160;</td>
471          <td class="paramname"><em>result</em>, </td>
472        </tr>
473        <tr>
474          <td class="paramkey"></td>
475          <td></td>
476          <td class="paramtype"><a class="el" href="group___epid_common.html#ga6119a2c0323a3fca9e502b24bc378c2c">BitSupplier</a>&#160;</td>
477          <td class="paramname"><em>rnd_func</em>, </td>
478        </tr>
479        <tr>
480          <td class="paramkey"></td>
481          <td></td>
482          <td class="paramtype">void *&#160;</td>
483          <td class="paramname"><em>rnd_param</em>&#160;</td>
484        </tr>
485        <tr>
486          <td></td>
487          <td>)</td>
488          <td></td><td></td>
489        </tr>
490      </table>
491</div><div class="memdoc">
492
493<p>Generate a random element of Fp. </p>
494<dl class="params"><dt>Parameters</dt><dd>
495  <table class="params">
496    <tr><td class="paramdir">[in]</td><td class="paramname">result</td><td>the random value. </td></tr>
497    <tr><td class="paramdir">[in]</td><td class="paramname">rnd_func</td><td>Random number generator. </td></tr>
498    <tr><td class="paramdir">[in]</td><td class="paramname">rnd_param</td><td>Pass through context data for rnd_func. </td></tr>
499  </table>
500  </dd>
501</dl>
502<dl class="section return"><dt>Returns</dt><dd>A value different from zero (i.e., true) if on success. Zero (i.e., false) otherwise. </dd></dl>
503
504</div>
505</div>
506<a id="a54743809639797b4d4445c221291048b"></a>
507<h2 class="memtitle"><span class="permalink"><a href="#a54743809639797b4d4445c221291048b">&#9670;&nbsp;</a></span>FpRandNonzero()</h2>
508
509<div class="memitem">
510<div class="memproto">
511      <table class="memname">
512        <tr>
513          <td class="memname">int FpRandNonzero </td>
514          <td>(</td>
515          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> *&#160;</td>
516          <td class="paramname"><em>result</em>, </td>
517        </tr>
518        <tr>
519          <td class="paramkey"></td>
520          <td></td>
521          <td class="paramtype"><a class="el" href="group___epid_common.html#ga6119a2c0323a3fca9e502b24bc378c2c">BitSupplier</a>&#160;</td>
522          <td class="paramname"><em>rnd_func</em>, </td>
523        </tr>
524        <tr>
525          <td class="paramkey"></td>
526          <td></td>
527          <td class="paramtype">void *&#160;</td>
528          <td class="paramname"><em>rnd_param</em>&#160;</td>
529        </tr>
530        <tr>
531          <td></td>
532          <td>)</td>
533          <td></td><td></td>
534        </tr>
535      </table>
536</div><div class="memdoc">
537
538<p>Generate a non-zero random element of Fp. </p>
539<dl class="params"><dt>Parameters</dt><dd>
540  <table class="params">
541    <tr><td class="paramdir">[in]</td><td class="paramname">result</td><td>the random value. </td></tr>
542    <tr><td class="paramdir">[in]</td><td class="paramname">rnd_func</td><td>Random number generator. </td></tr>
543    <tr><td class="paramdir">[in]</td><td class="paramname">rnd_param</td><td>Pass through context data for rnd_func. </td></tr>
544  </table>
545  </dd>
546</dl>
547<dl class="section return"><dt>Returns</dt><dd>A value different from zero (i.e., true) if on success. Zero (i.e., false) otherwise. </dd></dl>
548
549</div>
550</div>
551<a id="a23bf42c7024a318970a6b60c02d9a08d"></a>
552<h2 class="memtitle"><span class="permalink"><a href="#a23bf42c7024a318970a6b60c02d9a08d">&#9670;&nbsp;</a></span>FpSet()</h2>
553
554<div class="memitem">
555<div class="memproto">
556      <table class="memname">
557        <tr>
558          <td class="memname">void FpSet </td>
559          <td>(</td>
560          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> *&#160;</td>
561          <td class="paramname"><em>result</em>, </td>
562        </tr>
563        <tr>
564          <td class="paramkey"></td>
565          <td></td>
566          <td class="paramtype">uint32_t&#160;</td>
567          <td class="paramname"><em>in</em>&#160;</td>
568        </tr>
569        <tr>
570          <td></td>
571          <td>)</td>
572          <td></td><td></td>
573        </tr>
574      </table>
575</div><div class="memdoc">
576
577<p>Set a element of Fp's value. </p>
578<dl class="params"><dt>Parameters</dt><dd>
579  <table class="params">
580    <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>target. </td></tr>
581    <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>value to set. </td></tr>
582  </table>
583  </dd>
584</dl>
585
586</div>
587</div>
588<a id="aa9cc9f5e33bba75420b83cb2d49ca280"></a>
589<h2 class="memtitle"><span class="permalink"><a href="#aa9cc9f5e33bba75420b83cb2d49ca280">&#9670;&nbsp;</a></span>FpSub()</h2>
590
591<div class="memitem">
592<div class="memproto">
593      <table class="memname">
594        <tr>
595          <td class="memname">void FpSub </td>
596          <td>(</td>
597          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> *&#160;</td>
598          <td class="paramname"><em>result</em>, </td>
599        </tr>
600        <tr>
601          <td class="paramkey"></td>
602          <td></td>
603          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> const *&#160;</td>
604          <td class="paramname"><em>left</em>, </td>
605        </tr>
606        <tr>
607          <td class="paramkey"></td>
608          <td></td>
609          <td class="paramtype"><a class="el" href="struct_fp_elem.html">FpElem</a> const *&#160;</td>
610          <td class="paramname"><em>right</em>&#160;</td>
611        </tr>
612        <tr>
613          <td></td>
614          <td>)</td>
615          <td></td><td></td>
616        </tr>
617      </table>
618</div><div class="memdoc">
619
620<p>Subtract two elements of Fp. </p>
621<dl class="params"><dt>Parameters</dt><dd>
622  <table class="params">
623    <tr><td class="paramdir">[out]</td><td class="paramname">result</td><td>of subtracting left from right. </td></tr>
624    <tr><td class="paramdir">[in]</td><td class="paramname">left</td><td>The operand to be subtracted from. </td></tr>
625    <tr><td class="paramdir">[in]</td><td class="paramname">right</td><td>The operand to subtract. </td></tr>
626  </table>
627  </dd>
628</dl>
629
630</div>
631</div>
632</div><!-- contents -->
633</div><!-- doc-content -->
634<!-- HTML footer for doxygen 1.8.10-->
635<!-- start footer part -->
636<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
637  <ul>
638    <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="fp_8h.html">fp.h</a></li>
639    <li class="footer">
640      &copy; 2016-2017 Intel Corporation
641    </li>
642  </ul>
643</div>
644</body>
645</html>
646