<!DOCTYPE html><htmllang="en"><head><metacharSet="utf-8"/><metahttp-equiv="X-UA-Compatible"content="IE=edge"/><title>Adaptor Signatures · bitcoin-s</title><metaname="viewport"content="width=device-width"/><metaname="generator"content="Docusaurus"/><metaname="description"content="Bitcoin-S now has support for an old experimental version of [ECDSA Adaptor Signatures](https://github.com/jonasnick/secp256k1/pull/14). This old version will soon be replaced by a newer version which is [being specified](https://github.com/discreetlogcontracts/dlcspecs/blob/03bf7095c2016e1ce9c9fb612920872d4456f179/ECDSA-adaptor.md) but in the meantime, bitcoin-s' version can still be used to experiment with applications of ECDSA adaptor signatures as it has a similar interface."/><metaname="docsearch:version"content="next"/><metaname="docsearch:language"content="en"/><metaproperty="og:title"content="Adaptor Signatures · bitcoin-s"/><metaproperty="og:type"content="website"/><metaproperty="og:url"content="https://bitcoin-s.org/"/><metaproperty="og:description"content="Bitcoin-S now has support for an old experimental version of [ECDSA Adaptor Signatures](https://github.com/jonasnick/secp256k1/pull/14). This old version will soon be replaced by a newer version which is [being specified](https://github.com/discreetlogcontracts/dlcspecs/blob/03bf7095c2016e1ce9c9fb612920872d4456f179/ECDSA-adaptor.md) but in the meantime, bitcoin-s' version can still be used to experiment with applications of ECDSA adaptor signatures as it has a similar interface."/><metaproperty="og:image"content="https://bitcoin-s.org/img/undraw_online.svg"/><metaname="twitter:card"content="summary"/><metaname="twitter:image"content="https://bitcoin-s.org/img/undraw_tweetstorm.svg"/><linkrel="shortcut icon"href="/img/favicon.ico"/><linkrel="stylesheet"href="https://cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css"/><linkrel="stylesheet"href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"/><script>
function createToggler(togglerSelector, targetSelector, className) {
var toggler = document.querySelector(togglerSelector);
var target = document.querySelector(targetSelector);
if (!toggler) {
return;
}
toggler.onclick = function(event) {
event.preventDefault();
target.classList.toggle(className);
};
}
});
</script></nav></div><divclass="container mainContainer docsContainer"><divclass="wrapper"><divclass="post"><headerclass="postHeader"><aclass="edit-page-link button"href="https://github.com/bitcoin-s/bitcoin-s/blob/master/docs/crypto/adaptor-signatures.md"target="_blank"rel="noreferrer noopener">Edit</a><h1id="__docusaurus"class="postHeaderTitle">Adaptor Signatures</h1></header><article><div><span><p>Bitcoin-S now has support for an old experimental version of <ahref="https://github.com/jonasnick/secp256k1/pull/14">ECDSA Adaptor Signatures</a>. This old version will soon be replaced by a newer version which is <ahref="https://github.com/discreetlogcontracts/dlcspecs/blob/03bf7095c2016e1ce9c9fb612920872d4456f179/ECDSA-adaptor.md">being specified</a> but in the meantime, bitcoin-s' version can still be used to experiment with applications of ECDSA adaptor signatures as it has a similar interface.</p>
<p>There are four relevant functions to adaptor signatures:</p>
<ul>
<li><code>sign</code>
<ul>
<li>This function belongs to <code>ECPrivateKey</code> and creates an adaptor signature given a message (<code>ByteVector</code>) and an adaptor point (<code>ECPublicKey</code>).</li>
</ul></li>
<li><code>verify</code>
<ul>
<li>Verifies an adaptor signature given the signing public key, the message and the adaptor point.</li>
</ul></li>
<li><code>complete</code>
<ul>
<li>This function belongs to <code>ECPrivateKey</code> and computes a valid ECDSA signature given a valid adaptor signature whose adaptor point is this private key's public key.</li>
</ul></li>
<li><code>extract</code>
<ul>
<li>This function belongs to <code>ECPublicKey</code> and computes the adaptor secret (private key to this public key) given a valid adaptor signature for this adaptor point, and the valid ECDSA signature computed using <code>complete</code>.</li>
</ul></li>
</ul>
<p>The following code shows each function to do with adaptor signature usage:</p>
<pre><codeclass="hljs css language-scala"><spanclass="hljs-comment">// Alice generages an adaptor signature using her private key and the adaptor point</span>