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

📄 eccrypto_8h-source.html

📁 著名的密码库Crypto++的文档 C++语言的杰作。程序员必备。
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"><title>Crypto++: eccrypto.h Source File</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.5.2 --><div class="tabs">  <ul>    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>    <li><a href="namespaces.html"><span>Namespaces</span></a></li>    <li><a href="classes.html"><span>Classes</span></a></li>    <li class="current"><a href="files.html"><span>Files</span></a></li>  </ul></div><div class="tabs">  <ul>    <li><a href="files.html"><span>File&nbsp;List</span></a></li>    <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>  </ul></div><h1>eccrypto.h</h1><a href="eccrypto_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#ifndef CRYPTOPP_ECCRYPTO_H</span><a name="l00002"></a>00002 <span class="preprocessor"></span><span class="preprocessor">#define CRYPTOPP_ECCRYPTO_H</span><a name="l00003"></a>00003 <span class="preprocessor"></span><span class="comment"></span><a name="l00004"></a>00004 <span class="comment">/*! \file</span><a name="l00005"></a>00005 <span class="comment">*/</span><a name="l00006"></a>00006 <a name="l00007"></a>00007 <span class="preprocessor">#include "<a class="code" href="pubkey_8h.html" title="This file contains helper classes/functions for implementing public key algorithms...">pubkey.h</a>"</span><a name="l00008"></a>00008 <span class="preprocessor">#include "<a class="code" href="integer_8h.html">integer.h</a>"</span><a name="l00009"></a>00009 <span class="preprocessor">#include "asn.h"</span><a name="l00010"></a>00010 <span class="preprocessor">#include "hmac.h"</span><a name="l00011"></a>00011 <span class="preprocessor">#include "sha.h"</span><a name="l00012"></a>00012 <span class="preprocessor">#include "<a class="code" href="gfpcrypt_8h.html" title="Implementation of schemes based on DL over GF(p).">gfpcrypt.h</a>"</span><a name="l00013"></a>00013 <span class="preprocessor">#include "<a class="code" href="dh_8h.html">dh.h</a>"</span><a name="l00014"></a>00014 <span class="preprocessor">#include "<a class="code" href="mqv_8h.html">mqv.h</a>"</span><a name="l00015"></a>00015 <span class="preprocessor">#include "ecp.h"</span><a name="l00016"></a>00016 <span class="preprocessor">#include "ec2n.h"</span><a name="l00017"></a>00017 <a name="l00018"></a>00018 NAMESPACE_BEGIN(CryptoPP)<a name="l00019"></a>00019 <a name="l00020"></a>00020 <span class="comment">//! Elliptic Curve Parameters</span><a name="l00021"></a>00021 <span class="comment"></span><span class="comment">/*! This class corresponds to the ASN.1 sequence of the same name</span><a name="l00022"></a>00022 <span class="comment">    in ANSI X9.62 (also SEC 1).</span><a name="l00023"></a>00023 <span class="comment">*/</span><a name="l00024"></a>00024 template &lt;class EC&gt;<a name="l00025"></a><a class="code" href="class_d_l___group_parameters___e_c.html">00025</a> class <a class="code" href="class_d_l___group_parameters___e_c.html" title="Elliptic Curve Parameters.">DL_GroupParameters_EC</a> : public <a class="code" href="class_d_l___group_parameters_impl.html" title="_">DL_GroupParametersImpl</a>&lt;EcPrecomputation&lt;EC&gt; &gt;<a name="l00026"></a>00026 {<a name="l00027"></a>00027         <span class="keyword">typedef</span> <a class="code" href="class_d_l___group_parameters___e_c.html" title="Elliptic Curve Parameters.">DL_GroupParameters_EC&lt;EC&gt;</a> <a class="code" href="class_d_l___group_parameters___e_c.html" title="Elliptic Curve Parameters.">ThisClass</a>;<a name="l00028"></a>00028 <a name="l00029"></a>00029 <span class="keyword">public</span>:<a name="l00030"></a><a class="code" href="class_d_l___group_parameters___e_c.html#27859965835a0eb8cf55959e666d64dd">00030</a>         <span class="keyword">typedef</span> EC EllipticCurve;<a name="l00031"></a><a class="code" href="class_d_l___group_parameters___e_c.html#cae8a55704e14fbbd58cfd2766ef2cf3">00031</a>         <span class="keyword">typedef</span> <span class="keyword">typename</span> EllipticCurve::Point Point;<a name="l00032"></a><a class="code" href="class_d_l___group_parameters___e_c.html#c191800038b554ba526b3f99062f06fc">00032</a>         <span class="keyword">typedef</span> Point Element;<a name="l00033"></a><a class="code" href="class_d_l___group_parameters___e_c.html#53785d455939762593bd73af78aaa997">00033</a>         <span class="keyword">typedef</span> <a class="code" href="struct_enum_to_type.html">IncompatibleCofactorMultiplication</a> <a class="code" href="struct_enum_to_type.html">DefaultCofactorOption</a>;<a name="l00034"></a>00034 <a name="l00035"></a><a class="code" href="class_d_l___group_parameters___e_c.html#b8630b93e9400b87b905d3fb3dfdaf48">00035</a>         <a class="code" href="class_d_l___group_parameters___e_c.html" title="Elliptic Curve Parameters.">DL_GroupParameters_EC</a>() : m_compress(false), m_encodeAsOID(false) {}<a name="l00036"></a><a class="code" href="class_d_l___group_parameters___e_c.html#00924a42a5f08c76e130e9cadd40b132">00036</a>         <a class="code" href="class_d_l___group_parameters___e_c.html" title="Elliptic Curve Parameters.">DL_GroupParameters_EC</a>(<span class="keyword">const</span> <a class="code" href="class_o_i_d.html" title="Object Identifier.">OID</a> &amp;oid)<a name="l00037"></a>00037                 : m_compress(false), m_encodeAsOID(false) {Initialize(oid);}<a name="l00038"></a><a class="code" href="class_d_l___group_parameters___e_c.html#ea3f752557db732e096fe92a508d8236">00038</a>         <a class="code" href="class_d_l___group_parameters___e_c.html" title="Elliptic Curve Parameters.">DL_GroupParameters_EC</a>(<span class="keyword">const</span> EllipticCurve &amp;ec, <span class="keyword">const</span> Point &amp;G, <span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;n, <span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;k = <a class="code" href="class_integer.html#19b7e6d48b1b57bd4846160ea2928175" title="avoid calling constructors for these frequently used integers">Integer::Zero</a>())<a name="l00039"></a>00039                 : m_compress(false), m_encodeAsOID(false) {Initialize(ec, G, n, k);}<a name="l00040"></a><a class="code" href="class_d_l___group_parameters___e_c.html#f31a18df3efb58a62866080dd8dc55a9">00040</a>         <a class="code" href="class_d_l___group_parameters___e_c.html" title="Elliptic Curve Parameters.">DL_GroupParameters_EC</a>(<a class="code" href="class_buffered_transformation.html" title="interface for buffered transformations">BufferedTransformation</a> &amp;bt)<a name="l00041"></a>00041                 : m_compress(false), m_encodeAsOID(false) {BERDecode(bt);}<a name="l00042"></a>00042 <a name="l00043"></a><a class="code" href="class_d_l___group_parameters___e_c.html#d3bd5f1e41ae0ae5c673a7f9d96a00a8">00043</a>         <span class="keywordtype">void</span> Initialize(<span class="keyword">const</span> EllipticCurve &amp;ec, <span class="keyword">const</span> Point &amp;G, <span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;n, <span class="keyword">const</span> <a class="code" href="class_integer.html" title="multiple precision integer and basic arithmetics">Integer</a> &amp;k = <a class="code" href="class_integer.html#19b7e6d48b1b57bd4846160ea2928175" title="avoid calling constructors for these frequently used integers">Integer::Zero</a>())<a name="l00044"></a>00044         {<a name="l00045"></a>00045                 this-&gt;m_groupPrecomputation.SetCurve(ec);<a name="l00046"></a>00046                 SetSubgroupGenerator(G);<a name="l00047"></a>00047                 m_n = n;<a name="l00048"></a>00048                 m_k = k;<a name="l00049"></a>00049         }<a name="l00050"></a>00050         <span class="keywordtype">void</span> Initialize(<span class="keyword">const</span> <a class="code" href="class_o_i_d.html" title="Object Identifier.">OID</a> &amp;oid);<a name="l00051"></a>00051 <a name="l00052"></a>00052         <span class="comment">// NameValuePairs</span><a name="l00053"></a>00053         <span class="keywordtype">bool</span> GetVoidValue(<span class="keyword">const</span> <span class="keywordtype">char</span> *name, <span class="keyword">const</span> std::type_info &amp;valueType, <span class="keywordtype">void</span> *pValue) <span class="keyword">const</span>;<a name="l00054"></a>00054         <span class="keywordtype">void</span> AssignFrom(<span class="keyword">const</span> <a class="code" href="class_name_value_pairs.html" title="interface for retrieving values given their names">NameValuePairs</a> &amp;source);<a name="l00055"></a>00055 <a name="l00056"></a>00056         <span class="comment">// GeneratibleCryptoMaterial interface</span><span class="comment"></span>

⌨️ 快捷键说明

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