• 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/common/math/bignum.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('bignum_8h.html','');});
58/* @license-end */
59</script>
60<div id="doc-content">
61<div class="header">
62  <div class="summary">
63<a href="#typedef-members">Typedefs</a> &#124;
64<a href="#func-members">Functions</a>  </div>
65  <div class="headertitle">
66<div class="title">bignum.h File Reference</div>  </div>
67</div><!--header-->
68<div class="contents">
69
70<p>Big number interface.
71<a href="#details">More...</a></p>
72<div class="textblock"><code>#include &lt;stddef.h&gt;</code><br />
73<code>#include &lt;stdint.h&gt;</code><br />
74<code>#include &quot;<a class="el" href="errors_8h.html">epid/common/errors.h</a>&quot;</code><br />
75<code>#include &quot;<a class="el" href="stdtypes_8h.html">epid/common/stdtypes.h</a>&quot;</code><br />
76<code>#include &quot;<a class="el" href="types_8h.html">epid/common/types.h</a>&quot;</code><br />
77</div><table class="memberdecls">
78<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
79Typedefs</h2></td></tr>
80<tr class="memitem:ga2bf153e27be2683f0fb26f0f7ff1f718"><td class="memItemLeft" align="right" valign="top">
81typedef struct <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a></td></tr>
82<tr class="memdesc:ga2bf153e27be2683f0fb26f0f7ff1f718"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal representation of large numbers. <br /></td></tr>
83<tr class="separator:ga2bf153e27be2683f0fb26f0f7ff1f718"><td class="memSeparator" colspan="2">&#160;</td></tr>
84</table><table class="memberdecls">
85<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
86Functions</h2></td></tr>
87<tr class="memitem:gad5f6f262bfd780fed3678bcee16f0aed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___big_num_primitives.html#gad5f6f262bfd780fed3678bcee16f0aed">NewBigNum</a> (size_t data_size_bytes, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> **bignum)</td></tr>
88<tr class="memdesc:gad5f6f262bfd780fed3678bcee16f0aed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a new BigNum.  <a href="group___big_num_primitives.html#gad5f6f262bfd780fed3678bcee16f0aed">More...</a><br /></td></tr>
89<tr class="separator:gad5f6f262bfd780fed3678bcee16f0aed"><td class="memSeparator" colspan="2">&#160;</td></tr>
90<tr class="memitem:ga2d17600068b1d94000635c6644258a03"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___big_num_primitives.html#ga2d17600068b1d94000635c6644258a03">DeleteBigNum</a> (<a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> **bignum)</td></tr>
91<tr class="memdesc:ga2d17600068b1d94000635c6644258a03"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a previously allocated BigNum.  <a href="group___big_num_primitives.html#ga2d17600068b1d94000635c6644258a03">More...</a><br /></td></tr>
92<tr class="separator:ga2d17600068b1d94000635c6644258a03"><td class="memSeparator" colspan="2">&#160;</td></tr>
93<tr class="memitem:gabe8e39d5788423f41770a71a4c911fbe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___big_num_primitives.html#gabe8e39d5788423f41770a71a4c911fbe">ReadBigNum</a> (<a class="el" href="group___epid_types.html#gace6876a045f2c2694444b35ccb0844e2">ConstOctStr</a> bn_str, size_t strlen, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *bn)</td></tr>
94<tr class="memdesc:gabe8e39d5788423f41770a71a4c911fbe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deserializes a BigNum from a string.  <a href="group___big_num_primitives.html#gabe8e39d5788423f41770a71a4c911fbe">More...</a><br /></td></tr>
95<tr class="separator:gabe8e39d5788423f41770a71a4c911fbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
96<tr class="memitem:ga904c16cc020e7196f22ac9abdc31b41f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___big_num_primitives.html#ga904c16cc020e7196f22ac9abdc31b41f">WriteBigNum</a> (<a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *bn, size_t strlen, <a class="el" href="group___epid_types.html#ga3315fb24f4c5783b6d6eb107933390b0">OctStr</a> bn_str)</td></tr>
97<tr class="memdesc:ga904c16cc020e7196f22ac9abdc31b41f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serializes a BigNum to a string.  <a href="group___big_num_primitives.html#ga904c16cc020e7196f22ac9abdc31b41f">More...</a><br /></td></tr>
98<tr class="separator:ga904c16cc020e7196f22ac9abdc31b41f"><td class="memSeparator" colspan="2">&#160;</td></tr>
99<tr class="memitem:gae70fd9b3026f0ab3c7e9601d0a3186b8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___big_num_primitives.html#gae70fd9b3026f0ab3c7e9601d0a3186b8">BigNumAdd</a> (<a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *a, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *b, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *r)</td></tr>
100<tr class="memdesc:gae70fd9b3026f0ab3c7e9601d0a3186b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds two BigNum values.  <a href="group___big_num_primitives.html#gae70fd9b3026f0ab3c7e9601d0a3186b8">More...</a><br /></td></tr>
101<tr class="separator:gae70fd9b3026f0ab3c7e9601d0a3186b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
102<tr class="memitem:gacbec9669ab0fe768e2be74dcaca397ea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___big_num_primitives.html#gacbec9669ab0fe768e2be74dcaca397ea">BigNumSub</a> (<a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *a, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *b, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *r)</td></tr>
103<tr class="memdesc:gacbec9669ab0fe768e2be74dcaca397ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subtracts two BigNum values.  <a href="group___big_num_primitives.html#gacbec9669ab0fe768e2be74dcaca397ea">More...</a><br /></td></tr>
104<tr class="separator:gacbec9669ab0fe768e2be74dcaca397ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
105<tr class="memitem:ga03c89b8b8dd87de2c0f4b5822145d317"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___big_num_primitives.html#ga03c89b8b8dd87de2c0f4b5822145d317">BigNumMul</a> (<a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *a, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *b, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *r)</td></tr>
106<tr class="memdesc:ga03c89b8b8dd87de2c0f4b5822145d317"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multiplies two BigNum values.  <a href="group___big_num_primitives.html#ga03c89b8b8dd87de2c0f4b5822145d317">More...</a><br /></td></tr>
107<tr class="separator:ga03c89b8b8dd87de2c0f4b5822145d317"><td class="memSeparator" colspan="2">&#160;</td></tr>
108<tr class="memitem:ga166134085464b0df2c8efcfccf8ec573"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___big_num_primitives.html#ga166134085464b0df2c8efcfccf8ec573">BigNumDiv</a> (<a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *a, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *b, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *q, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *r)</td></tr>
109<tr class="memdesc:ga166134085464b0df2c8efcfccf8ec573"><td class="mdescLeft">&#160;</td><td class="mdescRight">Divides two BigNum values.  <a href="group___big_num_primitives.html#ga166134085464b0df2c8efcfccf8ec573">More...</a><br /></td></tr>
110<tr class="separator:ga166134085464b0df2c8efcfccf8ec573"><td class="memSeparator" colspan="2">&#160;</td></tr>
111<tr class="memitem:ga7dd6038987210d10bf843602fef0c929"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___big_num_primitives.html#ga7dd6038987210d10bf843602fef0c929">BigNumMod</a> (<a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *a, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *b, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *r)</td></tr>
112<tr class="memdesc:ga7dd6038987210d10bf843602fef0c929"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes modular reduction for BigNum value by specified modulus.  <a href="group___big_num_primitives.html#ga7dd6038987210d10bf843602fef0c929">More...</a><br /></td></tr>
113<tr class="separator:ga7dd6038987210d10bf843602fef0c929"><td class="memSeparator" colspan="2">&#160;</td></tr>
114<tr class="memitem:gaf0366e47226563b17fcbc8e3ed766084"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___big_num_primitives.html#gaf0366e47226563b17fcbc8e3ed766084">BigNumIsEven</a> (<a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *a, <a class="el" href="stdtypes_8h.html#ad5c9d4ba3dc37783a528b0925dc981a0">bool</a> *is_even)</td></tr>
115<tr class="memdesc:gaf0366e47226563b17fcbc8e3ed766084"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if a BigNum is even.  <a href="group___big_num_primitives.html#gaf0366e47226563b17fcbc8e3ed766084">More...</a><br /></td></tr>
116<tr class="separator:gaf0366e47226563b17fcbc8e3ed766084"><td class="memSeparator" colspan="2">&#160;</td></tr>
117<tr class="memitem:gacde6564a814617a96985b379be0dfabb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___big_num_primitives.html#gacde6564a814617a96985b379be0dfabb">BigNumIsZero</a> (<a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *a, <a class="el" href="stdtypes_8h.html#ad5c9d4ba3dc37783a528b0925dc981a0">bool</a> *is_zero)</td></tr>
118<tr class="memdesc:gacde6564a814617a96985b379be0dfabb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if a BigNum is zero.  <a href="group___big_num_primitives.html#gacde6564a814617a96985b379be0dfabb">More...</a><br /></td></tr>
119<tr class="separator:gacde6564a814617a96985b379be0dfabb"><td class="memSeparator" colspan="2">&#160;</td></tr>
120<tr class="memitem:gafd64b66fc85dab0005f4a1bb67bdf7b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___big_num_primitives.html#gafd64b66fc85dab0005f4a1bb67bdf7b4">BigNumPow2N</a> (unsigned int n, <a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *r)</td></tr>
121<tr class="memdesc:gafd64b66fc85dab0005f4a1bb67bdf7b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Raises 2 to the given power.  <a href="group___big_num_primitives.html#gafd64b66fc85dab0005f4a1bb67bdf7b4">More...</a><br /></td></tr>
122<tr class="separator:gafd64b66fc85dab0005f4a1bb67bdf7b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
123</table>
124<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
125<div class="textblock"><p>Big number interface. </p>
126</div></div><!-- contents -->
127</div><!-- doc-content -->
128<!-- HTML footer for doxygen 1.8.10-->
129<!-- start footer part -->
130<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
131  <ul>
132    <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="bignum_8h.html">bignum.h</a></li>
133    <li class="footer">
134      &copy; 2016-2017 Intel Corporation
135    </li>
136  </ul>
137</div>
138</body>
139</html>
140