⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 luc_8h-source.html

📁 著名的密码库Crypto++的文档 C++语言的杰作。程序员必备。
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<a name="l00178"></a><a class="code" href="class_d_l___group_parameters___l_u_c___default_safe_prime.html#85d855420a8f32759e2790986f13a742">00178</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_d_l___group_parameters___l_u_c___default_safe_prime.html#85d855420a8f32759e2790986f13a742">GetDefaultSubgroupOrderSize</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> modulusSize)<span class="keyword"> const </span>{<span class="keywordflow">return</span> modulusSize-1;}<a name="l00179"></a>00179 };<a name="l00180"></a>00180 <span class="comment"></span><a name="l00181"></a>00181 <span class="comment">//! _</span><a name="l00182"></a><a class="code" href="class_d_l___algorithm___l_u_c___h_m_p.html">00182</a> <span class="comment"></span><span class="keyword">class </span><a class="code" href="class_d_l___algorithm___l_u_c___h_m_p.html" title="_">DL_Algorithm_LUC_HMP</a> : <span class="keyword">public</span> <a class="code" href="class_d_l___elgamal_like_signature_algorithm.html" title="interface for Elgamal-like signature algorithms">DL_ElgamalLikeSignatureAlgorithm</a>&lt;Integer&gt;<a name="l00183"></a>00183 {<a name="l00184"></a>00184 <span class="keyword">public</span>:<a name="l00185"></a><a class="code" href="class_d_l___algorithm___l_u_c___h_m_p.html#9525cf942f819663b54d163e61b5f70c">00185</a>         <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="class_d_l___algorithm___l_u_c___h_m_p.html#9525cf942f819663b54d163e61b5f70c">StaticAlgorithmName</a>() {<span class="keywordflow">return</span> <span class="stringliteral">"LUC-HMP"</span>;}<a name="l00186"></a>00186 <a name="l00187"></a>00187         <span class="keywordtype">void</span> <a class="code" href="class_d_l___algorithm___l_u_c___h_m_p.html#ab3a5616ec9540d6dad86dce3e3c2d10">Sign</a>(<span class="keyword">const</span> <a class="code" href="class_d_l___group_parameters.html" title="interface for DL group parameters">DL_GroupParameters&lt;Integer&gt;</a> &amp;params, <span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;x, <span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;k, <span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;e, <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;r, <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;s) <span class="keyword">const</span>;<a name="l00188"></a>00188         <span class="keywordtype">bool</span> <a class="code" href="class_d_l___algorithm___l_u_c___h_m_p.html#ec08299059b87d523d590d5cfa4d0f2d">Verify</a>(<span class="keyword">const</span> <a class="code" href="class_d_l___group_parameters.html" title="interface for DL group parameters">DL_GroupParameters&lt;Integer&gt;</a> &amp;params, <span class="keyword">const</span> <a class="code" href="class_d_l___public_key.html" title="interface for DL public keys">DL_PublicKey&lt;Integer&gt;</a> &amp;publicKey, <span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;e, <span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;r, <span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;s) <span class="keyword">const</span>;<a name="l00189"></a>00189 <a name="l00190"></a><a class="code" href="class_d_l___algorithm___l_u_c___h_m_p.html#ce95ae645f120bb10d2a40ad26fb5ba4">00190</a>         <span class="keywordtype">size_t</span> <a class="code" href="class_d_l___algorithm___l_u_c___h_m_p.html#ce95ae645f120bb10d2a40ad26fb5ba4">RLen</a>(<span class="keyword">const</span> <a class="code" href="class_d_l___group_parameters.html" title="interface for DL group parameters">DL_GroupParameters&lt;Integer&gt;</a> &amp;params)<span class="keyword"> const</span><a name="l00191"></a>00191 <span class="keyword">                </span>{<span class="keywordflow">return</span> params.<a class="code" href="class_d_l___group_parameters.html#5b8ca75b306fa0d41821ef276e876c1c">GetGroupOrder</a>().<a class="code" href="class_integer.html#e7ee3f1bbea2b3138c6d8f1ce1aa2bf9" title="number of significant bytes = ceiling(BitCount()/8)">ByteCount</a>();}<a name="l00192"></a>00192 };<a name="l00193"></a>00193 <span class="comment"></span><a name="l00194"></a>00194 <span class="comment">//! _</span><a name="l00195"></a><a class="code" href="struct_d_l___signature_keys___l_u_c.html">00195</a> <span class="comment"></span><span class="keyword">struct </span><a class="code" href="struct_d_l___signature_keys___l_u_c.html" title="_">DL_SignatureKeys_LUC</a><a name="l00196"></a>00196 {<a name="l00197"></a><a class="code" href="struct_d_l___signature_keys___l_u_c.html#5dc8ed5381020f71323e1702ca8cd935">00197</a>         <span class="keyword">typedef</span> <a class="code" href="class_d_l___group_parameters___l_u_c.html" title="_">DL_GroupParameters_LUC</a> <a class="code" href="class_d_l___group_parameters___l_u_c.html" title="_">GroupParameters</a>;<a name="l00198"></a><a class="code" href="struct_d_l___signature_keys___l_u_c.html#ad460d5eae27d58c6634abb331cbb25f">00198</a>         <span class="keyword">typedef</span> <a class="code" href="class_d_l___public_key___g_f_p.html">DL_PublicKey_GFP&lt;GroupParameters&gt;</a> <a class="code" href="class_d_l___public_key___g_f_p.html">PublicKey</a>;<a name="l00199"></a><a class="code" href="struct_d_l___signature_keys___l_u_c.html#a87b181eb1edf12780e63169290ca485">00199</a>         <span class="keyword">typedef</span> <a class="code" href="class_d_l___private_key___g_f_p.html" title="DL private key (in GF(p) groups).">DL_PrivateKey_GFP&lt;GroupParameters&gt;</a> <a class="code" href="class_d_l___private_key___g_f_p.html" title="DL private key (in GF(p) groups).">PrivateKey</a>;<a name="l00200"></a>00200 };<a name="l00201"></a>00201 <span class="comment"></span><a name="l00202"></a>00202 <span class="comment">//! LUC-HMP, based on "Digital signature schemes based on Lucas functions" by Patrick Horster, Markus Michels, Holger Petersen</span><a name="l00203"></a>00203 <span class="comment"></span><span class="keyword">template</span> &lt;<span class="keyword">class</span> H&gt;<a name="l00204"></a><a class="code" href="struct_l_u_c___h_m_p.html">00204</a> <span class="keyword">struct </span><a class="code" href="struct_l_u_c___h_m_p.html" title="LUC-HMP, based on "Digital signature schemes based on Lucas functions" by Patrick...">LUC_HMP</a> : <span class="keyword">public</span> <a class="code" href="class_d_l___s_s.html" title="Discrete Log Based Signature Scheme.">DL_SS</a>&lt;DL_SignatureKeys_LUC, DL_Algorithm_LUC_HMP, DL_SignatureMessageEncodingMethod_DSA, H&gt;<a name="l00205"></a>00205 {<a name="l00206"></a>00206 };<a name="l00207"></a>00207 <span class="comment"></span><a name="l00208"></a>00208 <span class="comment">//! _</span><a name="l00209"></a><a class="code" href="struct_d_l___crypto_keys___l_u_c.html">00209</a> <span class="comment"></span><span class="keyword">struct </span><a class="code" href="struct_d_l___crypto_keys___l_u_c.html" title="_">DL_CryptoKeys_LUC</a><a name="l00210"></a>00210 {<a name="l00211"></a><a class="code" href="struct_d_l___crypto_keys___l_u_c.html#7f001656faa9ed50d3567a10a76617ec">00211</a>         <span class="keyword">typedef</span> <a class="code" href="class_d_l___group_parameters___l_u_c___default_safe_prime.html" title="_">DL_GroupParameters_LUC_DefaultSafePrime</a> <a class="code" href="class_d_l___group_parameters___l_u_c___default_safe_prime.html" title="_">GroupParameters</a>;<a name="l00212"></a><a class="code" href="struct_d_l___crypto_keys___l_u_c.html#746c398250dea0027761656f8fec7436">00212</a>         <span class="keyword">typedef</span> <a class="code" href="class_d_l___public_key___g_f_p.html">DL_PublicKey_GFP&lt;GroupParameters&gt;</a> <a class="code" href="class_d_l___public_key___g_f_p.html">PublicKey</a>;<a name="l00213"></a><a class="code" href="struct_d_l___crypto_keys___l_u_c.html#723cfe2baaaa390bea37b30a658551c7">00213</a>         <span class="keyword">typedef</span> <a class="code" href="class_d_l___private_key___g_f_p.html" title="DL private key (in GF(p) groups).">DL_PrivateKey_GFP&lt;GroupParameters&gt;</a> <a class="code" href="class_d_l___private_key___g_f_p.html" title="DL private key (in GF(p) groups).">PrivateKey</a>;<a name="l00214"></a>00214 };<a name="l00215"></a>00215 <span class="comment"></span><a name="l00216"></a>00216 <span class="comment">//! LUC-IES</span><a name="l00217"></a>00217 <span class="comment"></span><span class="keyword">template</span> &lt;<span class="keyword">class</span> COFACTOR_OPTION = NoCofactorMultiplication, <span class="keywordtype">bool</span> DHAES_MODE = true&gt;<a name="l00218"></a><a class="code" href="struct_l_u_c___i_e_s.html">00218</a> <span class="keyword">struct </span><a class="code" href="struct_l_u_c___i_e_s.html" title="LUC-IES.">LUC_IES</a><a name="l00219"></a>00219         : <span class="keyword">public</span> <a class="code" href="class_d_l___e_s.html" title="Discrete Log Based Encryption Scheme.">DL_ES</a>&lt;<a name="l00220"></a>00220                 DL_CryptoKeys_LUC,<a name="l00221"></a>00221                 DL_KeyAgreementAlgorithm_DH&lt;Integer, COFACTOR_OPTION&gt;,<a name="l00222"></a>00222                 DL_KeyDerivationAlgorithm_P1363&lt;Integer, DHAES_MODE, P1363_KDF2&lt;SHA1&gt; &gt;,<a name="l00223"></a>00223                 DL_EncryptionAlgorithm_Xor&lt;HMAC&lt;SHA1&gt;, DHAES_MODE&gt;,<a name="l00224"></a>00224                 LUC_IES&lt;&gt; &gt;<a name="l00225"></a>00225 {<a name="l00226"></a><a class="code" href="struct_l_u_c___i_e_s.html#d1c426159002bd253d6fd49723fa251c">00226</a>         <span class="keyword">static</span> std::string <a class="code" href="struct_l_u_c___i_e_s.html#d1c426159002bd253d6fd49723fa251c">StaticAlgorithmName</a>() {<span class="keywordflow">return</span> <span class="stringliteral">"LUC-IES"</span>;}    <span class="comment">// non-standard name</span><a name="l00227"></a>00227 };<a name="l00228"></a>00228 <a name="l00229"></a>00229 <span class="comment">// ********************************************************</span><a name="l00230"></a>00230 <span class="comment"></span><a name="l00231"></a>00231 <span class="comment">//! LUC-DH</span><a name="l00232"></a><a class="code" href="luc_8h.html#b2c863cff24e8c956e82635d3f7c0ffb">00232</a> <span class="comment"></span><span class="keyword">typedef</span> <a class="code" href="class_d_h___domain.html" title=",">DH_Domain&lt;DL_GroupParameters_LUC_DefaultSafePrime&gt;</a> <a class="code" href="class_d_h___domain.html" title=",">LUC_DH</a>;<a name="l00233"></a>00233 <a name="l00234"></a>00234 NAMESPACE_END<a name="l00235"></a>00235 <a name="l00236"></a>00236 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="text-align: right;"><small>Generated on Fri Jun 1 11:11:22 2007 for Crypto++ by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -