From: Dan Gould <d@ngould.dev>
To: Christopher Allen <ChristopherA@lifewithalacrity.com>
Cc: Bitcoin Protocol Discussion <bitcoin-dev@lists.linuxfoundation.org>
Subject: Re: [bitcoin-dev] BIP for Serverless Payjoin
Date: Sat, 12 Aug 2023 21:20:37 +0000 [thread overview]
Message-ID: <ACC80254-1AE2-4B6E-8D5C-A3C3FACCA6EA@ngould.dev> (raw)
In-Reply-To: <CACrqygAPKUUYxWbV0XwrRN9U1sNEGCkv+iWwA8MiLLjN_+dASQ@mail.gmail.com>
Blockchain Commons UR seems to be the most elegant choice since QRs are commonplace. This suggestion, along with Adam’s to reconsider DH over symmetric crypto would let us encode a pub key directly in the `pj=` endpoint rather than with a separate am somewhat concerned that some payjoin implementations are written in JavaScript and would benefit most from a v2 upgrade in order to support receiving, but no JavaScript ur library exists yet. 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-based cryptosystem using Secp256k1/Sha256/ChaChaPoly1305 to address the problems waxwing helped uncover.
I hope also to hear more input on the transport protocol. I know many developers are interested in Nostr for its censorship resistant properties and would like to see that discussion play out within the BIP process to reach rough consensus before deployment. This hope is a key reason I’ve written here first instead of developing and deploying a complete reference implementation.
Thanks list,
Dan
> On Aug 11, 2023, at 9:05 PM, Christopher Allen <ChristopherA@lifewithalacrity.com> wrote:
>
>
>
> On Fri, Aug 11, 2023 at 3:29 PM symphonicbtc via bitcoin-dev <bitcoin-dev@lists.linuxfoundation.org> wrote:
> Quick little nit I noticed as well, are you sure base64 encoding is the best choice for the psk in the URI? You may find that having to urlencode the special characters in base64 it impacts readability and adds a layer of complexity if a human wanted to extract the psk from the URI for some reason. I suggest using something like [base64url](https://datatracker.ietf.org/doc/html/rfc4648#section-5) which modifies base64 slightly to be more suited to this purpose.
>
> Yes, the URI version of base64 is better.
> However, If you plan to display these via QRs, either will double the density of the QR as QR libraries treat them as binary data (like hex of hex data). Thus you may want to use UR encoding, which is what over a dozen bitcoin 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 be animated. The have other advantages.
>
> * A top level link about URs:
> https://github.com/BlockchainCommons/crypto-commons/blob/master/Docs/README.md#uniform-resources-urs
>
> * About the base64 encoding with QRs problem:
> https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-003-uri-binary-compatibility.md
>
> * The base UR tech spec:
> https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2020-005-ur.md
>
> * List of bitcoin wallets using UR for PSBTs:
> https://github.com/blockchaincommons/gordian-developer-community#urs
>
> * List of UR libraries:
> https://github.com/BlockchainCommons/crypto-commons#bc-ur
>
> Let me know if you’re interested.
>
> — Christopher Allen
next prev parent reply other threads:[~2023-08-12 21:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.130337.1691684480.956.bitcoin-dev@lists.linuxfoundation.org>
2023-08-11 17:03 ` [bitcoin-dev] BIP for Serverless Payjoin (AdamISZ) Dan Gould
2023-08-11 22:04 ` symphonicbtc
2023-08-12 1:05 ` Christopher Allen
2023-08-12 21:20 ` Dan Gould [this message]
2023-08-13 9:22 ` [bitcoin-dev] BIP for Serverless Payjoin Christopher Allen
[not found] <mailman.5.1691928003.16386.bitcoin-dev@lists.linuxfoundation.org>
2023-08-13 12:50 ` Dan Gould
2023-08-09 17:32 Dan Gould
2023-08-10 15:37 ` AdamISZ
2023-08-10 15:46 ` AdamISZ
2023-08-13 6:58 ` David A. Harding
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ACC80254-1AE2-4B6E-8D5C-A3C3FACCA6EA@ngould.dev \
--to=d@ngould.dev \
--cc=ChristopherA@lifewithalacrity.com \
--cc=bitcoin-dev@lists.linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox