📄 eciesproductkey.aspx.htm
字号:
<img src="ECIESProductKey.aspx_files/t.gif" alt="" width="160" height="1">
</td>
<td class="ArticlePane" valign="top">
<table class="SearchHeaderBar" width="100%" cellspacing="0">
<tbody><tr>
<td style="white-space: nowrap; width: 60%;" valign="middle" align="right">
<form method="get" action="/info/search.aspx" name="Search" style="margin: 0pt;">
<b>Search </b>
<input class="SmallText" name="artkw" style="width: 200px;">
<select class="SmallText" style="font-weight: bold;" name="sbo">
<option value="kw">Articles</option>
<!--<option value="au">Authors</option>-->
<option value="fm">Messages</option>
</select>
<input class="SmallText" style="font-weight: bold;" value=" Go! " type="submit">
</form>
</td>
<td class="TinyText" style="white-space: nowrap;">
<a href="http://www.codeproject.com/info/search.aspx">Advanced Search</a><br>
<a href="http://www.codeproject.com/script/Content/SiteMap.aspx">Sitemap</a>
</td>
</tr>
</tbody></table>
<span id="ctl00_ResultMessage"></span>
<div id="ctl00_ArtDiv">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody><tr valign="top">
<td valign="top">
<table>
</table>
<div class="SmallText" style="white-space: nowrap;">
<img src="ECIESProductKey.aspx_files/print.gif" alt="print" style="vertical-align: middle;" width="16" height="16">
<a id="ctl00_ArticleHeaderLinks_PrintLnk" href="http://www.codeproject.com/KB/security/ECIESProductKey.aspx?display=Print">Print</a>
<img src="ECIESProductKey.aspx_files/report.gif" alt="Broken Article?" style="vertical-align: middle;" width="16" height="16">
<a id="ctl00_ArticleHeaderLinks_BrokenLnk" href="http://www.codeproject.com/script/Articles/Report.aspx?aid=16390">Report Article</a>
<img src="ECIESProductKey.aspx_files/link.png" alt="Bookmark" style="vertical-align: middle;" width="16" height="16">
<a href="http://www.codeproject.com/script/Bookmarks/Add.aspx?&obid=16390&obtid=2&bmaction=AddBookmark" name="ajaxBookmarkLink" id="bm_16390,2" class="" onclick="return bookmarkMe(16390, 2);">Bookmark Me </a><span class="TinyText" style="visibility: hidden;"></span>
<span id="ctl00_ArticleHeaderLinks_ArticleBmk_Message"></span>
<img src="ECIESProductKey.aspx_files/discuss.gif" alt="Discuss" style="vertical-align: middle;" width="15" height="16">
<a href="#_comments">Discuss</a>
<img src="ECIESProductKey.aspx_files/mail.gif" alt="Recommend Article" style="vertical-align: middle;" width="16" height="16">
<a id="ctl00_ArticleHeaderLinks_Recommend" href="http://www.codeproject.com/script/common/TellFriend.aspx?obtid=2&obid=16390">Send to a friend</a>
</div>
</td>
<td style="text-align: right; white-space: nowrap; width: 100px;">
<table id="CurRat"><tbody><tr><td>
<table><tbody><tr>
<td style="white-space: nowrap;" class="SmallText" align="right">
<span id="ctl00_ArticleRating_VoteLabel">58 votes for this Article.</span></td>
<td><table border="1" cellpadding="0" cellspacing="0">
<tbody><tr>
<td width="20" bgcolor="White" height="7"><img src="ECIESProductKey.aspx_files/red.gif" width="20" align="center" border="0" height="7"></td>
<td width="20" bgcolor="White" height="7"><img src="ECIESProductKey.aspx_files/red.gif" width="20" align="center" border="0" height="7"></td>
<td width="20" bgcolor="White" height="7"><img src="ECIESProductKey.aspx_files/red.gif" width="20" align="center" border="0" height="7"></td>
<td width="20" bgcolor="White" height="7"><img src="ECIESProductKey.aspx_files/red.gif" width="20" align="center" border="0" height="7"></td>
<td width="20" bgcolor="White" height="7" nowrap="nowrap"><img src="ECIESProductKey.aspx_files/red.gif" width="13" align="center" border="0" height="7"></td>
</tr>
</tbody></table>
</td>
</tr>
<tr id="ctl00_ArticleRating_PopularityRow">
<td colspan="2" class="SmallText" align="right">
<a id="ctl00_ArticleRating_PopularityLnk" title="Calculated as rating x Log10(# votes)" href="http://www.codeproject.com/script/Articles/TopArticles.aspx?ta_so=1">Popularity: 8.23</a>
<span id="ctl00_ArticleRating_PopularityLbl"></span><span id="ratingVal">Rating: <b>4.67</b> out of 5</span></td>
</tr>
</tbody></table>
</td>
<td>
<div>
<table class="HistTable" title="Voting Distribution. Recent data only"><tbody><tr><td><img src="ECIESProductKey.aspx_files/pollcol.gif" alt="5 votes, 8.6%" title="5 votes, 8.6%" width="10" border="0" height="1"><br>1</td>
<td><img src="ECIESProductKey.aspx_files/t.htm" alt="0 votes, 0.0%" title="0 votes, 0.0%" width="10" border="0" height="1"><br>2</td>
<td><img src="ECIESProductKey.aspx_files/t.htm" alt="0 votes, 0.0%" title="0 votes, 0.0%" width="10" border="0" height="1"><br>3</td>
<td><img src="ECIESProductKey.aspx_files/t.htm" alt="1 vote, 1.7%" title="1 vote, 1.7%" width="10" border="0" height="1"><br>4</td>
<td><img src="ECIESProductKey.aspx_files/pollcol.gif" alt="52 votes, 89.7%" title="52 votes, 89.7%" width="10" border="0" height="20"><br>5</td>
</tr></tbody></table>
</div>
</td></tr></tbody></table>
</td>
</tr>
</tbody></table>
<span id="intelliTXT">
<div id="contentdiv">
<!-- Main Page Contents Start -->
<!-- Article Starts -->
<div align="center">
<p><img alt="Screenshot - image001.gif" src="ECIESProductKey.aspx_files/image001.gif" width="396" height="330"></p>
</div>
<ul class="download">
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/CerticomEllipticCurveCryptograhySEC1.zip">Download Certicom's SEC 1 Whitepaper - 310.7 Kb</a> </li>
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/CerticomEllipticCurveCryptograhySEC2.zip">Download Certicom's SEC 2 Whitepaper - 124.8 Kb</a> </li>
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/USGovernmentRecommendedCurves.zip">Download NIST Recommended Curves Whitepaper - 277.4 Kb</a> </li>
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/BaseExp.zip">Download BaseExp Source Code - 3.1 Kb</a> </li>
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/DPVal.zip">Download DPVal Source Code- 5.5 Kb</a> </li>
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/KeyGen.zip">Download KeyGen Source Code - 4.9 Kb</a> </li>
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/KeyVal.zip">Download KeyVal Source Code - 5.1 Kb</a> </li>
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/ecc160test.zip">Download ecc160test Source Code - 3.7 Kb</a> </li>
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/ecctest1.zip">Download ecctest1 Source Code - 4.0 Kb</a> </li>
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/ecctest2.zip">Download ecctest2 Source Code - 4.5 Kb</a> </li>
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/ecctest3.zip">Download ecctest3 Source Code - 4.5 Kb</a> </li>
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/ecctest4.zip">Download ecctest4 Source Code - 4.8 Kb</a> </li>
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/ecctest5.zip">Download ecctest5 Source Code - 5.0 Kb</a> </li>
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/ecctest6.zip">Download ecctest6 Source Code - 5.4 Kb</a> </li>
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/ecctest7.zip">Download ecctest7 Source Code - 5.6 Kb</a> </li>
<li><a href="http://www.codeproject.com/KB/security/ECIESProductKey/ecctest1to7.zip">Download ecctest1 - ecctest7 Source Code - 34 Kb</a> </li>
</ul>
<h2>Introduction</h2>
<p>A popular method of product validation is using keys similar to
VJJJBX-H2BBCC-68CF7F-2BXD4R-3XP7FB-JDVQBC. These compact keys can be
derived using Public Key Cryptosystems such as Elliptic Curve
Cryptography. Other Public Key Cryptosystems are available such as RSA.
However, these systems generally produce larger keys, which the user
will eventually have to enter into the program to unlock functionality.
Smaller producing Cryptosystems exist, but it is the author's opinion
that they are highly encumbered with patents. <a href="http://www.minrank.org/hfe/" target="_blank">Quartz</a> is one such example. It is a Public Key Encryption System that produces a smaller cipher text based on <a href="http://en.wikipedia.org/wiki/Hidden_Field_Equations" target="_blank">Hidden Field Equations (HFEs)</a>. The Quartz website is littered with phrases such as "must license" and "pay royalties".</p>
<p>The reader is also encouraged to investigate Signature Schemes with
Recovery as an alternative method to producing Product Keys. An example
is <a href="http://www.rsasecurity.com/rsalabs/node.asp?id=2350" target="_blank">PSS-R</a>,
a Message Recovery Signature Scheme based on RSA. PSS-R is not suitable
for product keys due to the size of the resulting key. However,
cryptosystems such as a <a href="http://en.wikipedia.org/wiki/Weil_pairing">Weil Pairing</a> system should be of interest. Once Weil Pairing is finalized in committee, it will be added to the Crypto++ library. </p>
<p>Finally, the reader should also visit <a href="http://www.codeproject.com/KB/security/AESProductKey.asp">Product Keys Based on the Advanced Encryption Standard</a> to familiarize themselves with basic concepts of Product Keys in the domain of Public Key Cryptography; and <a href="http://www.codeproject.com/useritems/ProductActivation.asp">Product Activation Based on RSA Signatures</a>. This article will discuss in detail the following topics:</p>
<ul>
<li>Elliptic Curve Cryptography Implementation in Crypto++ </li>
<li>Using Elliptic Curves with User Defined Domain Parameters In Crypto++ </li>
<li>Base Encoding a cipher text String in Crypto++ </li>
<li>Working Demo which Exercises Product Keys based on ECC </li>
<li>Bulk Product Key Generation </li>
<li>Product Key Validation </li>
<li>Product Activation </li>
<li>Securely Saving Key or Activation State to the Registry </li>
</ul>
<p>This article is based on the Visual C++ 6.0 Environment in hopes
that it reaches the largest audience. There are 16 downloads available
with this article, which are presented at the top of the page.</p>
<h2>Elliptic curve cryptography</h2>
<p>This article assumes that the reader has a basic understanding of Cryptography. For an overview, see Gary Kessler's <a href="http://mia.ece.uic.edu/%7Epapers/WWW/cryptography/crypto.html" target="_blank"><em>An Overview of Cryptography</em></a>. For an ECC Tutorial, see <a href="http://www.certicom.com/index.php?action=ecc,ecc_tutorial" target="_blank">Certicom's ECC Tutorial</a>.
For a casual Cryptography reader, Elliptic Curve Cryptography should
prove to be interesting, as it is not like RSA (based on Integer
Factorization), Diffie-Hellman and ElGamal (based on Discrete
Logarithms), or <a href="http://eprint.iacr.org/2004/263" target="_blank">MQ (Multivariate Quadratics)</a>.
However, ECC is related to DLP. This article uses comparatively small
EC key sizes. This is justified in that the Product Key lifetime is
relatively short, based directly on Product Life Cycles. <a href="http://www.rsasecurity.com/" target="_blank">RSA Laboratories</a> offers the following <a href="http://www.rsasecurity.com/rsalabs/node.asp?id=2004" target="_blank">recommendations</a> for key sizes:</p>
<table width="575" border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td width="200">
<p align="center"><strong>Protection Lifetime<br>of Data</strong></p>
</td>
<td width="125">
<p align="center"><strong>Present 鈥
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -