Return-Path: Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 939BCC002D for ; Sat, 11 Jun 2022 14:30:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 7450660AE8 for ; Sat, 11 Jun 2022 14:30:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -2.098 X-Spam-Level: X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fxBRYwVxjNVX for ; Sat, 11 Jun 2022 14:30:29 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by smtp3.osuosl.org (Postfix) with ESMTPS id E657F60AA7 for ; Sat, 11 Jun 2022 14:30:28 +0000 (UTC) Received: by mail-lf1-x12a.google.com with SMTP id c2so2641044lfk.0 for ; Sat, 11 Jun 2022 07:30:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=B7DdUgX9XzJkLBFO+GnuFoFTgHTUYMvj8x8OiQphk1Y=; b=Uio1lDqHgE29fuLtGYUfsK3QZUXpgE9qwIkeoF1Cym/sulfa2Y42DYEyFWshsq54Vq UYZYUqys/8S+OFw5W+J7vXBIzlEOPK28I6rkBdkDLmXXS1VAPiBMe0T2jp8aW9wI/JGd XTTpxi6D6GOhGoIW4oGaZmjDz7KZpqkEtHGGtLJtV1gY2wFIxuA2jzrHo9jwm/XqFogu jVdavTa5gX9lgKoboprpL/3GsPpIo2Vr9ALJCJhMM1Qg0LxM3d95wF9dISG0Q0TCY1ix KRKO3OAL/HBPXs0QpkKjad3/7reeeB2sAXz9MdqvlYMVzeFCmStXB6zEEaLqli2JJ30R 6jOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=B7DdUgX9XzJkLBFO+GnuFoFTgHTUYMvj8x8OiQphk1Y=; b=X8ojc7yKJsbVwYcRp3Z/O8EAeQ/I5uAxFNZpHKseVhUInipFsG9pkkxGiNg9xeJjR3 KQDZAAweFYKyIMLrYU81RRsOaprDijc43BOqEIgNNQdztQlAxi1X2WVgZBaw7nh1zUyE evLE1Yt4vkkaNx9nLrB0YF1RJqOKilj+9IknG3lD2pA3fXK7uNE8BYmEUh7DodOcBBMT v7xMhbwMYbPXLJITR9S3RyCcUhEen//jt/SVPiAto0WYe0ppXxA6FBrW38qJcaXiixJC KzTcj8TaLBonkWmlZOP83C+K0s3x+IZRBlUsXkFn/OrhkY8wl/HTmh7gKf7lauzbnfrX aeTg== X-Gm-Message-State: AOAM532+bPFRSOtAHgvsmY2m/yAMQzMAjwUSmLc0ARQ1rG4F5CjEGuHr o/7I6MAWOyOG4Dr9ZjPz11g8c9isl0AfxbC7kL415w3J X-Google-Smtp-Source: ABdhPJx1TkxUQLJ6mxzaiTD9t/xzKPTs2uHxOECPloPFx4VuIicUvjeQcbTtN4mS2c/Cq2EyJzSY5QmYvCPb8IS9ttw= X-Received: by 2002:a05:6512:22c4:b0:47d:aab8:8ba4 with SMTP id g4-20020a05651222c400b0047daab88ba4mr5946436lfu.212.1654957826733; Sat, 11 Jun 2022 07:30:26 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Paul Sztorc Date: Sat, 11 Jun 2022 10:30:13 -0400 Message-ID: To: Ruben Somsen , Bitcoin Protocol Discussion Content-Type: multipart/alternative; boundary="000000000000617d0505e12ce5e1" Subject: Re: [bitcoin-dev] BIP47 Prague Discussion X-BeenThere: bitcoin-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Bitcoin Protocol Discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2022 14:30:30 -0000 --000000000000617d0505e12ce5e1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable FYI there is a version 3 of bip47 (which Ranvier published somewhere else [0]). It already gets them down to a marginal 64 bytes, with a small privacy drawback. The transaction from A can be double used as both a notification to Bob and a payment to Bob. The notification output is multisig OP [Key1] [Key2] [Key3] , one being change for A (a sunk cost), K2 being the signal to B, and K3 being a blinded code only B can read. From there you can simply insert another output to Bob (to actually pay him), insert decoy change outputs, or swap Key1 for Bobs key, making it impossible (at least) to tell *how much* someone is paying to Bob and how much is change for Alice. But everyone does know that a new bidirectional relationship to Bob (from someone) is being established, of course. [0] https://github.com/OpenBitcoinPrivacyProject/rfc/blob/master/obpp-05.mediaw= iki Paul On Sat, Jun 11, 2022, 6:03 AM Ruben Somsen via bitcoin-dev < bitcoin-dev@lists.linuxfoundation.org> wrote: > This discussion took place at Pizza Day Prague 2022[0] after a brief > discussion on Silent Payments[1]. The main points have been summarized > below. > > The discussion was mainly between Alekos Filini, Martin Habov=C5=A1tiak, = and > myself, as well as Daniela Brozzoni, Eric Sirion, Pavol Rusnak, Salvatore > Ingala, and others. > > Also available as a gist: > https://gist.github.com/RubenSomsen/21c477c90c942acf45f8e8f5c1ad4fae > > And my personal opinion can be found in the comments: > > https://gist.github.com/RubenSomsen/21c477c90c942acf45f8e8f5c1ad4fae?perm= alink_comment_id=3D4197284#gistcomment-4197284 > > > Improving BIP47 > > BIP47 requires a notification transaction prior to making payments. This > transaction takes up on-chain space and can easily leak privacy if not > handled with extreme caution. In practice this is quite hard. > > The discussion revolved around whether we can a.) minimize the on-chain > space required and b.) outsource the notification transaction so the link > between the sender and recipient is no longer apparent on-chain. > > > BIP47 space requirements > > As currently implemented, BIP47 (V1/V2)[2] requires an input key for > blinding, the blinded sender payment code in an op_return, and the > recipient key in an output. > > The first question that came up was whether it is necessary for the > recipient to learn the payment code of the sender. The benefit is that th= is > enables the recipient to send a notification transaction and subsequent > payment to the sender, but in practice this never happens. It therefore > seems acceptable to forego this requirement, as this potentially saves > space. The minimum notification payload that seems required is a fresh > sender key and a static recipient key. > > The sender key should ideally be deterministically derived from the sende= r > xpub based on the recipient key. If the user checks all the keys that wer= e > registered with the recipient prior to notification, it can statelessly > find out whether the sender key was already previously registered. This > step can be skipped, which is easier for light clients, but means the > notification transaction will have to be resent if the user ever forgets > they already sent a notification (such as when restoring from backup). > > > Outsourcing the notification > > The next part of the discussion revolved around the idea of putting > multiple notifications in a single transaction that can be outsourced to = a > third party in order to break the sender/recipient link. This third party > could be paid over the Lightning Network for their services. > > One idea was to use the taproot annex to insert the notification payload > as (discounted) witness data. One downside with this approach is that it > requires custom software for the recipient to notice the notification, > since it's not tied to an easily noticeable output. The middle ground > solution would be to put the sender keys there but still create an output > for each recipient key. > > > Allowing collisions > > One interesting point that came up was that you could represent the > recipient key using e.g. only 4 bytes (provided you put it in the annex). > This leaves a window of 1 in ~4.3 billion for a collision, but the extra > work that needs to be performed when it does happen is negligible > (essentially expecting a payment while there is none). This would reduce > the payload from 64 bytes to 36 bytes of witness data. > > While this did not come up in the discussion, it should be noted that > using the annex makes the transaction non-standard[3]. It could either be > standardized as the first use case for the annex, or perhaps an alternati= ve > method[4] should be considered. > > > [0] Pizza Day Prague 2022: https://www.pizzaday.cz > > [1] Silent Payments: > https://gist.github.com/RubenSomsen/c43b79517e7cb701ebf77eec6dbb46b8 > > [2] BIP47: https://github.com/bitcoin/bips/blob/master/bip-0047.mediawiki > > [3] Annex non-standard: > https://github.com/bitcoin/bitcoin/pull/17977/files#diff-ea6d307faa4ec9df= a5abcf6858bc19603079f2b8e110e1d62da4df98f4bdb9c0R250 > > [4] Using p2wsh: > https://gist.github.com/RubenSomsen/21c477c90c942acf45f8e8f5c1ad4fae?perm= alink_comment_id=3D4189419#gistcomment-4189419 > > _______________________________________________ > bitcoin-dev mailing list > bitcoin-dev@lists.linuxfoundation.org > https://lists.linuxfoundation.org/mailman/listinfo/bitcoin-dev > --000000000000617d0505e12ce5e1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
FYI there is a version 3 of bip47 (which Ranvier pub= lished somewhere else [0]). It already gets them down to a marginal 64 byte= s, with a small privacy drawback.

