mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 17:56:16 +00:00
543 lines
30 KiB
HTML
543 lines
30 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/secp256k1/src/modules/recovery/main_impl.h 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('recovery_2main__impl_8h.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> </div>
|
|
<div class="headertitle">
|
|
<div class="title">main_impl.h File Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><code>#include "<a class="el" href="secp256k1__recovery_8h_source.html">include/secp256k1_recovery.h</a>"</code><br />
|
|
</div>
|
|
<p><a href="recovery_2main__impl_8h_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:aa3ef0903a865dc9a6e42dfe61f75a9e5"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="recovery_2main__impl_8h.html#aa3ef0903a865dc9a6e42dfe61f75a9e5">secp256k1_ecdsa_recoverable_signature_load</a> (const <a class="el" href="secp256k1_8h.html#a282ec9e6dfec8c35955c3eb2f7476e5e">secp256k1_context</a> *<a class="el" href="tests_8c.html#a06a3e29ada83211a695a49e8f7405842">ctx</a>, <a class="el" href="structsecp256k1__scalar.html">secp256k1_scalar</a> *r, <a class="el" href="structsecp256k1__scalar.html">secp256k1_scalar</a> *s, int *recid, const <a class="el" href="structsecp256k1__ecdsa__recoverable__signature.html">secp256k1_ecdsa_recoverable_signature</a> *sig)</td></tr>
|
|
<tr class="separator:aa3ef0903a865dc9a6e42dfe61f75a9e5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a58a8a03b17aeb5cb4daf2940a58663b9"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="recovery_2main__impl_8h.html#a58a8a03b17aeb5cb4daf2940a58663b9">secp256k1_ecdsa_recoverable_signature_save</a> (<a class="el" href="structsecp256k1__ecdsa__recoverable__signature.html">secp256k1_ecdsa_recoverable_signature</a> *sig, const <a class="el" href="structsecp256k1__scalar.html">secp256k1_scalar</a> *r, const <a class="el" href="structsecp256k1__scalar.html">secp256k1_scalar</a> *s, int recid)</td></tr>
|
|
<tr class="separator:a58a8a03b17aeb5cb4daf2940a58663b9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a37101568f72e98d7b29de6c6a825a289"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="recovery_2main__impl_8h.html#a37101568f72e98d7b29de6c6a825a289">secp256k1_ecdsa_recoverable_signature_parse_compact</a> (const <a class="el" href="secp256k1_8h.html#a282ec9e6dfec8c35955c3eb2f7476e5e">secp256k1_context</a> *<a class="el" href="tests_8c.html#a06a3e29ada83211a695a49e8f7405842">ctx</a>, <a class="el" href="structsecp256k1__ecdsa__recoverable__signature.html">secp256k1_ecdsa_recoverable_signature</a> *sig, const unsigned char *input64, int recid)</td></tr>
|
|
<tr class="separator:a37101568f72e98d7b29de6c6a825a289"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac122392fa6ff6264a7a110875af164b0"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="recovery_2main__impl_8h.html#ac122392fa6ff6264a7a110875af164b0">secp256k1_ecdsa_recoverable_signature_serialize_compact</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 *output64, int *recid, const <a class="el" href="structsecp256k1__ecdsa__recoverable__signature.html">secp256k1_ecdsa_recoverable_signature</a> *sig)</td></tr>
|
|
<tr class="separator:ac122392fa6ff6264a7a110875af164b0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a16ddfc800140d761bc783e571c34548c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="recovery_2main__impl_8h.html#a16ddfc800140d761bc783e571c34548c">secp256k1_ecdsa_recoverable_signature_convert</a> (const <a class="el" href="secp256k1_8h.html#a282ec9e6dfec8c35955c3eb2f7476e5e">secp256k1_context</a> *<a class="el" href="tests_8c.html#a06a3e29ada83211a695a49e8f7405842">ctx</a>, <a class="el" href="structsecp256k1__ecdsa__signature.html">secp256k1_ecdsa_signature</a> *sig, const <a class="el" href="structsecp256k1__ecdsa__recoverable__signature.html">secp256k1_ecdsa_recoverable_signature</a> *sigin)</td></tr>
|
|
<tr class="separator:a16ddfc800140d761bc783e571c34548c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1a831ed991717749ed9d200bb9d3f03b"><td class="memItemLeft" align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="recovery_2main__impl_8h.html#a1a831ed991717749ed9d200bb9d3f03b">secp256k1_ecdsa_sig_recover</a> (const <a class="el" href="structsecp256k1__ecmult__context.html">secp256k1_ecmult_context</a> *<a class="el" href="tests_8c.html#a06a3e29ada83211a695a49e8f7405842">ctx</a>, const <a class="el" href="structsecp256k1__scalar.html">secp256k1_scalar</a> *sigr, const <a class="el" href="structsecp256k1__scalar.html">secp256k1_scalar</a> *sigs, <a class="el" href="structsecp256k1__ge.html">secp256k1_ge</a> *pubkey, const <a class="el" href="structsecp256k1__scalar.html">secp256k1_scalar</a> *message, int recid)</td></tr>
|
|
<tr class="separator:a1a831ed991717749ed9d200bb9d3f03b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae06d019b6eaa34e248a502ba9c6d04cb"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="recovery_2main__impl_8h.html#ae06d019b6eaa34e248a502ba9c6d04cb">secp256k1_ecdsa_sign_recoverable</a> (const <a class="el" href="secp256k1_8h.html#a282ec9e6dfec8c35955c3eb2f7476e5e">secp256k1_context</a> *<a class="el" href="tests_8c.html#a06a3e29ada83211a695a49e8f7405842">ctx</a>, <a class="el" href="structsecp256k1__ecdsa__recoverable__signature.html">secp256k1_ecdsa_recoverable_signature</a> *signature, const unsigned char *msg32, const unsigned char *seckey, <a class="el" href="secp256k1_8h.html#a539882fd91bff672712fa19a4cfaeb98">secp256k1_nonce_function</a> noncefp, const void *noncedata)</td></tr>
|
|
<tr class="separator:ae06d019b6eaa34e248a502ba9c6d04cb"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a75f3e32e9a25eac9e8f9d3a5a8b0dc94"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="recovery_2main__impl_8h.html#a75f3e32e9a25eac9e8f9d3a5a8b0dc94">secp256k1_ecdsa_recover</a> (const <a class="el" href="secp256k1_8h.html#a282ec9e6dfec8c35955c3eb2f7476e5e">secp256k1_context</a> *<a class="el" href="tests_8c.html#a06a3e29ada83211a695a49e8f7405842">ctx</a>, <a class="el" href="structsecp256k1__pubkey.html">secp256k1_pubkey</a> *pubkey, const <a class="el" href="structsecp256k1__ecdsa__recoverable__signature.html">secp256k1_ecdsa_recoverable_signature</a> *signature, const unsigned char *msg32)</td></tr>
|
|
<tr class="separator:a75f3e32e9a25eac9e8f9d3a5a8b0dc94"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a id="a75f3e32e9a25eac9e8f9d3a5a8b0dc94"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a75f3e32e9a25eac9e8f9d3a5a8b0dc94">◆ </a></span>secp256k1_ecdsa_recover()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int secp256k1_ecdsa_recover </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"><a class="el" href="structsecp256k1__pubkey.html">secp256k1_pubkey</a> * </td>
|
|
<td class="paramname"><em>pubkey</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="structsecp256k1__ecdsa__recoverable__signature.html">secp256k1_ecdsa_recoverable_signature</a> * </td>
|
|
<td class="paramname"><em>sig</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const unsigned char * </td>
|
|
<td class="paramname"><em>msg32</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Recover an ECDSA public key from a signature.</p>
|
|
<p>Returns: 1: public key successfully recovered (which guarantees a correct signature). 0: otherwise. Args: ctx: pointer to a context object, initialized for verification (cannot be NULL) Out: pubkey: pointer to the recovered public key (cannot be NULL) In: sig: pointer to initialized signature that supports pubkey recovery (cannot be NULL) msg32: the 32-byte message hash assumed to be signed (cannot be NULL) </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="recovery_2main__impl_8h_source.html#l00170">170</a> of file <a class="el" href="recovery_2main__impl_8h_source.html">main_impl.h</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="bench__recover_8c_source.html#l00018">bench_recover()</a>, <a class="el" href="pubkey_8cpp_source.html#l00187">CPubKey::RecoverCompact()</a>, <a class="el" href="recovery_2tests__impl_8h_source.html#l00069">test_ecdsa_recovery_edge_cases()</a>, and <a class="el" href="recovery_2tests__impl_8h_source.html#l00010">test_ecdsa_recovery_end_to_end()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a16ddfc800140d761bc783e571c34548c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a16ddfc800140d761bc783e571c34548c">◆ </a></span>secp256k1_ecdsa_recoverable_signature_convert()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int secp256k1_ecdsa_recoverable_signature_convert </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"><a class="el" href="structsecp256k1__ecdsa__signature.html">secp256k1_ecdsa_signature</a> * </td>
|
|
<td class="paramname"><em>sig</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="structsecp256k1__ecdsa__recoverable__signature.html">secp256k1_ecdsa_recoverable_signature</a> * </td>
|
|
<td class="paramname"><em>sigin</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Convert a recoverable signature into a normal signature.</p>
|
|
<p>Returns: 1 Out: sig: a pointer to a normal signature (cannot be NULL). In: sigin: a pointer to a recoverable signature (cannot be NULL). </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="recovery_2main__impl_8h_source.html#l00074">74</a> of file <a class="el" href="recovery_2main__impl_8h_source.html">main_impl.h</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="recovery_2tests__impl_8h_source.html#l00010">test_ecdsa_recovery_end_to_end()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa3ef0903a865dc9a6e42dfe61f75a9e5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa3ef0903a865dc9a6e42dfe61f75a9e5">◆ </a></span>secp256k1_ecdsa_recoverable_signature_load()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static void secp256k1_ecdsa_recoverable_signature_load </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"><a class="el" href="structsecp256k1__scalar.html">secp256k1_scalar</a> * </td>
|
|
<td class="paramname"><em>r</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="structsecp256k1__scalar.html">secp256k1_scalar</a> * </td>
|
|
<td class="paramname"><em>s</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int * </td>
|
|
<td class="paramname"><em>recid</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="structsecp256k1__ecdsa__recoverable__signature.html">secp256k1_ecdsa_recoverable_signature</a> * </td>
|
|
<td class="paramname"><em>sig</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="recovery_2main__impl_8h_source.html#l00012">12</a> of file <a class="el" href="recovery_2main__impl_8h_source.html">main_impl.h</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="recovery_2main__impl_8h_source.html#l00170">secp256k1_ecdsa_recover()</a>, <a class="el" href="recovery_2main__impl_8h_source.html#l00074">secp256k1_ecdsa_recoverable_signature_convert()</a>, and <a class="el" href="recovery_2main__impl_8h_source.html#l00060">secp256k1_ecdsa_recoverable_signature_serialize_compact()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a37101568f72e98d7b29de6c6a825a289"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a37101568f72e98d7b29de6c6a825a289">◆ </a></span>secp256k1_ecdsa_recoverable_signature_parse_compact()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int secp256k1_ecdsa_recoverable_signature_parse_compact </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"><a class="el" href="structsecp256k1__ecdsa__recoverable__signature.html">secp256k1_ecdsa_recoverable_signature</a> * </td>
|
|
<td class="paramname"><em>sig</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const unsigned char * </td>
|
|
<td class="paramname"><em>input64</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>recid</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Parse a compact ECDSA signature (64 bytes + recovery id).</p>
|
|
<p>Returns: 1 when the signature could be parsed, 0 otherwise Args: ctx: a secp256k1 context object Out: sig: a pointer to a signature object In: input64: a pointer to a 64-byte compact signature recid: the recovery id (0, 1, 2 or 3) </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="recovery_2main__impl_8h_source.html#l00038">38</a> of file <a class="el" href="recovery_2main__impl_8h_source.html">main_impl.h</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="bench__recover_8c_source.html#l00018">bench_recover()</a>, <a class="el" href="pubkey_8cpp_source.html#l00187">CPubKey::RecoverCompact()</a>, <a class="el" href="recovery_2tests__impl_8h_source.html#l00069">test_ecdsa_recovery_edge_cases()</a>, and <a class="el" href="recovery_2tests__impl_8h_source.html#l00010">test_ecdsa_recovery_end_to_end()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a58a8a03b17aeb5cb4daf2940a58663b9"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a58a8a03b17aeb5cb4daf2940a58663b9">◆ </a></span>secp256k1_ecdsa_recoverable_signature_save()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static void secp256k1_ecdsa_recoverable_signature_save </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="structsecp256k1__ecdsa__recoverable__signature.html">secp256k1_ecdsa_recoverable_signature</a> * </td>
|
|
<td class="paramname"><em>sig</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="structsecp256k1__scalar.html">secp256k1_scalar</a> * </td>
|
|
<td class="paramname"><em>r</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="structsecp256k1__scalar.html">secp256k1_scalar</a> * </td>
|
|
<td class="paramname"><em>s</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>recid</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="recovery_2main__impl_8h_source.html#l00027">27</a> of file <a class="el" href="recovery_2main__impl_8h_source.html">main_impl.h</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="recovery_2main__impl_8h_source.html#l00038">secp256k1_ecdsa_recoverable_signature_parse_compact()</a>, and <a class="el" href="recovery_2main__impl_8h_source.html#l00123">secp256k1_ecdsa_sign_recoverable()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac122392fa6ff6264a7a110875af164b0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac122392fa6ff6264a7a110875af164b0">◆ </a></span>secp256k1_ecdsa_recoverable_signature_serialize_compact()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int secp256k1_ecdsa_recoverable_signature_serialize_compact </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>output64</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int * </td>
|
|
<td class="paramname"><em>recid</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="structsecp256k1__ecdsa__recoverable__signature.html">secp256k1_ecdsa_recoverable_signature</a> * </td>
|
|
<td class="paramname"><em>sig</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Serialize an ECDSA signature in compact format (64 bytes + recovery id).</p>
|
|
<p>Returns: 1 Args: ctx: a secp256k1 context object Out: output64: a pointer to a 64-byte array of the compact signature (cannot be NULL) recid: a pointer to an integer to hold the recovery id (can be NULL). In: sig: a pointer to an initialized signature object (cannot be NULL) </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="recovery_2main__impl_8h_source.html#l00060">60</a> of file <a class="el" href="recovery_2main__impl_8h_source.html">main_impl.h</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="key_8cpp_source.html#l00198">CKey::SignCompact()</a>, and <a class="el" href="recovery_2tests__impl_8h_source.html#l00010">test_ecdsa_recovery_end_to_end()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a1a831ed991717749ed9d200bb9d3f03b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a1a831ed991717749ed9d200bb9d3f03b">◆ </a></span>secp256k1_ecdsa_sig_recover()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static int secp256k1_ecdsa_sig_recover </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="structsecp256k1__ecmult__context.html">secp256k1_ecmult_context</a> * </td>
|
|
<td class="paramname"><em>ctx</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="structsecp256k1__scalar.html">secp256k1_scalar</a> * </td>
|
|
<td class="paramname"><em>sigr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="structsecp256k1__scalar.html">secp256k1_scalar</a> * </td>
|
|
<td class="paramname"><em>sigs</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="structsecp256k1__ge.html">secp256k1_ge</a> * </td>
|
|
<td class="paramname"><em>pubkey</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const <a class="el" href="structsecp256k1__scalar.html">secp256k1_scalar</a> * </td>
|
|
<td class="paramname"><em>message</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"><em>recid</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="recovery_2main__impl_8h_source.html#l00087">87</a> of file <a class="el" href="recovery_2main__impl_8h_source.html">main_impl.h</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="recovery_2main__impl_8h_source.html#l00170">secp256k1_ecdsa_recover()</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae06d019b6eaa34e248a502ba9c6d04cb"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae06d019b6eaa34e248a502ba9c6d04cb">◆ </a></span>secp256k1_ecdsa_sign_recoverable()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">int secp256k1_ecdsa_sign_recoverable </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"><a class="el" href="structsecp256k1__ecdsa__recoverable__signature.html">secp256k1_ecdsa_recoverable_signature</a> * </td>
|
|
<td class="paramname"><em>sig</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const unsigned char * </td>
|
|
<td class="paramname"><em>msg32</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const unsigned char * </td>
|
|
<td class="paramname"><em>seckey</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype"><a class="el" href="secp256k1_8h.html#a539882fd91bff672712fa19a4cfaeb98">secp256k1_nonce_function</a> </td>
|
|
<td class="paramname"><em>noncefp</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const void * </td>
|
|
<td class="paramname"><em>ndata</em> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<p>Create a recoverable ECDSA signature.</p>
|
|
<p>Returns: 1: signature created 0: the nonce generation function failed, or the private key was invalid. Args: ctx: pointer to a context object, initialized for signing (cannot be NULL) Out: sig: pointer to an array where the signature will be placed (cannot be NULL) In: msg32: the 32-byte message hash being signed (cannot be NULL) seckey: pointer to a 32-byte secret key (cannot be NULL) noncefp:pointer to a nonce generation function. If NULL, secp256k1_nonce_function_default is used ndata: pointer to arbitrary data used by the nonce generation function (can be NULL) </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="recovery_2main__impl_8h_source.html#l00123">123</a> of file <a class="el" href="recovery_2main__impl_8h_source.html">main_impl.h</a>.</p>
|
|
|
|
<p class="reference">Referenced by <a class="el" href="key_8cpp_source.html#l00198">CKey::SignCompact()</a>, and <a class="el" href="recovery_2tests__impl_8h_source.html#l00010">test_ecdsa_recovery_end_to_end()</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="dir_44f34d1e62fda08bdb4ca69ab2d205ae.html">secp256k1</a></li><li class="navelem"><a class="el" href="dir_8db2ef784512d48b2a7d00369dfaac28.html">src</a></li><li class="navelem"><a class="el" href="dir_403fe05abfd2d392aa3c0b8c300f7bf6.html">modules</a></li><li class="navelem"><a class="el" href="dir_27f6b90a2e23ffca0ad215073d764470.html">recovery</a></li><li class="navelem"><a class="el" href="recovery_2main__impl_8h.html">main_impl.h</a></li>
|
|
<li class="footer">Generated on Thu Dec 14 2017 13:15:11 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>
|