Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-updates > by-pkgid > 17f48c047155a7d4c992d6a672acd57f > files > 2446

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Crypto++: modexppc.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="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.15 -->
<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="headertitle">
<div class="title">modexppc.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef CRYPTOPP_MODEXPPC_H</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define CRYPTOPP_MODEXPPC_H</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;</div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="cryptlib_8h.html">cryptlib.h</a>&quot;</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="modarith_8h.html">modarith.h</a>&quot;</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="integer_8h.html">integer.h</a>&quot;</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="algebra_8h.html">algebra.h</a>&quot;</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="eprecomp_8h.html">eprecomp.h</a>&quot;</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="smartptr_8h.html">smartptr.h</a>&quot;</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="pubkey_8h.html">pubkey.h</a>&quot;</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#if CRYPTOPP_MSC_VERSION</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor"># pragma warning(push)</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="preprocessor"># pragma warning(disable: 4231 4275)</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;NAMESPACE_BEGIN(<a class="code" href="namespace_crypto_p_p.html">CryptoPP</a>)</div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;CRYPTOPP_DLL_TEMPLATE_CLASS <a class="code" href="class_d_l___fixed_base_precomputation_impl.html">DL_FixedBasePrecomputationImpl&lt;Integer&gt;</a>;</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno"><a class="line" href="class_mod_exp_precomputation.html">   21</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_mod_exp_precomputation.html">ModExpPrecomputation</a> : <span class="keyword">public</span> <a class="code" href="class_d_l___group_precomputation.html">DL_GroupPrecomputation</a>&lt;Integer&gt;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;{</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <span class="keyword">virtual</span> ~<a class="code" href="class_mod_exp_precomputation.html">ModExpPrecomputation</a>() {}</div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <span class="comment">// DL_GroupPrecomputation</span></div><div class="line"><a name="l00027"></a><span class="lineno"><a class="line" href="class_mod_exp_precomputation.html#a4606d689b130f8fcaf156314e4837e4a">   27</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="class_mod_exp_precomputation.html#a4606d689b130f8fcaf156314e4837e4a">NeedConversions</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> <span class="keyword">true</span>;}</div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="class_mod_exp_precomputation.html#a5e06496338c37c44bfd31ad96eff5866">   28</a></span>&#160;    <a class="code" href="class_integer.html">Element</a> <a class="code" href="class_mod_exp_precomputation.html#a5e06496338c37c44bfd31ad96eff5866">ConvertIn</a>(<span class="keyword">const</span> <a class="code" href="class_integer.html">Element</a> &amp;v)<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_mr-&gt;ConvertIn(v);}</div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="class_mod_exp_precomputation.html#a4531a88f7159d8399c78a84f3d3caf37">   29</a></span>&#160;    <span class="keyword">virtual</span> <a class="code" href="class_integer.html">Element</a> <a class="code" href="class_mod_exp_precomputation.html#a4531a88f7159d8399c78a84f3d3caf37">ConvertOut</a>(<span class="keyword">const</span> <a class="code" href="class_integer.html">Element</a> &amp;v)<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_mr-&gt;ConvertOut(v);}</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="class_mod_exp_precomputation.html#a2abaa90591d78eba6fbbc121033de7d8">   30</a></span>&#160;    <span class="keyword">const</span> <a class="code" href="class_abstract_group.html">AbstractGroup&lt;Element&gt;</a> &amp; <a class="code" href="class_mod_exp_precomputation.html#a2abaa90591d78eba6fbbc121033de7d8">GetGroup</a>()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_mr-&gt;MultiplicativeGroup();}</div><div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="class_mod_exp_precomputation.html#adbd591c4266c63d0b6786fbb80be6a64">   31</a></span>&#160;    <a class="code" href="class_integer.html">Element</a> <a class="code" href="class_mod_exp_precomputation.html#adbd591c4266c63d0b6786fbb80be6a64">BERDecodeElement</a>(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;bt)<span class="keyword"> const </span>{<span class="keywordflow">return</span> <a class="code" href="class_integer.html">Integer</a>(bt);}</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="class_mod_exp_precomputation.html#a04c495df3a4f8e72b26c7c7b6fc712cb">   32</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="class_mod_exp_precomputation.html#a04c495df3a4f8e72b26c7c7b6fc712cb">DEREncodeElement</a>(<a class="code" href="class_buffered_transformation.html">BufferedTransformation</a> &amp;bt, <span class="keyword">const</span> <a class="code" href="class_integer.html">Element</a> &amp;v)<span class="keyword"> const </span>{v.<a class="code" href="class_integer.html#a0671bd1dbe49e2eecdaaa65ffcb5b6ec">DEREncode</a>(bt);}</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;    <span class="comment">// non-inherited</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="keywordtype">void</span> SetModulus(<span class="keyword">const</span> <a class="code" href="class_integer.html">Integer</a> &amp;v) {m_mr.reset(<span class="keyword">new</span> <a class="code" href="class_montgomery_representation.html">MontgomeryRepresentation</a>(v));}</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;    <span class="keyword">const</span> <a class="code" href="class_integer.html">Integer</a> &amp; GetModulus()<span class="keyword"> const </span>{<span class="keywordflow">return</span> m_mr-&gt;GetModulus();}</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <a class="code" href="classvalue__ptr.html">value_ptr&lt;MontgomeryRepresentation&gt;</a> m_mr;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;};</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;NAMESPACE_END</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#if CRYPTOPP_MSC_VERSION</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor"># pragma warning(pop)</span></div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="class_mod_exp_precomputation_html_a4531a88f7159d8399c78a84f3d3caf37"><div class="ttname"><a href="class_mod_exp_precomputation.html#a4531a88f7159d8399c78a84f3d3caf37">ModExpPrecomputation::ConvertOut</a></div><div class="ttdeci">virtual Element ConvertOut(const Element &amp;v) const</div><div class="ttdoc">Converts an element between representations.</div><div class="ttdef"><b>Definition:</b> <a href="modexppc_8h_source.html#l00029">modexppc.h:29</a></div></div>
<div class="ttc" id="class_mod_exp_precomputation_html_a4606d689b130f8fcaf156314e4837e4a"><div class="ttname"><a href="class_mod_exp_precomputation.html#a4606d689b130f8fcaf156314e4837e4a">ModExpPrecomputation::NeedConversions</a></div><div class="ttdeci">bool NeedConversions() const</div><div class="ttdoc">Determines if elements needs conversion.</div><div class="ttdef"><b>Definition:</b> <a href="modexppc_8h_source.html#l00027">modexppc.h:27</a></div></div>
<div class="ttc" id="class_d_l___group_precomputation_html"><div class="ttname"><a href="class_d_l___group_precomputation.html">DL_GroupPrecomputation</a></div><div class="ttdoc">DL_GroupPrecomputation interface.</div><div class="ttdef"><b>Definition:</b> <a href="eprecomp_8h_source.html#l00019">eprecomp.h:19</a></div></div>
<div class="ttc" id="class_integer_html_a0671bd1dbe49e2eecdaaa65ffcb5b6ec"><div class="ttname"><a href="class_integer.html#a0671bd1dbe49e2eecdaaa65ffcb5b6ec">Integer::DEREncode</a></div><div class="ttdeci">void DEREncode(BufferedTransformation &amp;bt) const</div><div class="ttdoc">Encode in DER format.</div><div class="ttdef"><b>Definition:</b> <a href="integer_8cpp_source.html#l03405">integer.cpp:3405</a></div></div>
<div class="ttc" id="pubkey_8h_html"><div class="ttname"><a href="pubkey_8h.html">pubkey.h</a></div><div class="ttdoc">This file contains helper classes/functions for implementing public key algorithms.</div></div>
<div class="ttc" id="cryptlib_8h_html"><div class="ttname"><a href="cryptlib_8h.html">cryptlib.h</a></div><div class="ttdoc">Abstract base classes that provide a uniform interface to this library.</div></div>
<div class="ttc" id="smartptr_8h_html"><div class="ttname"><a href="smartptr_8h.html">smartptr.h</a></div><div class="ttdoc">Classes for automatic resource management.</div></div>
<div class="ttc" id="class_mod_exp_precomputation_html_a5e06496338c37c44bfd31ad96eff5866"><div class="ttname"><a href="class_mod_exp_precomputation.html#a5e06496338c37c44bfd31ad96eff5866">ModExpPrecomputation::ConvertIn</a></div><div class="ttdeci">Element ConvertIn(const Element &amp;v) const</div><div class="ttdoc">Converts an element between representations.</div><div class="ttdef"><b>Definition:</b> <a href="modexppc_8h_source.html#l00028">modexppc.h:28</a></div></div>
<div class="ttc" id="algebra_8h_html"><div class="ttname"><a href="algebra_8h.html">algebra.h</a></div><div class="ttdoc">Classes for performing mathematics over different fields.</div></div>
<div class="ttc" id="class_buffered_transformation_html"><div class="ttname"><a href="class_buffered_transformation.html">BufferedTransformation</a></div><div class="ttdoc">Interface for buffered transformations.</div><div class="ttdef"><b>Definition:</b> <a href="cryptlib_8h_source.html#l01545">cryptlib.h:1545</a></div></div>
<div class="ttc" id="class_mod_exp_precomputation_html_adbd591c4266c63d0b6786fbb80be6a64"><div class="ttname"><a href="class_mod_exp_precomputation.html#adbd591c4266c63d0b6786fbb80be6a64">ModExpPrecomputation::BERDecodeElement</a></div><div class="ttdeci">Element BERDecodeElement(BufferedTransformation &amp;bt) const</div><div class="ttdoc">Decodes element in DER format.</div><div class="ttdef"><b>Definition:</b> <a href="modexppc_8h_source.html#l00031">modexppc.h:31</a></div></div>
<div class="ttc" id="class_integer_html"><div class="ttname"><a href="class_integer.html">Integer</a></div><div class="ttdoc">Multiple precision integer with arithmetic operations.</div><div class="ttdef"><b>Definition:</b> <a href="integer_8h_source.html#l00049">integer.h:49</a></div></div>
<div class="ttc" id="class_mod_exp_precomputation_html"><div class="ttname"><a href="class_mod_exp_precomputation.html">ModExpPrecomputation</a></div><div class="ttdef"><b>Definition:</b> <a href="modexppc_8h_source.html#l00021">modexppc.h:21</a></div></div>
<div class="ttc" id="class_abstract_group_html"><div class="ttname"><a href="class_abstract_group.html">AbstractGroup</a></div><div class="ttdoc">Abstract group.</div><div class="ttdef"><b>Definition:</b> <a href="algebra_8h_source.html#l00026">algebra.h:26</a></div></div>
<div class="ttc" id="eprecomp_8h_html"><div class="ttname"><a href="eprecomp_8h.html">eprecomp.h</a></div><div class="ttdoc">Classes for precomputation in a group.</div></div>
<div class="ttc" id="class_montgomery_representation_html"><div class="ttname"><a href="class_montgomery_representation.html">MontgomeryRepresentation</a></div><div class="ttdoc">Performs modular arithmetic in Montgomery representation for increased speed.</div><div class="ttdef"><b>Definition:</b> <a href="modarith_8h_source.html#l00274">modarith.h:274</a></div></div>
<div class="ttc" id="class_mod_exp_precomputation_html_a04c495df3a4f8e72b26c7c7b6fc712cb"><div class="ttname"><a href="class_mod_exp_precomputation.html#a04c495df3a4f8e72b26c7c7b6fc712cb">ModExpPrecomputation::DEREncodeElement</a></div><div class="ttdeci">void DEREncodeElement(BufferedTransformation &amp;bt, const Element &amp;v) const</div><div class="ttdoc">Encodes element in DER format.</div><div class="ttdef"><b>Definition:</b> <a href="modexppc_8h_source.html#l00032">modexppc.h:32</a></div></div>
<div class="ttc" id="classvalue__ptr_html"><div class="ttname"><a href="classvalue__ptr.html">value_ptr&lt; MontgomeryRepresentation &gt;</a></div></div>
<div class="ttc" id="integer_8h_html"><div class="ttname"><a href="integer_8h.html">integer.h</a></div><div class="ttdoc">Multiple precision integer with arithmetic operations.</div></div>
<div class="ttc" id="modarith_8h_html"><div class="ttname"><a href="modarith_8h.html">modarith.h</a></div><div class="ttdoc">Class file for performing modular arithmetic.</div></div>
<div class="ttc" id="namespace_crypto_p_p_html"><div class="ttname"><a href="namespace_crypto_p_p.html">CryptoPP</a></div><div class="ttdoc">Crypto++ library namespace.</div></div>
<div class="ttc" id="class_mod_exp_precomputation_html_a2abaa90591d78eba6fbbc121033de7d8"><div class="ttname"><a href="class_mod_exp_precomputation.html#a2abaa90591d78eba6fbbc121033de7d8">ModExpPrecomputation::GetGroup</a></div><div class="ttdeci">const AbstractGroup&lt; Element &gt; &amp; GetGroup() const</div><div class="ttdoc">Retrieves AbstractGroup interface.</div><div class="ttdef"><b>Definition:</b> <a href="modexppc_8h_source.html#l00030">modexppc.h:30</a></div></div>
<div class="ttc" id="class_d_l___fixed_base_precomputation_impl_html"><div class="ttname"><a href="class_d_l___fixed_base_precomputation_impl.html">DL_FixedBasePrecomputationImpl</a></div><div class="ttdoc">DL_FixedBasePrecomputation adapter class.</div><div class="ttdef"><b>Definition:</b> <a href="eprecomp_8h_source.html#l00126">eprecomp.h:126</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Nov 27 2019 15:03:38 for Crypto++ by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>