The transaction from A can be double used as both a notification = to Bob and a payment to Bob. The notification output is multisig OP [Key1] = [Key2] [Key3] , one being change for A (a sunk cost), K2 being the signal t= o B, and K3 being a blinded code only B can read.
From there you can simply insert another output t= o Bob (to actually pay him), insert decoy change outputs, or swap Key1 for = Bobs key, making it impossible (at least) to tell *how much* someone is pay= ing to Bob and how much is change for Alice.

But everyone does know that a new bidirectional relati= onship to Bob (from someone) is being established, of course.


Paul

<= br>
On Sat, Jun 11, 2022, 6:03 AM Ruben Somsen via bitcoin-dev <bitcoin-dev@lists.linuxf= oundation.org> wrote:
This discussion took place at Pizza Day Prague 2022[0] afte= r a brief discussion on Silent Payments[1]. The main points have been summa= rized below.

The discussion was mainly between Alekos Fil= ini, Martin Habov=C5=A1tiak, and myself, as well as Daniela Brozzoni, Eric = Sirion, Pavol Rusnak, Salvatore Ingala, and others.

Also available as a gist:
= https://gist.github.com/RubenSomsen/21c477c90c942acf45f8e8f5c1ad4fae

And my personal opinion can be found in the comments= :


Improving BIP47

BIP47 requires a notification = transaction prior to making payments. This transaction takes up on-chain sp= ace and can easily leak privacy if not handled with extreme caution. In pra= ctice this is quite hard.

The discussion revolved around whether we = can a.) minimize the on-chain space required and b.) outsource the notifica= tion transaction so the link between the sender and recipient is no longer = apparent on-chain.


BIP47 space requirements

As cur= rently implemented, BIP47 (V1/V2)[2] requires an input key for blinding, th= e blinded sender payment code in an op_return, and the recipient key in an = output.

The first question that came up was whether it is necessary = for the recipient to learn the payment code of the sender. The benefit is t= hat this enables the recipient to send a notification transaction and subse= quent payment to the sender, but in practice this never happens. It therefo= re seems acceptable to forego this requirement, as this potentially saves s= pace. The minimum notification payload that seems required is a fresh sende= r key and a static recipient key.

The sender key should ideally be d= eterministically derived from the sender xpub based on the recipient key. I= f the user checks all the keys that were registered with the recipient prio= r to notification, it can statelessly find out whether the sender key was a= lready previously registered. This step can be skipped, which is easier for= light clients, but means the notification transaction will have to be rese= nt if the user ever forgets they already sent a notification (such as when = restoring from backup).


Outsourcing the notification
<= br>The next part of the discussion revolved around the idea of putting mult= iple notifications in a single transaction that can be outsourced to a thir= d party in order to break the sender/recipient link. This third party could= be paid over the Lightning Network for their services.

One idea was= to use the taproot annex to insert the notification payload as (discounted= ) witness data. One downside with this approach is that it requires custom = software for the recipient to notice the notification, since it's not t= ied to an easily noticeable output. The middle ground solution would be to = put the sender keys there but still create an output for each recipient key= .


Allowing collisions

One interesting point that c= ame up was that you could represent the recipient key using e.g. only 4 byt= es (provided you put it in the annex). This leaves a window of 1 in ~4.3 bi= llion for a collision, but the extra work that needs to be performed when i= t does happen is negligible (essentially expecting a payment while there is= none). This would reduce the payload from 64 bytes to 36 bytes of witness = data.

While this did not come up in the discussion, it should be not= ed that using the annex makes the transaction non-standard[3]. It could eit= her be standardized as the first use case for the annex, or perhaps an alte= rnative method[4] should be considered.


_______________________________________________
bitcoin-dev mailing list
bitcoin-dev@lists.linuxfoundation.org
https://lists.linuxfoundati= on.org/mailman/listinfo/bitcoin-dev
--000000000000617d0505e12ce5e1--