<oembed><type>rich</type><version>1.0</version><author_name>npub10etkvm8l0jr0jsgdx02dxnhnu5g989dnca90guj5rklwkaplnh3sgjc727</author_name><author_url>https://nostr.ae/npub10etkvm8l0jr0jsgdx02dxnhnu5g989dnca90guj5rklwkaplnh3sgjc727</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2014-01-08&#xA;📝 Original message:Thanks Peter for the paper!&#xA;&#xA;I&#39;m just going to restate your &#39;simple explanation&#39; to make sure I got  &#xA;it...&#xA;&#xA;The payee publishes a public key of theirs, which will be a long-standing  &#xA;identifier, public key = &#39;Q&#39;, corresponding private key = &#39;d&#39;.&#xA;&#xA;To pay them, payee generate a keypair, private key = &#39;e&#39; public key of  &#xA;&#39;P&#39;. Publish &#39;P&#39; in the transaction.&#xA;&#xA;The payer can calculate S = eQ, where S is a shared secret between  &#xA;payer/payee. The payee calculates the same S as S = dP. So the payee sees  &#xA;&#39;P&#39; in a transaction, and multiplies by their private key, to get S.&#xA;&#xA;Now that we have the shared secret, either side can calculate an offset to  &#xA;Q which becomes the pay-to-address. When you say BIP32-style derivation,  &#xA;Q&#39; = H(S) + Q, does this mean Q + SHA256(33-byte S)?&#xA;&#xA;A payee has to check each transaction (or every transaction of a fixed  &#xA;prefix) with &#39;P&#39;, calculate Q&#39; = Q + H(dP) and see if that transaction  &#xA;pays to Q&#39;. If the address matches, then the payee can spend it with  &#xA;private key of d + H(dP).&#xA;&#xA;One downside is that you have to hold your private key in memory  &#xA;unencrypted in order to identify new payments coming in. So  &#xA;stealth-addresses may not be suitable for receiving eCommerce payments,  &#xA;since you can&#39;t implement a corresponding watch-only wallet, e.g. there&#39;s  &#xA;no way to &#34;direct-deposit into cold storage.&#34;&#xA;&#xA;Hope I got that right...&#xA;&#xA;On Mon, 06 Jan 2014 04:03:38 -0800, Peter Todd &lt;pete at petertodd.org&gt; wrote:&#xA;&#xA;&gt; Using Elliptic curve Diffie-Hellman (ECDH) we can generate a shared&#xA;&gt; secret that the payee can use to recover their funds. Let the payee have&#xA;&gt; keypair Q=dG. The payor generates nonce keypair P=eG and uses ECDH to&#xA;&gt; arrive at shared secret c=H(eQ)=H(dP). This secret could be used to&#xA;&gt; derive a ECC secret key, and from that a scriptPubKey, however that&#xA;&gt; would allow both payor and payee the ability to spend the funds. So&#xA;&gt; instead we use BIP32-style derivation to create Q&#39;=(Q+c)G and associated&#xA;&gt; scriptPubKey.&#xA;&gt;&#xA;&gt; As for the nonce keypair, that is included in the transaction in an&#xA;&gt; additional zero-valued output:&#xA;&gt;    RETURN &lt;P&gt;</html></oembed>