Return-Path: Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 3C60AC0032 for ; Sat, 12 Aug 2023 21:20:58 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 03D7D40156 for ; Sat, 12 Aug 2023 21:20:58 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 03D7D40156 Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key) header.d=ngould.dev header.i=@ngould.dev header.a=rsa-sha256 header.s=protonmail header.b=oyE0BnZ9 X-Virus-Scanned: amavisd-new at osuosl.org X-Spam-Flag: NO X-Spam-Score: -2.1 X-Spam-Level: X-Spam-Status: No, score=-2.1 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, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kw-EyRUIe0t3 for ; Sat, 12 Aug 2023 21:20:57 +0000 (UTC) Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) by smtp2.osuosl.org (Postfix) with ESMTPS id CB01140111 for ; Sat, 12 Aug 2023 21:20:56 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org CB01140111 Date: Sat, 12 Aug 2023 21:20:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ngould.dev; s=protonmail; t=1691875254; x=1692134454; bh=EiyOz+Qy40Ci9Y4zs4PuT7CO+RZ4mQOZ8XLlCabFXaw=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=oyE0BnZ9Q3LZM6t0eGa1d5GA6jX2xQB7ABgGylH0SgdV6h3Z5HjTJNTOpVHy1wCS3 2bD61h+s2dVSOvSyRBgyjrpN2RYA0q7heE83y5FlBYEoFevJGz4ENBODltMxhbcE2m Y+DI86Wx8JW6ZlF7zZFMz1x14WAPWMPnalk2K7cw= To: Christopher Allen From: Dan Gould Message-ID: In-Reply-To: References: <50A19B79-46A1-4F21-AA53-74356F4B0CBA@ngould.dev> Feedback-ID: 13175031:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Sun, 13 Aug 2023 01:18:09 +0000 Cc: Bitcoin Protocol Discussion Subject: Re: [bitcoin-dev] BIP for Serverless Payjoin 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, 12 Aug 2023 21:20:58 -0000 Blockchain Commons UR seems to be the most elegant choice since QRs are com= monplace. This suggestion, along with Adam=E2=80=99s to reconsider DH over = symmetric crypto would let us encode a pub key directly in the `pj=3D` endp= oint rather than with a separate am somewhat concerned that some payjoin i= mplementations are written in JavaScript and would benefit most from a v2 u= pgrade in order to support receiving, but no JavaScript ur library exists y= et. Perhaps one could be bound from the rust implementation. I have updated the draft to include these suggestions and posted it to the = bips repo: https://github.com/bitcoin/bips/pull/1483 The biggest change is that symmetric crypto is replaced with a Noise IK-bas= ed cryptosystem using Secp256k1/Sha256/ChaChaPoly1305 to address the proble= ms waxwing helped uncover. I hope also to hear more input on the transport protocol. I know many devel= opers are interested in Nostr for its censorship resistant properties and w= ould like to see that discussion play out within the BIP process to reach r= ough consensus before deployment. This hope is a key reason I=E2=80=99ve wr= itten here first instead of developing and deploying a complete reference i= mplementation. Thanks list, Dan > On Aug 11, 2023, at 9:05 PM, Christopher Allen wrote: >=20 >=20 >=20 > On Fri, Aug 11, 2023 at 3:29 PM symphonicbtc via bitcoin-dev wrote: > Quick little nit I noticed as well, are you sure base64 encoding is the b= est choice for the psk in the URI? You may find that having to urlencode th= e special characters in base64 it impacts readability and adds a layer of c= omplexity if a human wanted to extract the psk from the URI for some reason= . I suggest using something like [base64url](https://datatracker.ietf.org/d= oc/html/rfc4648#section-5) which modifies base64 slightly to be more suited= to this purpose. >=20 > Yes, the URI version of base64 is better. > However, If you plan to display these via QRs, either will double the den= sity of the QR as QR libraries treat them as binary data (like hex of hex d= ata). Thus you may want to use UR encoding, which is what over a dozen bitc= oin wallets use to encode PSBTs. URs are very efficient with QRs, and have = the optional benefit that if the data carried becomes too large, they can b= e animated. The have other advantages.=20 >=20 > * A top level link about URs:=20 > https://github.com/BlockchainCommons/crypto-commons/blob/master/Docs/READ= ME.md#uniform-resources-urs >=20 > * About the base64 encoding with QRs problem:=20 > https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020= -003-uri-binary-compatibility.md >=20 > * The base UR tech spec:=20 > https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020= -005-ur.md >=20 > * List of bitcoin wallets using UR for PSBTs:=20 > https://github.com/blockchaincommons/gordian-developer-community#urs >=20 > * List of UR libraries:=20 > https://github.com/BlockchainCommons/crypto-commons#bc-ur >=20 > Let me know if you=E2=80=99re interested. >=20 > =E2=80=94 Christopher Allen