Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > 0a67b807a02637f2cae68649d519a89d > files > 1259

libcryptopp-devel-7.0.0-1.mga7.armv7hl.rpm

<!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"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Crypto++: ModularArithmetic Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="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">Crypto++
   &#160;<span id="projectnumber">7.0</span>
   </div>
   <div id="projectbrief">Free&nbsp;C&#43;&#43;&nbsp;class&nbsp;library&nbsp;of&nbsp;cryptographic&nbsp;schemes</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<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('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="class_modular_arithmetic-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ModularArithmetic Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Ring of congruence classes modulo n.  
 <a href="class_modular_arithmetic.html#details">More...</a></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for ModularArithmetic:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
 <div class="center">
  <img src="class_modular_arithmetic.png" usemap="#ModularArithmetic_map" alt=""/>
  <map id="ModularArithmetic_map" name="ModularArithmetic_map">
<area href="class_abstract_ring.html" alt="AbstractRing&lt; Integer &gt;" shape="rect" coords="0,56,166,80"/>
<area href="class_abstract_group.html" alt="AbstractGroup&lt; Integer &gt;" shape="rect" coords="0,0,166,24"/>
<area href="class_montgomery_representation.html" title="Performs modular arithmetic in Montgomery representation for increased speed. " alt="MontgomeryRepresentation" shape="rect" coords="0,168,166,192"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a872afa5efebf43e4744156dcdfac3ca3"><td class="memItemLeft" align="right" valign="top"><a id="a872afa5efebf43e4744156dcdfac3ca3"></a>
typedef int&#160;</td><td class="memItemRight" valign="bottom"><b>RandomizationParameter</b></td></tr>
<tr class="separator:a872afa5efebf43e4744156dcdfac3ca3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17f2266382639dde45d028e630e07296"><td class="memItemLeft" align="right" valign="top"><a id="a17f2266382639dde45d028e630e07296"></a>
typedef <a class="el" href="class_integer.html">Integer</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Element</b></td></tr>
<tr class="separator:a17f2266382639dde45d028e630e07296"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_class_abstract_ring"><td colspan="2" onclick="javascript:toggleInherit('pub_types_class_abstract_ring')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="class_abstract_ring.html">AbstractRing&lt; Integer &gt;</a></td></tr>
<tr class="memitem:acd93e8ce4e2897173310c68fcb60f3e9 inherit pub_types_class_abstract_ring"><td class="memItemLeft" align="right" valign="top"><a id="acd93e8ce4e2897173310c68fcb60f3e9"></a>
typedef <a class="el" href="class_integer.html">Integer</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Element</b></td></tr>
<tr class="separator:acd93e8ce4e2897173310c68fcb60f3e9 inherit pub_types_class_abstract_ring"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_types_class_abstract_group"><td colspan="2" onclick="javascript:toggleInherit('pub_types_class_abstract_group')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="class_abstract_group.html">AbstractGroup&lt; Integer &gt;</a></td></tr>
<tr class="memitem:a4a2b3308fb5c13f70fcc5746be52ba7b inherit pub_types_class_abstract_group"><td class="memItemLeft" align="right" valign="top"><a id="a4a2b3308fb5c13f70fcc5746be52ba7b"></a>
typedef <a class="el" href="class_integer.html">Integer</a>&#160;</td><td class="memItemRight" valign="bottom"><b>Element</b></td></tr>
<tr class="separator:a4a2b3308fb5c13f70fcc5746be52ba7b inherit pub_types_class_abstract_group"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a1cdfc924e8d11f9620bd826535aabb62"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a1cdfc924e8d11f9620bd826535aabb62">ModularArithmetic</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;modulus=<a class="el" href="class_integer.html#a8c070592581bf6c2f928c72bfa1c1638">Integer::One</a>())</td></tr>
<tr class="memdesc:a1cdfc924e8d11f9620bd826535aabb62"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <a class="el" href="class_modular_arithmetic.html" title="Ring of congruence classes modulo n. ">ModularArithmetic</a>.  <a href="#a1cdfc924e8d11f9620bd826535aabb62">More...</a><br /></td></tr>
<tr class="separator:a1cdfc924e8d11f9620bd826535aabb62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a7bf808b07baa755ed9ce9f300ce743"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a7a7bf808b07baa755ed9ce9f300ce743">ModularArithmetic</a> (const <a class="el" href="class_modular_arithmetic.html">ModularArithmetic</a> &amp;ma)</td></tr>
<tr class="memdesc:a7a7bf808b07baa755ed9ce9f300ce743"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy construct a <a class="el" href="class_modular_arithmetic.html" title="Ring of congruence classes modulo n. ">ModularArithmetic</a>.  <a href="#a7a7bf808b07baa755ed9ce9f300ce743">More...</a><br /></td></tr>
<tr class="separator:a7a7bf808b07baa755ed9ce9f300ce743"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa13202d33f899282fa10019f6ac31427"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#aa13202d33f899282fa10019f6ac31427">ModularArithmetic</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;bt)</td></tr>
<tr class="memdesc:aa13202d33f899282fa10019f6ac31427"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <a class="el" href="class_modular_arithmetic.html" title="Ring of congruence classes modulo n. ">ModularArithmetic</a>.  <a href="#aa13202d33f899282fa10019f6ac31427">More...</a><br /></td></tr>
<tr class="separator:aa13202d33f899282fa10019f6ac31427"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ea01ae9e84d5392a8781b99d5cba83f"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_modular_arithmetic.html">ModularArithmetic</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a2ea01ae9e84d5392a8781b99d5cba83f">Clone</a> () const</td></tr>
<tr class="memdesc:a2ea01ae9e84d5392a8781b99d5cba83f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clone a <a class="el" href="class_modular_arithmetic.html" title="Ring of congruence classes modulo n. ">ModularArithmetic</a>.  <a href="#a2ea01ae9e84d5392a8781b99d5cba83f">More...</a><br /></td></tr>
<tr class="separator:a2ea01ae9e84d5392a8781b99d5cba83f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc8159f16af5576bd52ba748d23d6214"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#afc8159f16af5576bd52ba748d23d6214">DEREncode</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;bt) const</td></tr>
<tr class="memdesc:afc8159f16af5576bd52ba748d23d6214"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encodes in DER format.  <a href="#afc8159f16af5576bd52ba748d23d6214">More...</a><br /></td></tr>
<tr class="separator:afc8159f16af5576bd52ba748d23d6214"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7003a94955e76dfcb5ff2f9011a413ba"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a7003a94955e76dfcb5ff2f9011a413ba">DEREncodeElement</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;out, const <a class="el" href="class_integer.html">Element</a> &amp;a) const</td></tr>
<tr class="memdesc:a7003a94955e76dfcb5ff2f9011a413ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encodes element in DER format.  <a href="#a7003a94955e76dfcb5ff2f9011a413ba">More...</a><br /></td></tr>
<tr class="separator:a7003a94955e76dfcb5ff2f9011a413ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55824c8d8099d73bb5f4f851560bb606"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a55824c8d8099d73bb5f4f851560bb606">BERDecodeElement</a> (<a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;in, <a class="el" href="class_integer.html">Element</a> &amp;a) const</td></tr>
<tr class="memdesc:a55824c8d8099d73bb5f4f851560bb606"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decodes element in DER format.  <a href="#a55824c8d8099d73bb5f4f851560bb606">More...</a><br /></td></tr>
<tr class="separator:a55824c8d8099d73bb5f4f851560bb606"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71a51e5b665bf7fb89af2ccba19f0043"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a71a51e5b665bf7fb89af2ccba19f0043">GetModulus</a> () const</td></tr>
<tr class="memdesc:a71a51e5b665bf7fb89af2ccba19f0043"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the modulus.  <a href="#a71a51e5b665bf7fb89af2ccba19f0043">More...</a><br /></td></tr>
<tr class="separator:a71a51e5b665bf7fb89af2ccba19f0043"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2d7a07fd3831386eb9315c4e1f5fcf25"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a2d7a07fd3831386eb9315c4e1f5fcf25">SetModulus</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;newModulus)</td></tr>
<tr class="memdesc:a2d7a07fd3831386eb9315c4e1f5fcf25"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the modulus.  <a href="#a2d7a07fd3831386eb9315c4e1f5fcf25">More...</a><br /></td></tr>
<tr class="separator:a2d7a07fd3831386eb9315c4e1f5fcf25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a93adfe41f5545dcfaf3ee9f2b49bc3"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a7a93adfe41f5545dcfaf3ee9f2b49bc3">IsMontgomeryRepresentation</a> () const</td></tr>
<tr class="memdesc:a7a93adfe41f5545dcfaf3ee9f2b49bc3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the representation.  <a href="#a7a93adfe41f5545dcfaf3ee9f2b49bc3">More...</a><br /></td></tr>
<tr class="separator:a7a93adfe41f5545dcfaf3ee9f2b49bc3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc5cb8d95e05c9f8975b1b940218d07c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_integer.html">Integer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#afc5cb8d95e05c9f8975b1b940218d07c">ConvertIn</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;a) const</td></tr>
<tr class="memdesc:afc5cb8d95e05c9f8975b1b940218d07c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reduces an element in the congruence class.  <a href="#afc5cb8d95e05c9f8975b1b940218d07c">More...</a><br /></td></tr>
<tr class="separator:afc5cb8d95e05c9f8975b1b940218d07c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac97e7eea935290b4af9e89591f06f4cf"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_integer.html">Integer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#ac97e7eea935290b4af9e89591f06f4cf">ConvertOut</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;a) const</td></tr>
<tr class="memdesc:ac97e7eea935290b4af9e89591f06f4cf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reduces an element in the congruence class.  <a href="#ac97e7eea935290b4af9e89591f06f4cf">More...</a><br /></td></tr>
<tr class="separator:ac97e7eea935290b4af9e89591f06f4cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f48cc76a72062075778f317e29ae441"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a1f48cc76a72062075778f317e29ae441">Half</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;a) const</td></tr>
<tr class="memdesc:a1f48cc76a72062075778f317e29ae441"><td class="mdescLeft">&#160;</td><td class="mdescRight">Divides an element by 2.  <a href="#a1f48cc76a72062075778f317e29ae441">More...</a><br /></td></tr>
<tr class="separator:a1f48cc76a72062075778f317e29ae441"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89c5edea6e87341761c35ab03a46bcc0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a89c5edea6e87341761c35ab03a46bcc0">Equal</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;a, const <a class="el" href="class_integer.html">Integer</a> &amp;b) const</td></tr>
<tr class="memdesc:a89c5edea6e87341761c35ab03a46bcc0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compare two elements for equality.  <a href="#a89c5edea6e87341761c35ab03a46bcc0">More...</a><br /></td></tr>
<tr class="separator:a89c5edea6e87341761c35ab03a46bcc0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd2425e1caf5af1a290b424cadb1517c"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#abd2425e1caf5af1a290b424cadb1517c">Identity</a> () const</td></tr>
<tr class="memdesc:abd2425e1caf5af1a290b424cadb1517c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides the Identity element.  <a href="#abd2425e1caf5af1a290b424cadb1517c">More...</a><br /></td></tr>
<tr class="separator:abd2425e1caf5af1a290b424cadb1517c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af840f9421d210579fb9b526a90e857fe"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#af840f9421d210579fb9b526a90e857fe">Add</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;a, const <a class="el" href="class_integer.html">Integer</a> &amp;b) const</td></tr>
<tr class="memdesc:af840f9421d210579fb9b526a90e857fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds elements in the ring.  <a href="#af840f9421d210579fb9b526a90e857fe">More...</a><br /></td></tr>
<tr class="separator:af840f9421d210579fb9b526a90e857fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf6e8cc8fcabe8eed4c7ebc4361d28fc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#acf6e8cc8fcabe8eed4c7ebc4361d28fc">Accumulate</a> (<a class="el" href="class_integer.html">Integer</a> &amp;a, const <a class="el" href="class_integer.html">Integer</a> &amp;b) const</td></tr>
<tr class="memdesc:acf6e8cc8fcabe8eed4c7ebc4361d28fc"><td class="mdescLeft">&#160;</td><td class="mdescRight">TODO.  <a href="#acf6e8cc8fcabe8eed4c7ebc4361d28fc">More...</a><br /></td></tr>
<tr class="separator:acf6e8cc8fcabe8eed4c7ebc4361d28fc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a355c52bd9e20a22037f17d0461b4575a"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a355c52bd9e20a22037f17d0461b4575a">Inverse</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;a) const</td></tr>
<tr class="memdesc:a355c52bd9e20a22037f17d0461b4575a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Inverts the element in the ring.  <a href="#a355c52bd9e20a22037f17d0461b4575a">More...</a><br /></td></tr>
<tr class="separator:a355c52bd9e20a22037f17d0461b4575a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4705633e8ca4308894f9a26c6f2881c"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#ae4705633e8ca4308894f9a26c6f2881c">Subtract</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;a, const <a class="el" href="class_integer.html">Integer</a> &amp;b) const</td></tr>
<tr class="memdesc:ae4705633e8ca4308894f9a26c6f2881c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Subtracts elements in the ring.  <a href="#ae4705633e8ca4308894f9a26c6f2881c">More...</a><br /></td></tr>
<tr class="separator:ae4705633e8ca4308894f9a26c6f2881c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a131ab327c94c1967a936c144769d098c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a131ab327c94c1967a936c144769d098c">Reduce</a> (<a class="el" href="class_integer.html">Integer</a> &amp;a, const <a class="el" href="class_integer.html">Integer</a> &amp;b) const</td></tr>
<tr class="memdesc:a131ab327c94c1967a936c144769d098c"><td class="mdescLeft">&#160;</td><td class="mdescRight">TODO.  <a href="#a131ab327c94c1967a936c144769d098c">More...</a><br /></td></tr>
<tr class="separator:a131ab327c94c1967a936c144769d098c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a042dc36ae961ede73694e4c5dcf7cbbc"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a042dc36ae961ede73694e4c5dcf7cbbc">Double</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;a) const</td></tr>
<tr class="memdesc:a042dc36ae961ede73694e4c5dcf7cbbc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Doubles an element in the ring.  <a href="#a042dc36ae961ede73694e4c5dcf7cbbc">More...</a><br /></td></tr>
<tr class="separator:a042dc36ae961ede73694e4c5dcf7cbbc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af942a7ca057b363cb7a4c74f15a9530e"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#af942a7ca057b363cb7a4c74f15a9530e">MultiplicativeIdentity</a> () const</td></tr>
<tr class="memdesc:af942a7ca057b363cb7a4c74f15a9530e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the multiplicative identity.  <a href="#af942a7ca057b363cb7a4c74f15a9530e">More...</a><br /></td></tr>
<tr class="separator:af942a7ca057b363cb7a4c74f15a9530e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b88a85b11eb1a826d26d01bdaafbf0a"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a3b88a85b11eb1a826d26d01bdaafbf0a">Multiply</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;a, const <a class="el" href="class_integer.html">Integer</a> &amp;b) const</td></tr>
<tr class="memdesc:a3b88a85b11eb1a826d26d01bdaafbf0a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multiplies elements in the ring.  <a href="#a3b88a85b11eb1a826d26d01bdaafbf0a">More...</a><br /></td></tr>
<tr class="separator:a3b88a85b11eb1a826d26d01bdaafbf0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f74883ad789f0db51ed9b45385c14db"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a7f74883ad789f0db51ed9b45385c14db">Square</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;a) const</td></tr>
<tr class="memdesc:a7f74883ad789f0db51ed9b45385c14db"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="class_square.html" title="Square block cipher. ">Square</a> an element in the ring.  <a href="#a7f74883ad789f0db51ed9b45385c14db">More...</a><br /></td></tr>
<tr class="separator:a7f74883ad789f0db51ed9b45385c14db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d8edd3e4ff60627b92e93ebd00cdfb3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a0d8edd3e4ff60627b92e93ebd00cdfb3">IsUnit</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;a) const</td></tr>
<tr class="memdesc:a0d8edd3e4ff60627b92e93ebd00cdfb3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determines whether an element is a unit in the ring.  <a href="#a0d8edd3e4ff60627b92e93ebd00cdfb3">More...</a><br /></td></tr>
<tr class="separator:a0d8edd3e4ff60627b92e93ebd00cdfb3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a149c6c7abe3e1729880658db5650e48a"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a149c6c7abe3e1729880658db5650e48a">MultiplicativeInverse</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;a) const</td></tr>
<tr class="memdesc:a149c6c7abe3e1729880658db5650e48a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the multiplicative inverse of an element in the ring.  <a href="#a149c6c7abe3e1729880658db5650e48a">More...</a><br /></td></tr>
<tr class="separator:a149c6c7abe3e1729880658db5650e48a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a584d214676856d1463e14c6407d1cd31"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a584d214676856d1463e14c6407d1cd31">Divide</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;a, const <a class="el" href="class_integer.html">Integer</a> &amp;b) const</td></tr>
<tr class="memdesc:a584d214676856d1463e14c6407d1cd31"><td class="mdescLeft">&#160;</td><td class="mdescRight">Divides elements in the ring.  <a href="#a584d214676856d1463e14c6407d1cd31">More...</a><br /></td></tr>
<tr class="separator:a584d214676856d1463e14c6407d1cd31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc45ee154d39d39e45e0d0f7a053a8c1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_integer.html">Integer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#abc45ee154d39d39e45e0d0f7a053a8c1">CascadeExponentiate</a> (const <a class="el" href="class_integer.html">Integer</a> &amp;x, const <a class="el" href="class_integer.html">Integer</a> &amp;e1, const <a class="el" href="class_integer.html">Integer</a> &amp;y, const <a class="el" href="class_integer.html">Integer</a> &amp;e2) const</td></tr>
<tr class="memdesc:abc45ee154d39d39e45e0d0f7a053a8c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">TODO.  <a href="#abc45ee154d39d39e45e0d0f7a053a8c1">More...</a><br /></td></tr>
<tr class="separator:abc45ee154d39d39e45e0d0f7a053a8c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf8e51fdf899092a19520f3e0a367608"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#aaf8e51fdf899092a19520f3e0a367608">SimultaneousExponentiate</a> (<a class="el" href="class_integer.html">Element</a> *results, const <a class="el" href="class_integer.html">Element</a> &amp;base, const <a class="el" href="class_integer.html">Integer</a> *exponents, unsigned int exponentsCount) const</td></tr>
<tr class="memdesc:aaf8e51fdf899092a19520f3e0a367608"><td class="mdescLeft">&#160;</td><td class="mdescRight">Exponentiates a base to multiple exponents in the ring.  <a href="#aaf8e51fdf899092a19520f3e0a367608">More...</a><br /></td></tr>
<tr class="separator:aaf8e51fdf899092a19520f3e0a367608"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c802233b0edf8df4228d65082ff37fa"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a3c802233b0edf8df4228d65082ff37fa">MaxElementBitLength</a> () const</td></tr>
<tr class="memdesc:a3c802233b0edf8df4228d65082ff37fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides the maximum bit size of an element in the ring.  <a href="#a3c802233b0edf8df4228d65082ff37fa">More...</a><br /></td></tr>
<tr class="separator:a3c802233b0edf8df4228d65082ff37fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5897aea2ee78595979f8f261130c93ee"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a5897aea2ee78595979f8f261130c93ee">MaxElementByteLength</a> () const</td></tr>
<tr class="memdesc:a5897aea2ee78595979f8f261130c93ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides the maximum byte size of an element in the ring.  <a href="#a5897aea2ee78595979f8f261130c93ee">More...</a><br /></td></tr>
<tr class="separator:a5897aea2ee78595979f8f261130c93ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6abf94f5924223c316c04752ba39795a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_integer.html">Element</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a6abf94f5924223c316c04752ba39795a">RandomElement</a> (<a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &amp;rng, const RandomizationParameter &amp;ignore_for_now=0) const</td></tr>
<tr class="memdesc:a6abf94f5924223c316c04752ba39795a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Provides a random element in the ring.  <a href="#a6abf94f5924223c316c04752ba39795a">More...</a><br /></td></tr>
<tr class="separator:a6abf94f5924223c316c04752ba39795a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ebc62368fdab13aae9521778beeea4c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_modular_arithmetic.html#a0ebc62368fdab13aae9521778beeea4c">operator==</a> (const <a class="el" href="class_modular_arithmetic.html">ModularArithmetic</a> &amp;rhs) const</td></tr>
<tr class="memdesc:a0ebc62368fdab13aae9521778beeea4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compares two <a class="el" href="class_modular_arithmetic.html" title="Ring of congruence classes modulo n. ">ModularArithmetic</a> for equality.  <a href="#a0ebc62368fdab13aae9521778beeea4c">More...</a><br /></td></tr>
<tr class="separator:a0ebc62368fdab13aae9521778beeea4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_abstract_ring"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_abstract_ring')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_abstract_ring.html">AbstractRing&lt; Integer &gt;</a></td></tr>
<tr class="memitem:ae55c525c1aa75bf898907bd6949e2b64 inherit pub_methods_class_abstract_ring"><td class="memItemLeft" align="right" valign="top"><a id="ae55c525c1aa75bf898907bd6949e2b64"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_ring.html#ae55c525c1aa75bf898907bd6949e2b64">AbstractRing</a> ()</td></tr>
<tr class="memdesc:ae55c525c1aa75bf898907bd6949e2b64 inherit pub_methods_class_abstract_ring"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct an <a class="el" href="class_abstract_ring.html" title="Abstract ring. ">AbstractRing</a>. <br /></td></tr>
<tr class="separator:ae55c525c1aa75bf898907bd6949e2b64 inherit pub_methods_class_abstract_ring"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc8afd5ce95e32e45d3c30a710bf36dc inherit pub_methods_class_abstract_ring"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_ring.html#acc8afd5ce95e32e45d3c30a710bf36dc">AbstractRing</a> (const <a class="el" href="class_abstract_ring.html">AbstractRing</a> &amp;source)</td></tr>
<tr class="memdesc:acc8afd5ce95e32e45d3c30a710bf36dc inherit pub_methods_class_abstract_ring"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy construct an <a class="el" href="class_abstract_ring.html" title="Abstract ring. ">AbstractRing</a>.  <a href="class_abstract_ring.html#acc8afd5ce95e32e45d3c30a710bf36dc">More...</a><br /></td></tr>
<tr class="separator:acc8afd5ce95e32e45d3c30a710bf36dc inherit pub_methods_class_abstract_ring"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26709c02c869d09d756653ae1129f8a9 inherit pub_methods_class_abstract_ring"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_abstract_ring.html">AbstractRing</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_ring.html#a26709c02c869d09d756653ae1129f8a9">operator=</a> (const <a class="el" href="class_abstract_ring.html">AbstractRing</a> &amp;source)</td></tr>
<tr class="memdesc:a26709c02c869d09d756653ae1129f8a9 inherit pub_methods_class_abstract_ring"><td class="mdescLeft">&#160;</td><td class="mdescRight">Assign an <a class="el" href="class_abstract_ring.html" title="Abstract ring. ">AbstractRing</a>.  <a href="class_abstract_ring.html#a26709c02c869d09d756653ae1129f8a9">More...</a><br /></td></tr>
<tr class="separator:a26709c02c869d09d756653ae1129f8a9 inherit pub_methods_class_abstract_ring"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f011366054a4edb80be92f968083538 inherit pub_methods_class_abstract_ring"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_integer.html">Element</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_ring.html#a0f011366054a4edb80be92f968083538">Exponentiate</a> (const <a class="el" href="class_integer.html">Element</a> &amp;a, const <a class="el" href="class_integer.html">Integer</a> &amp;e) const</td></tr>
<tr class="memdesc:a0f011366054a4edb80be92f968083538 inherit pub_methods_class_abstract_ring"><td class="mdescLeft">&#160;</td><td class="mdescRight">Raises a base to an exponent in the group.  <a href="class_abstract_ring.html#a0f011366054a4edb80be92f968083538">More...</a><br /></td></tr>
<tr class="separator:a0f011366054a4edb80be92f968083538 inherit pub_methods_class_abstract_ring"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae19ef788f5ce5192e5867666ef38717f inherit pub_methods_class_abstract_ring"><td class="memItemLeft" align="right" valign="top">virtual const <a class="el" href="class_abstract_group.html">AbstractGroup</a>&lt; <a class="el" href="class_integer.html">Integer</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_ring.html#ae19ef788f5ce5192e5867666ef38717f">MultiplicativeGroup</a> () const</td></tr>
<tr class="memdesc:ae19ef788f5ce5192e5867666ef38717f inherit pub_methods_class_abstract_ring"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the multiplicative group.  <a href="class_abstract_ring.html#ae19ef788f5ce5192e5867666ef38717f">More...</a><br /></td></tr>
<tr class="separator:ae19ef788f5ce5192e5867666ef38717f inherit pub_methods_class_abstract_ring"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_class_abstract_group"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_class_abstract_group')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="class_abstract_group.html">AbstractGroup&lt; Integer &gt;</a></td></tr>
<tr class="memitem:a257836994abefe25b80293f4c6b10f60 inherit pub_methods_class_abstract_group"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_group.html#a257836994abefe25b80293f4c6b10f60">InversionIsFast</a> () const</td></tr>
<tr class="memdesc:a257836994abefe25b80293f4c6b10f60 inherit pub_methods_class_abstract_group"><td class="mdescLeft">&#160;</td><td class="mdescRight">Determine if inversion is fast.  <a href="class_abstract_group.html#a257836994abefe25b80293f4c6b10f60">More...</a><br /></td></tr>
<tr class="separator:a257836994abefe25b80293f4c6b10f60 inherit pub_methods_class_abstract_group"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac01536b91c4fa3d0e0f929917143595b inherit pub_methods_class_abstract_group"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_integer.html">Element</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_group.html#ac01536b91c4fa3d0e0f929917143595b">ScalarMultiply</a> (const <a class="el" href="class_integer.html">Element</a> &amp;a, const <a class="el" href="class_integer.html">Integer</a> &amp;e) const</td></tr>
<tr class="memdesc:ac01536b91c4fa3d0e0f929917143595b inherit pub_methods_class_abstract_group"><td class="mdescLeft">&#160;</td><td class="mdescRight">Performs a scalar multiplication.  <a href="class_abstract_group.html#ac01536b91c4fa3d0e0f929917143595b">More...</a><br /></td></tr>
<tr class="separator:ac01536b91c4fa3d0e0f929917143595b inherit pub_methods_class_abstract_group"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89bd24f1a83e62ac8cc5ad014cb5883e inherit pub_methods_class_abstract_group"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_integer.html">Element</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_group.html#a89bd24f1a83e62ac8cc5ad014cb5883e">CascadeScalarMultiply</a> (const <a class="el" href="class_integer.html">Element</a> &amp;x, const <a class="el" href="class_integer.html">Integer</a> &amp;e1, const <a class="el" href="class_integer.html">Element</a> &amp;y, const <a class="el" href="class_integer.html">Integer</a> &amp;e2) const</td></tr>
<tr class="memdesc:a89bd24f1a83e62ac8cc5ad014cb5883e inherit pub_methods_class_abstract_group"><td class="mdescLeft">&#160;</td><td class="mdescRight">TODO.  <a href="class_abstract_group.html#a89bd24f1a83e62ac8cc5ad014cb5883e">More...</a><br /></td></tr>
<tr class="separator:a89bd24f1a83e62ac8cc5ad014cb5883e inherit pub_methods_class_abstract_group"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c73ab688612e76786f43e311376eb8d inherit pub_methods_class_abstract_group"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_abstract_group.html#a9c73ab688612e76786f43e311376eb8d">SimultaneousMultiply</a> (<a class="el" href="class_integer.html">Element</a> *results, const <a class="el" href="class_integer.html">Element</a> &amp;base, const <a class="el" href="class_integer.html">Integer</a> *exponents, unsigned int exponentsCount) const</td></tr>
<tr class="memdesc:a9c73ab688612e76786f43e311376eb8d inherit pub_methods_class_abstract_group"><td class="mdescLeft">&#160;</td><td class="mdescRight">Multiplies a base to multiple exponents in a group.  <a href="class_abstract_group.html#a9c73ab688612e76786f43e311376eb8d">More...</a><br /></td></tr>
<tr class="separator:a9c73ab688612e76786f43e311376eb8d inherit pub_methods_class_abstract_group"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a0bc237302baf05d7a7dcf7469eb2d331"><td class="memItemLeft" align="right" valign="top"><a id="a0bc237302baf05d7a7dcf7469eb2d331"></a>
static const RandomizationParameter&#160;</td><td class="memItemRight" valign="bottom"><b>DefaultRandomizationParameter</b></td></tr>
<tr class="separator:a0bc237302baf05d7a7dcf7469eb2d331"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Ring of congruence classes modulo n. </p>
<p>This implementation represents each congruence class as the smallest non-negative integer in that class.</p>
<p><code>const Element&amp;</code> returned by member functions are references to internal data members. Since each object may have only one such data member for holding results, the following code will produce incorrect results: </p><pre>    abcd = group.Add(group.Add(a,b), group.Add(c,d));</pre><p> But this should be fine: </p><pre>    abcd = group.Add(a, group.Add(b, group.Add(c,d));</pre> 
<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00038">38</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a1cdfc924e8d11f9620bd826535aabb62"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1cdfc924e8d11f9620bd826535aabb62">&#9670;&nbsp;</a></span>ModularArithmetic() <span class="overload">[1/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">ModularArithmetic::ModularArithmetic </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>modulus</em> = <code><a class="el" href="class_integer.html#a8c070592581bf6c2f928c72bfa1c1638">Integer::One</a>()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <a class="el" href="class_modular_arithmetic.html" title="Ring of congruence classes modulo n. ">ModularArithmetic</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">modulus</td><td>congruence class modulus </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00049">49</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

</div>
</div>
<a id="a7a7bf808b07baa755ed9ce9f300ce743"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a7bf808b07baa755ed9ce9f300ce743">&#9670;&nbsp;</a></span>ModularArithmetic() <span class="overload">[2/3]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">ModularArithmetic::ModularArithmetic </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_modular_arithmetic.html">ModularArithmetic</a> &amp;&#160;</td>
          <td class="paramname"><em>ma</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Copy construct a <a class="el" href="class_modular_arithmetic.html" title="Ring of congruence classes modulo n. ">ModularArithmetic</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">ma</td><td>other <a class="el" href="class_modular_arithmetic.html" title="Ring of congruence classes modulo n. ">ModularArithmetic</a> </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00054">54</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

</div>
</div>
<a id="aa13202d33f899282fa10019f6ac31427"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa13202d33f899282fa10019f6ac31427">&#9670;&nbsp;</a></span>ModularArithmetic() <span class="overload">[3/3]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ModularArithmetic::ModularArithmetic </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;&#160;</td>
          <td class="paramname"><em>bt</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Construct a <a class="el" href="class_modular_arithmetic.html" title="Ring of congruence classes modulo n. ">ModularArithmetic</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bt</td><td>BER encoded <a class="el" href="class_modular_arithmetic.html" title="Ring of congruence classes modulo n. ">ModularArithmetic</a> </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="integer_8cpp_source.html#l04454">4454</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a2ea01ae9e84d5392a8781b99d5cba83f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ea01ae9e84d5392a8781b99d5cba83f">&#9670;&nbsp;</a></span>Clone()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_modular_arithmetic.html">ModularArithmetic</a>* ModularArithmetic::Clone </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Clone a <a class="el" href="class_modular_arithmetic.html" title="Ring of congruence classes modulo n. ">ModularArithmetic</a>. </p>
<dl class="section return"><dt>Returns</dt><dd>pointer to a new <a class="el" href="class_modular_arithmetic.html" title="Ring of congruence classes modulo n. ">ModularArithmetic</a></dd></dl>
<p>Clone effectively copy constructs a new <a class="el" href="class_modular_arithmetic.html" title="Ring of congruence classes modulo n. ">ModularArithmetic</a>. The caller is responsible for deleting the pointer returned from this method. </p>

<p>Reimplemented in <a class="el" href="class_montgomery_representation.html#a4591893e6fb0e05f4d2585cddcc15201">MontgomeryRepresentation</a>.</p>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00065">65</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ModularArithmetic::DEREncode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;&#160;</td>
          <td class="paramname"><em>bt</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encodes in DER format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bt</td><td><a class="el" href="class_buffered_transformation.html" title="Interface for buffered transformations. ">BufferedTransformation</a> object </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="integer_8cpp_source.html#l04465">4465</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>

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

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ModularArithmetic::DEREncodeElement </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Element</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encodes element in DER format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">out</td><td><a class="el" href="class_buffered_transformation.html" title="Interface for buffered transformations. ">BufferedTransformation</a> object </td></tr>
    <tr><td class="paramname">a</td><td>Element to encode </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="integer_8cpp_source.html#l04473">4473</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>

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

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ModularArithmetic::BERDecodeElement </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_integer.html">Element</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decodes element in DER format. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">in</td><td><a class="el" href="class_buffered_transformation.html" title="Interface for buffered transformations. ">BufferedTransformation</a> object </td></tr>
    <tr><td class="paramname">a</td><td>Element to decode </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="integer_8cpp_source.html#l04478">4478</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_integer.html">Integer</a>&amp; ModularArithmetic::GetModulus </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Retrieves the modulus. </p>
<dl class="section return"><dt>Returns</dt><dd>the modulus </dd></dl>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00083">83</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ModularArithmetic::SetModulus </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>newModulus</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Sets the modulus. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">newModulus</td><td>the new modulus </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00087">87</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool ModularArithmetic::IsMontgomeryRepresentation </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Retrieves the representation. </p>
<dl class="section return"><dt>Returns</dt><dd>true if the if the modulus is in Montgomery form for multiplication, false otherwise </dd></dl>

<p>Reimplemented in <a class="el" href="class_montgomery_representation.html#a5e2e1914f195a03be80c58d62be84f5e">MontgomeryRepresentation</a>.</p>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00092">92</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_integer.html">Integer</a> ModularArithmetic::ConvertIn </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reduces an element in the congruence class. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>element to convert </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the reduced element</dd></dl>
<p>ConvertIn is useful for derived classes, like <a class="el" href="class_montgomery_representation.html" title="Performs modular arithmetic in Montgomery representation for increased speed. ">MontgomeryRepresentation</a>, which must convert between representations. </p>

<p>Reimplemented in <a class="el" href="class_montgomery_representation.html#a502f8e7355d1eb252159c0d6e149379a">MontgomeryRepresentation</a>.</p>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00099">99</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="class_integer.html">Integer</a> ModularArithmetic::ConvertOut </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Reduces an element in the congruence class. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>element to convert </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the reduced element</dd></dl>
<p>ConvertOut is useful for derived classes, like <a class="el" href="class_montgomery_representation.html" title="Performs modular arithmetic in Montgomery representation for increased speed. ">MontgomeryRepresentation</a>, which must convert between representations. </p>

<p>Reimplemented in <a class="el" href="class_montgomery_representation.html#a2591b1df42db492ab9792bbe1fc9bf5e">MontgomeryRepresentation</a>.</p>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00107">107</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_integer.html">Integer</a> &amp; ModularArithmetic::Half </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Divides an element by 2. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>element to convert </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="integer_8cpp_source.html#l04483">4483</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool ModularArithmetic::Equal </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compare two elements for equality. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>first element </td></tr>
    <tr><td class="paramname">b</td><td>second element </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the elements are equal, false otherwise</dd></dl>
<p><a class="el" href="class_modular_arithmetic.html#a89c5edea6e87341761c35ab03a46bcc0" title="Compare two elements for equality. ">Equal()</a> tests the elements for equality using <code>a==b</code> </p>

<p>Implements <a class="el" href="class_abstract_group.html#a0d72cb663566b7c056f846a561547bec">AbstractGroup&lt; Integer &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00119">119</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_integer.html">Integer</a>&amp; ModularArithmetic::Identity </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Provides the Identity element. </p>
<dl class="section return"><dt>Returns</dt><dd>the Identity element </dd></dl>

<p>Implements <a class="el" href="class_abstract_group.html#a929ba4e6a7d7d80344946efad0456d5b">AbstractGroup&lt; Integer &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00124">124</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_integer.html">Integer</a> &amp; ModularArithmetic::Add </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Adds elements in the ring. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>first element </td></tr>
    <tr><td class="paramname">b</td><td>second element </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the sum of <code>a</code> and <code>b</code> </dd></dl>

<p>Implements <a class="el" href="class_abstract_group.html#aa813430d9e4244de24c487d090eb5797">AbstractGroup&lt; Integer &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="integer_8cpp_source.html#l04494">4494</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_integer.html">Integer</a> &amp; ModularArithmetic::Accumulate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>TODO. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>first element </td></tr>
    <tr><td class="paramname">b</td><td>second element </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TODO </dd></dl>

<p>Reimplemented from <a class="el" href="class_abstract_group.html#ab03cc0a23f23c6aa1c003e11f9abb8c5">AbstractGroup&lt; Integer &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="integer_8cpp_source.html#l04514">4514</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_integer.html">Integer</a> &amp; ModularArithmetic::Inverse </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Inverts the element in the ring. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>first element </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the inverse of the element </dd></dl>

<p>Implements <a class="el" href="class_abstract_group.html#ab22563bc0dcb544399d7e22b3589e165">AbstractGroup&lt; Integer &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="integer_8cpp_source.html#l04568">4568</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_integer.html">Integer</a> &amp; ModularArithmetic::Subtract </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Subtracts elements in the ring. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>first element </td></tr>
    <tr><td class="paramname">b</td><td>second element </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the difference of <code>a</code> and <code>b</code>. The element <code>a</code> must provide a Subtract member function. </dd></dl>

<p>Reimplemented from <a class="el" href="class_abstract_group.html#aa19e1bef00198fb30eb01df3f7076717">AbstractGroup&lt; Integer &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="integer_8cpp_source.html#l04534">4534</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_integer.html">Integer</a> &amp; ModularArithmetic::Reduce </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>TODO. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>first element </td></tr>
    <tr><td class="paramname">b</td><td>second element </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TODO </dd></dl>

<p>Reimplemented from <a class="el" href="class_abstract_group.html#a40f7de55eddc193e07a7c3b5acad781a">AbstractGroup&lt; Integer &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="integer_8cpp_source.html#l04551">4551</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_integer.html">Integer</a>&amp; ModularArithmetic::Double </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Doubles an element in the ring. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>the element </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the element doubled</dd></dl>
<p>Double returns <code>Add(a, a)</code>. The element <code>a</code> must provide an Add member function. </p>

<p>Reimplemented from <a class="el" href="class_abstract_group.html#afaceaf9c9c24606efc38d30fd8aff5ee">AbstractGroup&lt; Integer &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00160">160</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_integer.html">Integer</a>&amp; ModularArithmetic::MultiplicativeIdentity </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Retrieves the multiplicative identity. </p>
<dl class="section return"><dt>Returns</dt><dd>the multiplicative identity</dd></dl>
<p>the base class implementations returns 1. </p>

<p>Implements <a class="el" href="class_abstract_ring.html#a390832165268e39e2a1f3263e5b44627">AbstractRing&lt; Integer &gt;</a>.</p>

<p>Reimplemented in <a class="el" href="class_montgomery_representation.html#aebab2112b22e0af65d4d0048166ca432">MontgomeryRepresentation</a>.</p>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00166">166</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_integer.html">Integer</a>&amp; ModularArithmetic::Multiply </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Multiplies elements in the ring. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>the multiplicand </td></tr>
    <tr><td class="paramname">b</td><td>the multiplier </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the product of a and b</dd></dl>
<p>Multiply returns <code>a*b%n</code>. </p>

<p>Implements <a class="el" href="class_abstract_ring.html#a4ba8818fc72fa298cd52fd483bdd6ad4">AbstractRing&lt; Integer &gt;</a>.</p>

<p>Reimplemented in <a class="el" href="class_montgomery_representation.html#a793d265b8165135e2e972bf333ac5a49">MontgomeryRepresentation</a>.</p>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00174">174</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_integer.html">Integer</a>&amp; ModularArithmetic::Square </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p><a class="el" href="class_square.html" title="Square block cipher. ">Square</a> an element in the ring. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>the element </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the element squared</dd></dl>
<p><a class="el" href="class_square.html" title="Square block cipher. ">Square</a> returns <code>a*a%n</code>. The element <code>a</code> must provide a <a class="el" href="class_square.html" title="Square block cipher. ">Square</a> member function. </p>

<p>Reimplemented from <a class="el" href="class_abstract_ring.html#a54b38c3a067b893e0c87495bee7adcef">AbstractRing&lt; Integer &gt;</a>.</p>

<p>Reimplemented in <a class="el" href="class_montgomery_representation.html#a2f24e4fb6d9b9fc9c6b363d41e7ee449">MontgomeryRepresentation</a>.</p>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00181">181</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool ModularArithmetic::IsUnit </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Determines whether an element is a unit in the ring. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>the element </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the element is a unit after reduction, false otherwise. </dd></dl>

<p>Implements <a class="el" href="class_abstract_ring.html#acc7079c244d980c670c329e483c4f107">AbstractRing&lt; Integer &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00187">187</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_integer.html">Integer</a>&amp; ModularArithmetic::MultiplicativeInverse </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Calculate the multiplicative inverse of an element in the ring. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>the element</td></tr>
  </table>
  </dd>
</dl>
<p>MultiplicativeInverse returns <code>a<sup>-1</sup>%n</code>. The element <code>a</code> must provide a InverseMod member function. </p>

<p>Implements <a class="el" href="class_abstract_ring.html#aba109f4e7932d77a8251c1ec20627571">AbstractRing&lt; Integer &gt;</a>.</p>

<p>Reimplemented in <a class="el" href="class_montgomery_representation.html#ae1c2c1f3144d88ee4cdb2bd5b5a376b8">MontgomeryRepresentation</a>.</p>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00194">194</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="class_integer.html">Integer</a>&amp; ModularArithmetic::Divide </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Divides elements in the ring. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>the dividend </td></tr>
    <tr><td class="paramname">b</td><td>the divisor </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the quotient</dd></dl>
<p>Divide returns <code>a*b<sup>-1</sup>%n</code>. </p>

<p>Reimplemented from <a class="el" href="class_abstract_ring.html#aa7ce20a30d89a8257088930d1d06d0b7">AbstractRing&lt; Integer &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00202">202</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_integer.html">Integer</a> ModularArithmetic::CascadeExponentiate </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>e1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> &amp;&#160;</td>
          <td class="paramname"><em>e2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>TODO. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">x</td><td>first element </td></tr>
    <tr><td class="paramname">e1</td><td>first exponent </td></tr>
    <tr><td class="paramname">y</td><td>second element </td></tr>
    <tr><td class="paramname">e2</td><td>second exponent </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>TODO </dd></dl>

<p>Reimplemented from <a class="el" href="class_abstract_ring.html#adb4d33ac59a8f8bff1752b75809136e6">AbstractRing&lt; Integer &gt;</a>.</p>

<p>Reimplemented in <a class="el" href="class_montgomery_representation.html#a63d9f4e3b09f34349fcc87059d86a77a">MontgomeryRepresentation</a>.</p>

<p class="definition">Definition at line <a class="el" href="integer_8cpp_source.html#l04580">4580</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ModularArithmetic::SimultaneousExponentiate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_integer.html">Element</a> *&#160;</td>
          <td class="paramname"><em>results</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Element</a> &amp;&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_integer.html">Integer</a> *&#160;</td>
          <td class="paramname"><em>exponents</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>exponentsCount</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Exponentiates a base to multiple exponents in the ring. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">results</td><td>an array of Elements </td></tr>
    <tr><td class="paramname">base</td><td>the base to raise to the exponents </td></tr>
    <tr><td class="paramname">exponents</td><td>an array of exponents </td></tr>
    <tr><td class="paramname">exponentsCount</td><td>the number of exponents in the array</td></tr>
  </table>
  </dd>
</dl>
<p><a class="el" href="class_modular_arithmetic.html#aaf8e51fdf899092a19520f3e0a367608" title="Exponentiates a base to multiple exponents in the ring. ">SimultaneousExponentiate()</a> raises the base to each exponent in the exponents array and stores the result at the respective position in the results array.</p>
<p><a class="el" href="class_modular_arithmetic.html#aaf8e51fdf899092a19520f3e0a367608" title="Exponentiates a base to multiple exponents in the ring. ">SimultaneousExponentiate()</a> must be implemented in a derived class. </p><dl class="section pre"><dt>Precondition</dt><dd><code><a class="el" href="misc_8h.html#a2d7e4464ea73d6393ebe78f952253426" title="Counts elements in an array. ">COUNTOF(results)</a> == exponentsCount</code> </dd>
<dd>
<code><a class="el" href="misc_8h.html#a2d7e4464ea73d6393ebe78f952253426" title="Counts elements in an array. ">COUNTOF(exponents)</a> == exponentsCount</code> </dd></dl>

<p>Reimplemented from <a class="el" href="class_abstract_ring.html#a63530b69e7bfa78e5ee7b072cc798f0a">AbstractRing&lt; Integer &gt;</a>.</p>

<p>Reimplemented in <a class="el" href="class_montgomery_representation.html#a1b03500e21a63d27be5c137877b69d43">MontgomeryRepresentation</a>.</p>

<p class="definition">Definition at line <a class="el" href="integer_8cpp_source.html#l04591">4591</a> of file <a class="el" href="integer_8cpp_source.html">integer.cpp</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int ModularArithmetic::MaxElementBitLength </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Provides the maximum bit size of an element in the ring. </p>
<dl class="section return"><dt>Returns</dt><dd>maximum bit size of an element </dd></dl>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00227">227</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int ModularArithmetic::MaxElementByteLength </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Provides the maximum byte size of an element in the ring. </p>
<dl class="section return"><dt>Returns</dt><dd>maximum byte size of an element </dd></dl>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00232">232</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_integer.html">Element</a> ModularArithmetic::RandomElement </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_random_number_generator.html">RandomNumberGenerator</a> &amp;&#160;</td>
          <td class="paramname"><em>rng</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const RandomizationParameter &amp;&#160;</td>
          <td class="paramname"><em>ignore_for_now</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Provides a random element in the ring. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rng</td><td><a class="el" href="class_random_number_generator.html" title="Interface for random number generators. ">RandomNumberGenerator</a> used to generate material </td></tr>
    <tr><td class="paramname">ignore_for_now</td><td>unused </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a random element that is uniformly distributed</dd></dl>
<p>RandomElement constructs a new element in the range <code>[0,n-1]</code>, inclusive. The element's class must provide a constructor with the signature <code>Element(<a class="el" href="class_random_number_generator.html" title="Interface for random number generators. ">RandomNumberGenerator</a> rng, Element min, Element max)</code>. </p>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00242">242</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

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

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool ModularArithmetic::operator== </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_modular_arithmetic.html">ModularArithmetic</a> &amp;&#160;</td>
          <td class="paramname"><em>rhs</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compares two <a class="el" href="class_modular_arithmetic.html" title="Ring of congruence classes modulo n. ">ModularArithmetic</a> for equality. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">rhs</td><td>other <a class="el" href="class_modular_arithmetic.html" title="Ring of congruence classes modulo n. ">ModularArithmetic</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if this is equal to the other, false otherwise</dd></dl>
<p>The operator tests for equality using <code>this.m_modulus == rhs.m_modulus</code>. </p>

<p class="definition">Definition at line <a class="el" href="modarith_8h_source.html#l00253">253</a> of file <a class="el" href="modarith_8h_source.html">modarith.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="modarith_8h_source.html">modarith.h</a></li>
<li><a class="el" href="integer_8cpp_source.html">integer.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Sep 16 2018 07:58:44 for Crypto++ by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>