<!-- 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&reg; Enhanced Privacy ID SDK: bignum</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&amp;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&reg; Enhanced Privacy ID SDK</a>
&#160;<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&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('group___big_num_primitives.html','');});
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">bignum<div class="ingroups"><a class="el" href="group___epid_module.html">epid&amp;nbsp;</a> &raquo; <a class="el" href="group___epid_common.html">common</a> &raquo; <a class="el" href="group___epid_math.html">math</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Big number operations.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:ga2bf153e27be2683f0fb26f0f7ff1f718"><td class="memItemLeft" align="right" valign="top"><a id="ga2bf153e27be2683f0fb26f0f7ff1f718"></a>
typedef 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>
<tr class="memdesc:ga2bf153e27be2683f0fb26f0f7ff1f718"><td class="mdescLeft">&#160;</td><td class="mdescRight">Internal representation of large numbers. <br /></td></tr>
<tr class="separator:ga2bf153e27be2683f0fb26f0f7ff1f718"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem: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>
<tr class="memdesc:gad5f6f262bfd780fed3678bcee16f0aed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructs a new BigNum.  <a href="#gad5f6f262bfd780fed3678bcee16f0aed">More...</a><br /></td></tr>
<tr class="separator:gad5f6f262bfd780fed3678bcee16f0aed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:ga2d17600068b1d94000635c6644258a03"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deletes a previously allocated BigNum.  <a href="#ga2d17600068b1d94000635c6644258a03">More...</a><br /></td></tr>
<tr class="separator:ga2d17600068b1d94000635c6644258a03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:gabe8e39d5788423f41770a71a4c911fbe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Deserializes a BigNum from a string.  <a href="#gabe8e39d5788423f41770a71a4c911fbe">More...</a><br /></td></tr>
<tr class="separator:gabe8e39d5788423f41770a71a4c911fbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:ga904c16cc020e7196f22ac9abdc31b41f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serializes a BigNum to a string.  <a href="#ga904c16cc020e7196f22ac9abdc31b41f">More...</a><br /></td></tr>
<tr class="separator:ga904c16cc020e7196f22ac9abdc31b41f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:gae70fd9b3026f0ab3c7e9601d0a3186b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds two BigNum values.  <a href="#gae70fd9b3026f0ab3c7e9601d0a3186b8">More...</a><br /></td></tr>
<tr class="separator:gae70fd9b3026f0ab3c7e9601d0a3186b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:gacbec9669ab0fe768e2be74dcaca397ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subtracts two BigNum values.  <a href="#gacbec9669ab0fe768e2be74dcaca397ea">More...</a><br /></td></tr>
<tr class="separator:gacbec9669ab0fe768e2be74dcaca397ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:ga03c89b8b8dd87de2c0f4b5822145d317"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multiplies two BigNum values.  <a href="#ga03c89b8b8dd87de2c0f4b5822145d317">More...</a><br /></td></tr>
<tr class="separator:ga03c89b8b8dd87de2c0f4b5822145d317"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:ga166134085464b0df2c8efcfccf8ec573"><td class="mdescLeft">&#160;</td><td class="mdescRight">Divides two BigNum values.  <a href="#ga166134085464b0df2c8efcfccf8ec573">More...</a><br /></td></tr>
<tr class="separator:ga166134085464b0df2c8efcfccf8ec573"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:ga7dd6038987210d10bf843602fef0c929"><td class="mdescLeft">&#160;</td><td class="mdescRight">Computes modular reduction for BigNum value by specified modulus.  <a href="#ga7dd6038987210d10bf843602fef0c929">More...</a><br /></td></tr>
<tr class="separator:ga7dd6038987210d10bf843602fef0c929"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:gaf0366e47226563b17fcbc8e3ed766084"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if a BigNum is even.  <a href="#gaf0366e47226563b17fcbc8e3ed766084">More...</a><br /></td></tr>
<tr class="separator:gaf0366e47226563b17fcbc8e3ed766084"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:gacde6564a814617a96985b379be0dfabb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if a BigNum is zero.  <a href="#gacde6564a814617a96985b379be0dfabb">More...</a><br /></td></tr>
<tr class="separator:gacde6564a814617a96985b379be0dfabb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:gafd64b66fc85dab0005f4a1bb67bdf7b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Raises 2 to the given power.  <a href="#gafd64b66fc85dab0005f4a1bb67bdf7b4">More...</a><br /></td></tr>
<tr class="separator:gafd64b66fc85dab0005f4a1bb67bdf7b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Big number operations. </p>
<p>This module provides an API for working with large numbers. BigNums represent non-negative integers.</p>
<p>Each BigNum variable represents a number of a byte-size set when the variable was created. BigNum variables cannot be re-sized after they are created. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="gae70fd9b3026f0ab3c7e9601d0a3186b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae70fd9b3026f0ab3c7e9601d0a3186b8">&#9670;&nbsp;</a></span>BigNumAdd()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> BigNumAdd </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Adds two BigNum values. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>The first operand to be added. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>The second operand to be added. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">r</td><td>The result of adding a and b.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a> </dd></dl>

