<oembed><type>rich</type><version>1.0</version><author_name>npub19helcfnqgk2jrwzjex2aflq6jwfc8zd9uzzkwlgwhve7lykv23mq5zkvn4</author_name><author_url>https://nostr.ae/npub19helcfnqgk2jrwzjex2aflq6jwfc8zd9uzzkwlgwhve7lykv23mq5zkvn4</author_url><provider_name>njump</provider_name><provider_url>https://nostr.ae</provider_url><html>📅 Original date posted:2018-05-07&#xA;📝 Original message:&#xA;Actually, just thought about this a bit more and I think it&#39;s possible to&#xA;deploy this in unison with (or after) any sort of SS based on schnorr&#xA;becomes&#xA;possible in Bitcoin. My observation is that since both techniques are based&#xA;on&#xA;the same underlying technique (revealing a secret value in a signature) and&#xA;they center around leveraging the onion payload to drop off a payment point&#xA;(G*a, or G*a_1*a_2*a_3, etc), then the disclosure within the _links_ can be&#xA;heterogeneous, as the same secret is still revealed in an end-to-end matter.&#xA;&#xA;As an illustration, consider: A &lt;-&gt; B &lt;-&gt; C. The A &lt;-&gt; B link could use the&#xA;2pc&#xA;pailier technique, while the B &lt;-&gt; C link could use the OG SS technique&#xA;based&#xA;on schnorr. If i&#39;m correct, then this would mean that we can deploy both&#xA;techniques, without worrying about fragmenting the network due to the&#xA;existence&#xA;of two similar but incompatible e2e payment routing schemes!&#xA;&#xA;-- Laolu&#xA;&#xA;&#xA;On Mon, May 7, 2018 at 4:57 PM Olaoluwa Osuntokun &lt;laolu32 at gmail.com&gt; wrote:&#xA;&#xA;&gt; Hi Pedro,&#xA;&gt;&#xA;&gt; Very cool stuff! When I originally discovered the Lindell&#39;s technique, my&#xA;&gt; immediate thought was the we could phase this in as a way to _immediately_&#xA;&gt; (no&#xA;&gt; additional Script upgrades required), replace the regular 2-of-2 mulit-sig&#xA;&gt; with&#xA;&gt; a single p2wkh. The immediate advantages of this would: be lower fees for&#xA;&gt; opening/closing channels (as the public key script, and witness are&#xA;&gt; smaller),&#xA;&gt; openings and cooperative close transactions would blend in with the&#xA;&gt; anonymity&#xA;&gt; set of regular p2wkh transactions, and finally the htlc timeout+success&#xA;&gt; transactions can be made smaller as we can remove the multi-sig. The second&#xA;&gt; benefit is nerfed a bit if the channel are advertised, but non-advertised&#xA;&gt; channels would be able to take advantage of this &#34;stealth&#34; feature.&#xA;&gt;&#xA;&gt; The upside of the original application I hand in mind is that it wouldn&#39;t&#xA;&gt; require any end-to-end changes, as it would only be a link level change&#xA;&gt; (diff&#xA;&gt; output for the funding transaction). If we wanted to allow these styles of&#xA;&gt; channels to be used outside of non-advertised channels, then we would need&#xA;&gt; to&#xA;&gt; update the way channels are verified in the gossip layer.&#xA;&gt;&#xA;&gt; Applying this to the realm of allowing us to use randomized payment&#xA;&gt; identifiers&#xA;&gt; across the route is obviously much, much doper. So then the question would&#xA;&gt; be&#xA;&gt; what the process of integrating the scheme into the existing protocol would&#xA;&gt; look like. The primary thing we&#39;d need to account for is the additional&#xA;&gt; cryptographic overhead this scheme would add if integrated. Re-reviewing&#xA;&gt; the&#xA;&gt; paper, there&#39;s an initial setup and verification phase (which was omitted&#xA;&gt; from&#xA;&gt; y&#39;alls note for brevity) where both parties need to complete before the&#xA;&gt; actually signing process can take place. Ideally, we can piggy-back this&#xA;&gt; setup&#xA;&gt; on top of the existing accept_channel/open_channel dance both sides need&#xA;&gt; to go&#xA;&gt; through in order to advance the channel negotiation process today.&#xA;&gt;&#xA;&gt; Conner actually started to implement this when we first discovered the&#xA;&gt; scheme,&#xA;&gt; so we have a pretty good feel w.r.t the implementation of the initial set&#xA;&gt; of&#xA;&gt; proofs. The three proofs required for the set up phase are:&#xA;&gt;&#xA;&gt;   1. A proof that that the Paillier public key is well formed. In the paper&#xA;&gt;   they only execute this step for the party that wishes to _obtain_ the&#xA;&gt;   signature. In our case, since we&#39;ll need to sign for HTLCs in both&#xA;&gt;   directions, but parties will need to execute this step.&#xA;&gt;&#xA;&gt;   2. A dlog proof for the signing keys themselves. We already do this more&#xA;&gt; or&#xA;&gt;   less, as if the remote party isn&#39;t able to sign with their target key,&#xA;&gt; then&#xA;&gt;   we won&#39;t be able to update the channel, or even create a valid&#xA;&gt; commitment in&#xA;&gt;   the first place.&#xA;&gt;&#xA;&gt;   3. A proof that value encrypted (the Paillier ciphertext) is actually the&#xA;&gt;   dlog of the public key to be used for signing. (as an aside this is the&#xA;&gt; part&#xA;&gt;   of the protocol that made me do a double take when first reading it:&#xA;&gt; using one&#xA;&gt;   cryptosystem to encrypt the private key of another cryptosystem in order&#xA;&gt; to&#xA;&gt;   construct a 2pc to allow signing in the latter cryptosystem! soo clever!)&#xA;&gt;&#xA;&gt; First, we&#39;ll examine the initial proof. This only needs to be done once by&#xA;&gt; both&#xA;&gt; parties AFAICT. As a result, we may be able to piggyback this onto the&#xA;&gt; initial&#xA;&gt; channel funding steps. Reviewing the paper cited on the Lindell paper [1],&#xA;&gt; it&#xA;&gt; appears this would take 1 RTT, so this shouldn&#39;t result in any additional&#xA;&gt; round&#xA;&gt; trips during the funding process. We should be able to use a Paillier&#xA;&gt; modulos&#xA;&gt; of 2048 bits, so nothing too crazy. This would just result in a slightly&#xA;&gt; bigger&#xA;&gt; opening message.&#xA;&gt;&#xA;&gt; Skipping the second proofs as it&#39;s pretty standard.&#xA;&gt;&#xA;&gt; The third proof as described (Section 6 of the Lindell paper) is&#xA;&gt; interactive.&#xA;&gt; It also contains a ZK range proof as a sub-protocol which as described in&#xA;&gt; Appendix A is also interactive. However, it was pointed out to us by Omer&#xA;&gt; Shlomovits on the lnd slack, that we can actually replace their custom&#xA;&gt; range&#xA;&gt; proofs with Bulletproofs. This would make this section non-interactive,&#xA;&gt; allowing the proof itself to take 1.5 RTT AFAICT. Additionally, this would&#xA;&gt; only&#xA;&gt; need to be done once at the start, as AFIACT, we can re-use the encryption&#xA;&gt; of&#xA;&gt; the secp256k1 private key of both parties.&#xA;&gt;&#xA;&gt; The current channel opening process requires 2 RTT, so it seems that we&#39;d&#xA;&gt; be&#xA;&gt; able to easily piggy back all the opening proofs on top of the existing&#xA;&gt; funding&#xA;&gt; protocol. The main cost would be the increased size of these opening&#xA;&gt; messages,&#xA;&gt; and also the additional computational cost of operations within the&#xA;&gt; Paillier&#xA;&gt; modulus and the new range proof.&#xA;&gt;&#xA;&gt; The additional components that would need to be modified are the process of&#xA;&gt; adding+settling an HTLC, and also the onion payload that drops off the&#xA;&gt; point&#xA;&gt; whose dlog is r_1*alpha. Within the current protocol, adding and settling&#xA;&gt; an&#xA;&gt; HTLC are more or less non-interactive, we have a single message for each,&#xA;&gt; which&#xA;&gt; is then staged to be committed in new commitments for both parties. With&#xA;&gt; this&#xA;&gt; new scheme (if I follow it correctly), adding an HTLC now requires N RTT:&#xA;&gt;   1. Alice sends A = G*alpha to Bob. Here alpha is the payment secret.&#xA;&gt;   2. Bob sends R_3 = (G*alpha)*r_2 (along w/ a proof of knowledge of r_2&#xA;&gt; and&#xA;&gt;   relation to A)&#xA;&gt;   3. Alice sends R_3&#39; = (G*alpha)*r_3 (along with a similar proof as&#xA;&gt; above) 4.&#xA;&gt;   Bob then computes c3 (the encrypted partial sig which when completed will&#xA;&gt;   reveal a) to Alice.&#xA;&gt;   5. Alice decrypts c3 to get the plaintext partial sig (s&#39;), then&#xA;&gt; finalizes&#xA;&gt;   the set up by sending s&#39;&#39; to Bob.&#xA;&gt;&#xA;&gt; This process takes 2.5 RTT, and would require re-working the state machine&#xA;&gt; slightly to only actually commit an HTLC after step 5 has been completed.&#xA;&gt; When&#xA;&gt; Bob obtains a from the next party in the path, we Alice can then then over&#xA;&gt; the&#xA;&gt; signature, from which Alice can extract alpha. So adding HTLCs is now a bit&#xA;&gt; more interactive, but settling them is the same a before.&#xA;&gt;&#xA;&gt; Finally, the onion payload would need to be re-interpreted in order to&#xA;&gt; encode&#xA;&gt; G*alpha which takes 33 bytes. We can shave this down to 32 by selecting&#xA;&gt; the x&#xA;&gt; coordinate (at the sender) to always be either even or odd. Currently, we&#xA;&gt; have&#xA;&gt; 12 unused bytes in the onion payload. The HMAC is currently 32 bytes. One&#xA;&gt; path&#xA;&gt; would be to allocate a portion of HMAC space to encoding this point. A&#xA;&gt; 16-byte&#xA;&gt; HMAC would probably have been enough in the beginning, so we can drop down&#xA;&gt; to&#xA;&gt; that. However, that still leaves 4 bytes somewhere that has to give...one&#xA;&gt; could&#xA;&gt; either obtain these extra bytes from the CLTV and Amount fields, or just&#xA;&gt; have&#xA;&gt; each hop consume an extra payload. The latter path would mean that the new&#xA;&gt; upper hop limit is actually 10.&#xA;&gt;&#xA;&gt; However, given that we would need need a new global feature bit in order to&#xA;&gt; roll this out, it may make sense to re-work the onion format all together&#xA;&gt; which&#xA;&gt; would mean that we wouldn&#39;t need to hack the old format a bit to&#xA;&gt; accommodate&#xA;&gt; this additional data. One aspect of introducing a new end-to-end contract&#xA;&gt; type&#xA;&gt; which I hadn&#39;t considered before is that each new type effectively&#xA;&gt; partitions&#xA;&gt; the network. This is due to the fact that these HTLCs will now only be&#xA;&gt; able to&#xA;&gt; be carried along paths that understand this new feature. As a result,&#xA;&gt; plausible&#xA;&gt; path diversity takes as we can no longer utilize all channels on the&#xA;&gt; network&#xA;&gt; for routing. This would suggest that introducing new end to end contract&#xA;&gt; types&#xA;&gt; (if one wishes to use them widely across arbitrary channels and not for&#xA;&gt; specific contract protocols) may be a strong point of synchronization w.r.t&#xA;&gt; updates across the network. As a result, we may need to be a bit more&#xA;&gt; discerning w.r.t new candidates for e2e contracts given the coordination&#xA;&gt; costs.&#xA;&gt;&#xA;&gt; So the takeaways are:&#xA;&gt;   * we can probably piggy back the extra proofs onto the channel opening&#xA;&gt;     process&#xA;&gt;       * one of the subproofs can use bulletproofs to make the proof&#xA;&gt; shorter and&#xA;&gt;         also non-interactive&#xA;&gt;   * adding an HTLC would take 2.5 RTT&#39;s, but settling is just as quick as&#xA;&gt;     before&#xA;&gt;   * the onion payload would either need to be hacked, or extended to&#xA;&gt; support&#xA;&gt;     packaging the point.&#xA;&gt;   * the utility of the scheme won&#39;t shine until all/most of the network&#xA;&gt; uses it&#xA;&gt;   * we could start w/ just the introduction of the OG 2PC scheme as a&#xA;&gt; multi-sig&#xA;&gt;     replacement&#xA;&gt;&#xA;&gt;&#xA;&gt; [1]: https://eprint.iacr.org/2011/494.pdf (section 3.3)&#xA;&gt;&#xA;&gt; -- Laolu&#xA;&gt;&#xA;&gt;&#xA;&gt; On Fri, Apr 27, 2018 at 11:42 AM Pedro Moreno Sanchez &lt;pmorenos at purdue.edu&gt;&#xA;&gt; wrote:&#xA;&gt;&#xA;&gt;&gt; Hello guys,&#xA;&gt;&gt;&#xA;&gt;&gt; as some of you already know, I am working on some cryptographic&#xA;&gt;&gt; constructions that might be of interest and useful for the Lightning&#xA;&gt;&gt; Network.&#xA;&gt;&gt;&#xA;&gt;&gt; Recently, I have come up with a scriptless version of the adaptor&#xA;&gt;&gt; signatures and the contract required in the Lighting Network using only&#xA;&gt;&gt; 2-party ECDSA signatures. The main advantage is that, instead of waiting&#xA;&gt;&gt; for Schnorr signatures to be deployed in Bitcoin so that Poelstra&#39;s&#xA;&gt;&gt; scriptless scripts can be used, I believe that this ECDSA-version of the&#xA;&gt;&gt; scriptless scripts can be directly applied today.&#xA;&gt;&gt;&#xA;&gt;&gt; Details are in the attached PDF. I am looking forward to hearing your&#xA;&gt;&gt; comments and suggestions.&#xA;&gt;&gt;&#xA;&gt;&gt; Cheers,&#xA;&gt;&gt; Pedro.&#xA;&gt;&gt;&#xA;&gt;&gt; _______________________________________________&#xA;&gt;&gt; Lightning-dev mailing list&#xA;&gt;&gt; Lightning-dev at lists.linuxfoundation.org&#xA;&gt;&gt; https://lists.linuxfoundation.org/mailman/listinfo/lightning-dev&#xA;&gt;&gt;&#xA;&gt;&#xA;-------------- next part --------------&#xA;An HTML attachment was scrubbed...&#xA;URL: &lt;http://lists.linuxfoundation.org/pipermail/lightning-dev/attachments/20180508/04e449be/attachment-0001.html&gt;</html></oembed>