mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 17:56:16 +00:00
347 lines
17 KiB
HTML
347 lines
17 KiB
HTML
<!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>Dash Core: src/key.cpp File 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="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(initResizable);
|
|
/* @license-end */</script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.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="projectlogo"><img alt="Logo" src="bitcoin_logo_doxygen.png"/></td>
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Dash Core
|
|
 <span id="projectnumber">0.12.2.1</span>
|
|
</div>
|
|
<div id="projectbrief">P2P Digital Currency</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.14 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
/* @license-end */
|
|
</script>
|
|
<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&dn=gpl-2.0.txt GPL-v2 */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(function(){initNavTree('key_8cpp.html','');});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#func-members">Functions</a> |
|
|
<a href="#var-members">Variables</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">key.cpp File Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><code>#include "<a class="el" href="key_8h_source.html">key.h</a>"</code><br />
|
|
<code>#include "<a class="el" href="arith__uint256_8h_source.html">arith_uint256.h</a>"</code><br />
|
|
<code>#include "<a class="el" href="common_8h_source.html">crypto/common.h</a>"</code><br />
|
|
<code>#include "<a class="el" href="hmac__sha512_8h_source.html">crypto/hmac_sha512.h</a>"</code><br />
|
|
<code>#include "<a class="el" href="pubkey_8h_source.html">pubkey.h</a>"</code><br />
|
|
<code>#include "<a class="el" href="random_8h_source.html">random.h</a>"</code><br />
|
|
<code>#include <<a class="el" href="secp256k1_8h_source.html">secp256k1.h</a>></code><br />
|
|
<code>#include <<a class="el" href="secp256k1__recovery_8h_source.html">secp256k1_recovery.h</a>></code><br />
|
|
</div>
|
|
<p><a href="key_8cpp_source.html">Go to the source code of this file.</a></p>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:a4b55d97662f6589a6319c363469c501e"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="key_8cpp.html#a4b55d97662f6589a6319c363469c501e">ec_privkey_import_der</a> (const <a class="el" href="secp256k1_8h.html#a282ec9e6dfec8c35955c3eb2f7476e5e">secp256k1_context</a> *<a class="el" href="tests_8c.html#a06a3e29ada83211a695a49e8f7405842">ctx</a>, unsigned char *out32, const unsigned char *privkey, size_t privkeylen)</td></tr>
|
|
<tr class="separator:a4b55d97662f6589a6319c363469c501e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8cafc8a5eaf9a41f141e31d7c42ed7b9"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="key_8cpp.html#a8cafc8a5eaf9a41f141e31d7c42ed7b9">ec_privkey_export_der</a> (const <a class="el" href="secp256k1_8h.html#a282ec9e6dfec8c35955c3eb2f7476e5e">secp256k1_context</a> *<a class="el" href="tests_8c.html#a06a3e29ada83211a695a49e8f7405842">ctx</a>, unsigned char *privkey, size_t *privkeylen, const unsigned char *key32, int compressed)</td></tr>
|
|
<tr class="separator:a8cafc8a5eaf9a41f141e31d7c42ed7b9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:adc8d142f5bcd2ca6646462fb45a7945d"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="key_8cpp.html#adc8d142f5bcd2ca6646462fb45a7945d">ECC_InitSanityCheck</a> ()</td></tr>
|
|
<tr class="separator:adc8d142f5bcd2ca6646462fb45a7945d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae4d2893f2f5af1cca247516578171860"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="key_8cpp.html#ae4d2893f2f5af1cca247516578171860">ECC_Start</a> ()</td></tr>
|
|
<tr class="separator:ae4d2893f2f5af1cca247516578171860"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af3410be5ada18a4d8e9edcd3b0d261c9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="key_8cpp.html#af3410be5ada18a4d8e9edcd3b0d261c9">ECC_Stop</a> ()</td></tr>
|
|
<tr class="separator:af3410be5ada18a4d8e9edcd3b0d261c9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
|
|
Variables</h2></td></tr>
|
|
<tr class="memitem:aa353374fd6a64d469d7d2f3540f8ac76"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="secp256k1_8h.html#a282ec9e6dfec8c35955c3eb2f7476e5e">secp256k1_context</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="key_8cpp.html#aa353374fd6a64d469d7d2f3540f8ac76">secp256k1_context_sign</a> = NULL</td></tr>
|
|
<tr class="separator:aa353374fd6a64d469d7d2f3540f8ac76"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a id="a8cafc8a5eaf9a41f141e31d7c42ed7b9"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a8cafc8a5eaf9a41f141e31d7c42ed7b9">◆ </a></span>ec_privkey_export_der()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static int ec_privkey_export_der </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="secp256k1_8h.html#a282ec9e6dfec8c35955c3eb2f7476e5e">secp256k1_context</a> * </td>
|
|
<td class="paramname"><em>ctx</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">unsigned char * </td>
|
|
<td class="paramname"><em>privkey</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t * </td>
|
|
<td class="paramname"><em>privkeylen</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const unsigned char * </td>
|
|
<td class="paramname"><em>key32</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>compressed</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="key_8cpp_source.html#l00063">63</a> of file <a class="el" href="key_8cpp_source.html">key.cpp</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="key_8cpp_source.html#l00143">CKey::GetPrivKey()</a>, <a class="el" href="tests_8c_source.html#l03811">test_ecdsa_edge_cases()</a>, and <a class="el" href="tests_8c_source.html#l03288">test_ecdsa_end_to_end()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4b55d97662f6589a6319c363469c501e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4b55d97662f6589a6319c363469c501e">◆ </a></span>ec_privkey_import_der()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static int ec_privkey_import_der </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="secp256k1_8h.html#a282ec9e6dfec8c35955c3eb2f7476e5e">secp256k1_context</a> * </td>
|
|
<td class="paramname"><em>ctx</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">unsigned char * </td>
|
|
<td class="paramname"><em>out32</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const unsigned char * </td>
|
|
<td class="paramname"><em>privkey</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">size_t </td>
|
|
<td class="paramname"><em>privkeylen</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>These functions are taken from the libsecp256k1 distribution and are very ugly. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="key_8cpp_source.html#l00019">19</a> of file <a class="el" href="key_8cpp_source.html">key.cpp</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="key_8cpp_source.html#l00213">CKey::Load()</a>, <a class="el" href="key_8cpp_source.html#l00135">CKey::SetPrivKey()</a>, and <a class="el" href="tests_8c_source.html#l03288">test_ecdsa_end_to_end()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="adc8d142f5bcd2ca6646462fb45a7945d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#adc8d142f5bcd2ca6646462fb45a7945d">◆ </a></span>ECC_InitSanityCheck()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool ECC_InitSanityCheck </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Check that required EC support is available at runtime. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="key_8cpp_source.html#l00297">297</a> of file <a class="el" href="key_8cpp_source.html">key.cpp</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="init_8cpp_source.html#l00788">InitSanityCheck()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae4d2893f2f5af1cca247516578171860"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae4d2893f2f5af1cca247516578171860">◆ </a></span>ECC_Start()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void ECC_Start </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Initialize the elliptic curve support. May not be called twice without calling ECC_Stop first. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="key_8cpp_source.html#l00304">304</a> of file <a class="el" href="key_8cpp_source.html">key.cpp</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="init_8cpp_source.html#l00942">AppInit2()</a>, <a class="el" href="bench__dash_8cpp_source.html#l00012">main()</a>, and <a class="el" href="dash-tx_8cpp_source.html#l00492">Secp256k1Init::Secp256k1Init()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af3410be5ada18a4d8e9edcd3b0d261c9"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af3410be5ada18a4d8e9edcd3b0d261c9">◆ </a></span>ECC_Stop()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void ECC_Stop </td>
|
|
<td>(</td>
|
|
<td class="paramtype">void </td>
|
|
<td class="paramname"></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Deinitialize the elliptic curve support. No-op if ECC_Start wasn't called first. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="key_8cpp_source.html#l00323">323</a> of file <a class="el" href="key_8cpp_source.html">key.cpp</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="bench__dash_8cpp_source.html#l00012">main()</a>, <a class="el" href="init_8cpp_source.html#l00315">Shutdown()</a>, and <a class="el" href="dash-tx_8cpp_source.html#l00495">Secp256k1Init::~Secp256k1Init()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Variable Documentation</h2>
|
|
<a id="aa353374fd6a64d469d7d2f3540f8ac76"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa353374fd6a64d469d7d2f3540f8ac76">◆ </a></span>secp256k1_context_sign</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="secp256k1_8h.html#a282ec9e6dfec8c35955c3eb2f7476e5e">secp256k1_context</a>* secp256k1_context_sign = NULL</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">static</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p class="definition">Definition at line <a class="el" href="key_8cpp_source.html#l00016">16</a> of file <a class="el" href="key_8cpp_source.html">key.cpp</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="key_8cpp_source.html#l00122">CKey::Check()</a>, <a class="el" href="key_8cpp_source.html#l00225">CKey::Derive()</a>, <a class="el" href="key_8cpp_source.html#l00304">ECC_Start()</a>, <a class="el" href="key_8cpp_source.html#l00323">ECC_Stop()</a>, <a class="el" href="key_8cpp_source.html#l00143">CKey::GetPrivKey()</a>, <a class="el" href="key_8cpp_source.html#l00156">CKey::GetPubKey()</a>, <a class="el" href="key_8cpp_source.html#l00213">CKey::Load()</a>, <a class="el" href="key_8cpp_source.html#l00135">CKey::SetPrivKey()</a>, <a class="el" href="key_8cpp_source.html#l00169">CKey::Sign()</a>, and <a class="el" href="key_8cpp_source.html#l00198">CKey::SignCompact()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="key_8cpp.html">key.cpp</a></li>
|
|
<li class="footer">Generated on Thu Dec 14 2017 13:15:10 for Dash Core by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.14 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|