</div>
</div>
<a id="ga166134085464b0df2c8efcfccf8ec573"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga166134085464b0df2c8efcfccf8ec573">&#9670;&nbsp;</a></span>BigNumDiv()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> BigNumDiv </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *&#160;</td>
          <td class="paramname"><em>q</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Divides two BigNum values. </p>
<dl class="section note"><dt>Note</dt><dd>Only needed for Intel(R) EPID 1.1 verification.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>Dividend parameter. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Divisor parameter. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">q</td><td>Quotient of result. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">r</td><td>Remainder of result.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a> </dd></dl>

</div>
</div>
<a id="gaf0366e47226563b17fcbc8e3ed766084"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf0366e47226563b17fcbc8e3ed766084">&#9670;&nbsp;</a></span>BigNumIsEven()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> BigNumIsEven </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdtypes_8h.html#ad5c9d4ba3dc37783a528b0925dc981a0">bool</a> *&#160;</td>
          <td class="paramname"><em>is_even</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks if a BigNum is even. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>The BigNum to check. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">is_even</td><td>The result of the check.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a> </dd></dl>

</div>
</div>
<a id="gacde6564a814617a96985b379be0dfabb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacde6564a814617a96985b379be0dfabb">&#9670;&nbsp;</a></span>BigNumIsZero()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> BigNumIsZero </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="stdtypes_8h.html#ad5c9d4ba3dc37783a528b0925dc981a0">bool</a> *&#160;</td>
          <td class="paramname"><em>is_zero</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Checks if a BigNum is zero. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>The BigNum to check. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">is_zero</td><td>The result of the check.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a> </dd></dl>

</div>
</div>
<a id="ga7dd6038987210d10bf843602fef0c929"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7dd6038987210d10bf843602fef0c929">&#9670;&nbsp;</a></span>BigNumMod()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> BigNumMod </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Computes modular reduction for BigNum value by specified modulus. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>The BigNum value. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>The modulus. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">r</td><td>Modular reduction result.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a> </dd></dl>

</div>
</div>
<a id="ga03c89b8b8dd87de2c0f4b5822145d317"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga03c89b8b8dd87de2c0f4b5822145d317">&#9670;&nbsp;</a></span>BigNumMul()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> BigNumMul </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Multiplies two BigNum values. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>The first operand to be multiplied. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>The second operand to be multiplied. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">r</td><td>The result of multiplying a and b.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a> </dd></dl>

</div>
</div>
<a id="gafd64b66fc85dab0005f4a1bb67bdf7b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafd64b66fc85dab0005f4a1bb67bdf7b4">&#9670;&nbsp;</a></span>BigNumPow2N()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> BigNumPow2N </td>
          <td>(</td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Raises 2 to the given power. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">n</td><td>The power. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">r</td><td>The result of 2^n.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a> </dd></dl>

</div>
</div>
<a id="gacbec9669ab0fe768e2be74dcaca397ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gacbec9669ab0fe768e2be74dcaca397ea">&#9670;&nbsp;</a></span>BigNumSub()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> BigNumSub </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Subtracts two BigNum values. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>The first operand to use in subtraction. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>The second operand to use in subtraction. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">r</td><td>The result of subtracting a and b.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a> </dd></dl>

</div>
</div>
<a id="ga2d17600068b1d94000635c6644258a03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga2d17600068b1d94000635c6644258a03">&#9670;&nbsp;</a></span>DeleteBigNum()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void DeleteBigNum </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> **&#160;</td>
          <td class="paramname"><em>bignum</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deletes a previously allocated BigNum. </p>
<p>Frees memory pointed to by bignum. Nulls the pointer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">bignum</td><td>The BigNum. Can be NULL.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group___big_num_primitives.html#gad5f6f262bfd780fed3678bcee16f0aed" title="Constructs a new BigNum. ">NewBigNum</a> </dd></dl>

</div>
</div>
<a id="gad5f6f262bfd780fed3678bcee16f0aed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gad5f6f262bfd780fed3678bcee16f0aed">&#9670;&nbsp;</a></span>NewBigNum()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> NewBigNum </td>
          <td>(</td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>data_size_bytes</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> **&#160;</td>
          <td class="paramname"><em>bignum</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructs a new BigNum. </p>
<p>Allocates memory and creates a new BigNum.</p>
<p>Use <a class="el" href="group___big_num_primitives.html#ga2d17600068b1d94000635c6644258a03" title="Deletes a previously allocated BigNum. ">DeleteBigNum()</a> to free memory.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">data_size_bytes</td><td>The size in bytes of the new number. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">bignum</td><td>The BigNum.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a></dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group___big_num_primitives.html#ga2d17600068b1d94000635c6644258a03" title="Deletes a previously allocated BigNum. ">DeleteBigNum</a> </dd></dl>

</div>
</div>
<a id="gabe8e39d5788423f41770a71a4c911fbe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gabe8e39d5788423f41770a71a4c911fbe">&#9670;&nbsp;</a></span>ReadBigNum()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> ReadBigNum </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___epid_types.html#gace6876a045f2c2694444b35ccb0844e2">ConstOctStr</a>&#160;</td>
          <td class="paramname"><em>bn_str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>strlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> *&#160;</td>
          <td class="paramname"><em>bn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Deserializes a BigNum from a string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">bn_str</td><td>The serialized value. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">strlen</td><td>The size of bn_str in bytes. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">bn</td><td>The target BigNum.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a> </dd></dl>

</div>
</div>
<a id="ga904c16cc020e7196f22ac9abdc31b41f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga904c16cc020e7196f22ac9abdc31b41f">&#9670;&nbsp;</a></span>WriteBigNum()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360">EpidStatus</a> WriteBigNum </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group___big_num_primitives.html#ga2bf153e27be2683f0fb26f0f7ff1f718">BigNum</a> const *&#160;</td>
          <td class="paramname"><em>bn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>strlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group___epid_types.html#ga3315fb24f4c5783b6d6eb107933390b0">OctStr</a>&#160;</td>
          <td class="paramname"><em>bn_str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Serializes a BigNum to a string. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">bn</td><td>The BigNum to be serialized. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">strlen</td><td>The size of bn_str in bytes. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">bn_str</td><td>The target string.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group___error_codes.html#gafdb27c77c2c4b32c807e326a8a0da360" title="Return status for SDK functions. ">EpidStatus</a> </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="footer">
      &copy; 2016-2017 Intel Corporation
    </li>
  </ul>
</div>
</body>
</html>