mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 17:56:16 +00:00
369 lines
24 KiB
HTML
369 lines
24 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/include/secp256k1_recovery.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('secp256k1__recovery_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="#nested-classes">Classes</a> |
|
|
<a href="#func-members">Functions</a> </div>
|
|
<div class="headertitle">
|
|
<div class="title">secp256k1_recovery.h File Reference</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><code>#include "<a class="el" href="secp256k1_8h_source.html">secp256k1.h</a>"</code><br />
|
|
</div>
|
|
<p><a href="secp256k1__recovery_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="nested-classes"></a>
|
|
Classes</h2></td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structsecp256k1__ecdsa__recoverable__signature.html">secp256k1_ecdsa_recoverable_signature</a></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
|
|
Functions</h2></td></tr>
|
|
<tr class="memitem:a6699b45dc75be70f028ac7d8ffaba46e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="secp256k1_8h.html#a3f1967acd0fe26283877c61b3f2694a5">SECP256K1_API</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="secp256k1__recovery_8h.html#a6699b45dc75be70f028ac7d8ffaba46e">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) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(1) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(2) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(3)</td></tr>
|
|
<tr class="separator:a6699b45dc75be70f028ac7d8ffaba46e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad7a20c9f7ccd9fc6d75a19a3b4195aa5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="secp256k1_8h.html#a3f1967acd0fe26283877c61b3f2694a5">SECP256K1_API</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="secp256k1__recovery_8h.html#ad7a20c9f7ccd9fc6d75a19a3b4195aa5">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) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(1) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(2) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(3)</td></tr>
|
|
<tr class="separator:ad7a20c9f7ccd9fc6d75a19a3b4195aa5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a12f08c89ceb61949c6a4ec6eb2511185"><td class="memItemLeft" align="right" valign="top"><a class="el" href="secp256k1_8h.html#a3f1967acd0fe26283877c61b3f2694a5">SECP256K1_API</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="secp256k1__recovery_8h.html#a12f08c89ceb61949c6a4ec6eb2511185">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) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(1) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(2) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(3) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(4)</td></tr>
|
|
<tr class="separator:a12f08c89ceb61949c6a4ec6eb2511185"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1b1f4423a232f681e90e5f9d28f3d148"><td class="memItemLeft" align="right" valign="top"><a class="el" href="secp256k1_8h.html#a3f1967acd0fe26283877c61b3f2694a5">SECP256K1_API</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="secp256k1__recovery_8h.html#a1b1f4423a232f681e90e5f9d28f3d148">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> *sig, const unsigned char *msg32, const unsigned char *seckey, <a class="el" href="secp256k1_8h.html#a539882fd91bff672712fa19a4cfaeb98">secp256k1_nonce_function</a> noncefp, const void *ndata) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(1) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(2) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(3) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(4)</td></tr>
|
|
<tr class="separator:a1b1f4423a232f681e90e5f9d28f3d148"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7e156c6f4be24b07f4a563210dcb1a2e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="secp256k1_8h.html#a3f1967acd0fe26283877c61b3f2694a5">SECP256K1_API</a> <a class="el" href="secp256k1_8h.html#aebd5ca8fbfcbb0ba0754a46115143c2c">SECP256K1_WARN_UNUSED_RESULT</a> int </td><td class="memItemRight" valign="bottom"><a class="el" href="secp256k1__recovery_8h.html#a7e156c6f4be24b07f4a563210dcb1a2e">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> *sig, const unsigned char *msg32) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(1) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(2) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(3) <a class="el" href="secp256k1_8h.html#a03c194d8fa91b9b66758b36c91e0b5cb">SECP256K1_ARG_NONNULL</a>(4)</td></tr>
|
|
<tr class="separator:a7e156c6f4be24b07f4a563210dcb1a2e"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<h2 class="groupheader">Function Documentation</h2>
|
|
<a id="a7e156c6f4be24b07f4a563210dcb1a2e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7e156c6f4be24b07f4a563210dcb1a2e">◆ </a></span>secp256k1_ecdsa_recover()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="secp256k1_8h.html#a3f1967acd0fe26283877c61b3f2694a5">SECP256K1_API</a> <a class="el" href="secp256k1_8h.html#aebd5ca8fbfcbb0ba0754a46115143c2c">SECP256K1_WARN_UNUSED_RESULT</a> 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="ad7a20c9f7ccd9fc6d75a19a3b4195aa5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad7a20c9f7ccd9fc6d75a19a3b4195aa5">◆ </a></span>secp256k1_ecdsa_recoverable_signature_convert()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="secp256k1_8h.html#a3f1967acd0fe26283877c61b3f2694a5">SECP256K1_API</a> 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="a6699b45dc75be70f028ac7d8ffaba46e"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6699b45dc75be70f028ac7d8ffaba46e">◆ </a></span>secp256k1_ecdsa_recoverable_signature_parse_compact()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="secp256k1_8h.html#a3f1967acd0fe26283877c61b3f2694a5">SECP256K1_API</a> 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="a12f08c89ceb61949c6a4ec6eb2511185"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a12f08c89ceb61949c6a4ec6eb2511185">◆ </a></span>secp256k1_ecdsa_recoverable_signature_serialize_compact()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="secp256k1_8h.html#a3f1967acd0fe26283877c61b3f2694a5">SECP256K1_API</a> 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="a1b1f4423a232f681e90e5f9d28f3d148"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a1b1f4423a232f681e90e5f9d28f3d148">◆ </a></span>secp256k1_ecdsa_sign_recoverable()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="secp256k1_8h.html#a3f1967acd0fe26283877c61b3f2694a5">SECP256K1_API</a> 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_1b4df0b9bba47cf333db333897c5a5a4.html">include</a></li><li class="navelem"><a class="el" href="secp256k1__recovery_8h.html">secp256k1_recovery.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>
|