1
0
mirror of https://github.com/bitcoin/bips.git synced 2025-06-30 12:42:43 +00:00

461 Commits

Author SHA1 Message Date
Dan Gould
ee587c5d2f
BIP 77: Async Payjoin (#1483)
* Draft payjoin v2 BIP

* Include mailing list feedback

* Include TABConf feedback

* Include padding

* Include production reference implementation

* Adopt BIP-77 for payjoin v2

* Distinguish payjoin directory from OHTTP Relay

* Detail OHTTP Key Configuration mechanism

* Fix punctuation

* Make base64URL references consistent

* Reference standardized Secp256k1 DHKEM for HPKE

* Add Comments-URI

* fixup: Format and spell check

Co-authored-by: spacebear <144076611+grizznaut@users.noreply.github.com>

* Add BIP 77 to README

* Add Payjoin V2 overview diagram

* Add Oblivious HTTP Sequence Diagram

* Correct links and spelling

Co-authored-by: thebrandonlucas <38222767+thebrandonlucas@users.noreply.github.com>

* Wrap <code> blocks

* Fix basic scheme actors

* Fix dead samourai links

* Orient motivation around a problem

* fix links

* Keyconfig s/should/must/ be provided

* Fix typos

Co-authored-by: thebrandonlucas <38222767+thebrandonlucas@users.noreply.github.com>

* s/pubkey/public key

* Incorporate jonatack's suggestions

* Incorporate more jonatack suggestions

* Incorporate satsie's suggesetions

* Rename "Async Payjoin"

* Replace BIP21 params with fragment params

* Revise document to describe Payjoin Sessions

Enrollment was a less clear than sessions

* Revise Sequence Diagram

* Spell initialize

* Update the bip to represent the stable protocol

* Spell according to Type Checks's job

* Mention the format of the ohttp fragment

* Reference BIP 78 attack vectors

* Remove straggling text

* Specify authorization mechanism

The specifics of a credential issuance are left out, however

* Use implicit session initialization

* Specify cryptographic handshake based on Noise IK

Co-authored-by: Yuval Kogman <nothingmuch@woobling.org>

* Add Spacebear's clarifications

Co-authored-by: spacebear <git@spacebear.dev>

* Document subdirectory Short IDs

* Require uppercase URL

bech32 fragment prefixes are case sensitive, and
alphanumeric mode only works on capital letters.

* Specify bech32 fragment parameter definitions

* Uppercase URL specifically only after subdirectory

* Note payload uniformity via padding and ellswift

* Include Message Byte Representations

This is the most straightforward way to explain the various padding
requirements.

* Document HPKE `info` strings

* Truncate lines to 120 characters

* Receiver's Original PSBT, not proposal

* Specify no mixed [output script]

* Remove extraneous pipe character

* Require BIPS 21, 78, 174

* Update checklist MUST/MUST NOT sections

MUST NOT contained MUST details. Move them to MUST.

* inputs ⇒ input

* Clarify BIP 78 payjoin version 1 connection

* Fix backwards compat language

* Payjoin version 2 URIs

* Reference Binary HTTP RFC

* Payjoin version 1 Proposal PSBTs

* Oblivous -> Oblivious

* Rm reference to 'production relays'

* Repeat the active agent by name

* Add Post-History

* Title 'Async Payjoin'

* Check spelling

* directory -> mailbox

* Move ohttp= fragment param to link to frag spec

* Mention URI keys as bootstrap mechanism

* Mailbox Discovery

* Remove superfluous word

* Clarify motivation

* Revise backwards compatiblity section for clarity

* Remove related protocol details

* Mv copyright out of flow

* Fix grammar (should be plural)

* Weaken language around addressing CIOH

"solves" implies this is the end of the story. Clarify that the problem
is the sole *explicit* problem mentioned in the paper.

* Simplify overview

- describe happy path protocol sequence
- introduce non-obvious key terms inherited from BIP 78
- no need for technical details that are clarified in the specification

* Describe optionality in overview

* Nitpicky sequence diagram fixes

* Clarify receiver's initial message in sequence diagram

* Simplify Basic Scheme section

* Mention OHTTP abbreviation on first mention

* Move sequence diagram up

* fragment parameter encoding corrections

- base64url was replaced by bech32
- formatting fixes
- some clarifications

* Use SHA-256 at independent mentions for consistency

* bootstrap grammar fix & correction

bootstrap would use a tor exit node, not a hidden service

* clarify proposal PSBT encryption layers

clarify which key is used for which layer of encryption (payjoin v2 e2ee vs.
OHTTP)

the message is not "authenticated" by the sender, rather it is tagged, it can be
authenticated during decryption.

* format original/proposal PSBT terms using italic, not <code>

* HRP of short ID is an implementation detail

it doesn't matter what is used since it's stripped after encoding

* Clarify checklist requirements

* "by intersection" unclear and unnecessary

* the fragment doesn't follow the pj param, it's part of it

* fix message diagram line intersections

* Correct encapsulated OHTTP diagram

The binary HTTP request is encrypted, and the AEAD tag is at the end, not the
beginning

* Clarifications for HPKE keys

Remove noise protocol framework mention. The IK pattern is not accurate, the
closest patterns are N or possibl NN, but neither is a perfect fit (N defines the
key as static, which it isn't, and NN is an interactive pattern)

* Remove note about forward secrecy

This is inaccurate, forward secrecy is defined with respect to long term
sessions, so the definition doesn't really extend to the request and response
messages, each of which is encrypted with ephemeral keys.

* Clarify OHTTP-relay bypassing by use of tor hidden service

* Update HPKE mode used for sender's message

Previously the reply key was included before the HPKE ciphertext, and the Auth
mode was used using this key. Since they are delivered together that only proves
the key was usable by the sender, not that the ciphertext is authentic. With the
key included as part of the encrypted plaintext, the HPKE mode was changed to
the base encryption to a public key mode with no authentication key.

* keep mailbox, but rename mailroom back to directory

Partly reverts a4d4065fa6f736f058e9173aa852e4fd12e75650, this change is hardly
more than a find & replace of mailroom to directory, and does not revert grammar
changes etc in addition to not reverting the subdirectory -> mailbox rename
which was the main point of confusion.

* Clarify allowed_purposes mechanism

First explain RFC 9540, then explain the extension mechanism.

Make roles in the interaction more explicit by changing the heading, "Directory
Discovery" sort of implies that clients discover these, when it describes relay
to directory interaction.

Clarify centralization pressure, that is alleviated by making senders' and
receivers' choices independent of each other.

* Correct payload uniformity section

We forgot about the OHTTP header which is 7 bytes of cleartext that also
specifies the DHKEM algoritm.

Additional clarifications and some restructuring to describe the details two
classes of messages each in its own self contained paragraph.

* rewrap paragraph to fix broken link

* fix bullet list formatting

- unindent to avoid <pre>
- fix broken URLs
- fix bullet items split into paragraphs

* rewrap section to fix broken links

* rewrap more paragraphs to fix broken links

* make attack vectors level 2 heading

as level 3 heading it was displayed under rationale in the table of contents

* Grammar/style fixes

* Order Requires

* Describe 'what' in the first sentence of the abstract.

* Be more specific about motivation.

* Make goal more explicit and consise

* Standardize "Common-input-ownership heuristic"

bitcoin wiki uses this.

* Replace Request expiration with Session Expiration

* Specify BIP 78 `v` parameter as redundant.

* Separate Short ID length rationale from spec

* Clairfy key nomeclature

- mailbox key
- reply key
- receiver key

as well as ephemerality and session nomeclature.

* Place byte diagrams with there respective message description.

* Include bitcoin URI subsection

* Top half reorg

* Add Yuval Kogman as Co-author

* NO mak typo

* Fix heirarchy

* Convert mediawiki to markdown

nix shell nixpkgs#pandoc --command bash -lc '
  pandoc -f mediawiki -t gfm bip-0077.mediawiki -o bip-0077.md'

rm bip-0077.mediawiki
reference bip-0077.md in README
surround bip-0077.md preamble in ``` to satisfy CI

* Strip link titles from mediawiki -> md conversion

sed -i.bak -E 's/\]\(([^ )]+) "[^"]*"\)/](\1)/g' bip-0077.md

* Strip leading/trailing spaces from inside links

sed -i.bak -E 's/\[[[:space:]]+/[/g; s/[[:space:]]+\]/]/g' bip-0077.md

* Fix spacing around inline code

* Take bitcoin URI example out of md link syntax

* Fence byte diagrams in backtics

* Replace sequence diagrams with mermaid

Better rendering and semantic source

* Collapse overview, basic scheme, and protocol sequence

These were all inconsitent levels of detail for the same thing. Leave the overview
the highest level and link to the specifics.

* Consistent short id singularity

* Remove straggling whitespace

* Link whitepaper

* Fix motivation flow

* Clarify abstract

* Clarify motivation

* Clarify overview

* Clarify bootstrapping

* Use singular to describe Payjoin URI

* Clarify mailbox endpoint

Specify that v2 mailboxes are OHTTP Targets.
Mention backwards compatibility.

* Clarify Receiver Fragment Parameters

* Revise messaging for clarity

* Add rationale for allowed_purposes

* Define ElligatorSwift according to BIP 324

* Clarify attacks, backwards compatibility

* Fix Receiver Proposal PSBT messaging header

for link.

* Add activation to sequence

* Correct #64-bit-short-id-length link

Co-authored-by: Yuval Kogman <nothingmuch@woobling.org>

* Clarify why not AES-GCM rationale

* Specify serialization of reply key in plaintext

* Specify the wire format for ChaCha20-Poly1305 ciphertext and tag

* Specify details of HPKE message wire format

Also clarifies that HPKE auth mode is used with the receiver's key,
authenticating the receiver as the sender of the encrypted Proposal PSBT.

* Correct diagram for OHTTP encapsulation

The order according to RFC 9458 and the code is is header, followed by
encapsulated key, followed by the ciphertext.

* OHTTP message encoding according to RFC 9458

* Rephrase abstract in active voice

* Deduplicate motivation word choice

- 'suitable for widespread implementation' vs appropriate, it's stronger
- 'mature solutions' to express that we chose those already based on iteration
- 'proven bitcoin primitives' to reflect the use of those battle tested like
  ElligatorSwift

* Simplify output batching motivation

* Reduce verbosity of linking exemplar conclusion

* Use PSBT 'update' verb in overview

Say 'appropriate intputs and/or outputs' because outputs might be merely
replaced, not necessarily added.

* Mention mutual exclusivity of Original and Proposal PSBTs

* Capitalize Uri -> URI

* Clarify URI parameter key/value distinction

* Backwards-compatible receivers *disable* pjos

* Use bech32 character set, not bech32

* Clarify session-specific parameter encoding

* Say 33-byte compressed public key

* Clarify v2 optional sender parameters application

* Clarify receiver session initiation overview

Co-authored-by: nothingmuch <nothingmuch@woobling.org>

* Mention sender's ephemeral mailbox in overview

Co-authored-by: nothingmuch <nothingmuch@woobling.org>

* Clarify cut-through optimization

* Replace mention of v1/v2 payjoin

Instead use 'This proposal', 'BIP 78', 'BIP 77', or omit the mention.

* Mention BIP 174 for PSBTv0

* Mention sender's *corresponding* public key

* Hyphenate '16-byte'

* Clarify who can post messagese direct to mailbox

* liu -> lieu

* Simplify cut through overview sentence structure

* Replace 'Payjoin exemplar' with 'A natural application..'

* Make motivation CIOH mention easier to read

Use language from sataoshi and don't mention input batching since the next
sentence already does.

* Specify Proposal PSBT MUST/MAY input/output inclusion rules

* remove duplicate 'and'

* Remove duplicate 'preserve'

Co-authored-by: Brandon Lucas <thebrandonlucas@gmail.com>

* The HRP is used as the parameter key

Co-authored-by: Yuval Kogman <nothingmuch@woobling.org>

* Add rationale for random padding in OHTTP

* Use "zero" instead of "0"

Co-authored-by: Mark "Murch" Erhardt <murch@murch.one>

* epehmeral -> ephemeral

Co-authored-by: Brandon Lucas <thebrandonlucas@gmail.com>

* subject match tense

Co-authored-by: Brandon Lucas <thebrandonlucas@gmail.com>

* Capitalize Payjoin for protocol

Co-authored-by: Brandon Lucas <thebrandonlucas@gmail.com>

* Capitalize Payjoin for protocol

Co-authored-by: Brandon Lucas <thebrandonlucas@gmail.com>

* Capitalize Payjoin for protocol

Co-authored-by: Brandon Lucas <thebrandonlucas@gmail.com>

* Capitalize Payjoin for protocol

Co-authored-by: Brandon Lucas <thebrandonlucas@gmail.com>

* Capitalize Payjoin for protocol

Co-authored-by: Brandon Lucas <thebrandonlucas@gmail.com>

* ("Version 2") relative to and described in ("Version 1")

Co-authored-by: Jon Atack <jon@atack.com>

* BIP78's requirements for Payjoin Version 1

Co-authored-by: Jon Atack <jon@atack.com>

* Include missing period

Co-authored-by: Jon Atack <jon@atack.com>

* which -> that

Co-authored-by: Jon Atack <jon@atack.com>

* Separate independent clauses with a semicolon

Co-authored-by: Jon Atack <jon@atack.com>

* Remove duplicate "at"

Co-authored-by: Jon Atack <jon@atack.com>

* Hyphenate "short-lived"

Co-authored-by: Jon Atack <jon@atack.com>

* Fix Attack Vectors URL

Co-authored-by: Jon Atack <jon@atack.com>

* which -> that

Co-authored-by: Jon Atack <jon@atack.com>

* Include colon to reference Oblivious HTTP Relay impl

Co-authored-by: Jon Atack <jon@atack.com>

* consist -> consists

Co-authored-by: Jon Atack <jon@atack.com>

* Remove double "the"

Co-authored-by: Jon Atack <jon@atack.com>

* Remove double "the"

Co-authored-by: Jon Atack <jon@atack.com>

* Correct Padded BHTTP Response length

144 bytes not 104

See: 87042266d1/payjoin-directory/src/lib.rs (L30-L31)

* which -> , which

* Note TLS is not available in Bitcoin Core

* Link to BIP21 forwards compatibility `reqparam`

* Require rev. lexicographical frag. param. order

A specific order might create a fingerprint for a specific wallet, imposing a privacy
risk. It seems impossible to impose an order on BIP21 parameters, but BIP 77 clients
may error on out-of-order fragment parameters to at least avoid some fingerprint there.

Reverse lecicographical ordering was chosen because that is how the existing implmentation
serializes the parameters already, so that no breaking change needs to be made.

Co-authored-by: nothingmuch <nothingmuch@woobling.org>

---------

Co-authored-by: spacebear <144076611+grizznaut@users.noreply.github.com>
Co-authored-by: thebrandonlucas <38222767+thebrandonlucas@users.noreply.github.com>
Co-authored-by: Yuval Kogman <nothingmuch@woobling.org>
Co-authored-by: spacebear <git@spacebear.dev>
Co-authored-by: spacebear <144076611+spacebear21@users.noreply.github.com>
Co-authored-by: Brandon Lucas <thebrandonlucas@gmail.com>
Co-authored-by: Mark "Murch" Erhardt <murch@murch.one>
Co-authored-by: Jon Atack <jon@atack.com>
2025-05-28 11:49:12 -07:00
Mark "Murch" Erhardt
43d4a1ecec
Merge pull request #1760 from Christewart/2024-12-20-64bytetxs
BIP 53: Disallow 64-byte transactions
2025-05-21 17:58:42 -07:00
Jon Atack
039de4fddd
Merge pull request #1850 from murchandamus/Revert-bip48-update 2025-05-21 18:46:52 -06:00
Chris Stewart
4d495ab1a0 BIP53: Disallow 64-byte transactions
Co-authored-by: Mark "Murch" Erhardt <murch@murch.one>

Co-authored-by: Jon Atack <jon@atack.com>
2025-05-21 19:10:59 -05:00
Murch
fc946e1989
BIP48: Move to final 2025-05-13 13:07:53 -07:00
Salvatore Ingala
ed6b6132f8
BIP draft for OP_CHECKCONTRACTVERIFY 2025-05-13 09:28:28 +02:00
Murch
60ac0e8fec
Merge pull request #1848 via 'jamesob-25-05-withdraw-vault' 2025-05-08 11:38:05 -07:00
James O'Beirne
b771054d4d
BIP-345: withdraw 2025-05-08 11:33:31 -07:00
Murch
bce061f009
Merge pull request #1841 from 0ceanSlim
- Adds BIP172: Define Bitcoin Subunits as Satoshis
2025-05-08 10:28:56 -07:00
0ceanSlim
c37927174e
Add BIP172: Define Bitcoin Subunits as Satoshis 2025-05-08 10:24:02 -07:00
Mark "Murch" Erhardt
4aa3aef572
Merge pull request #1821 from BitcoinErrorLog/master
BIP177: Redefine Bitcoin’s Base Unit
2025-05-08 09:52:03 -07:00
John Carvalho
59527bd92b
Add BIP177: Redefine Bitcoin's Base Unit
- Redefine bitcoin base unit to smallest unit
- Propose BIP 21Q: Redefine bitcoin base unit to smallest indivisible unit
- Adds comments acknowledging and handling sats and satoshis
- Make use of "base unit" and variations more consistent and intentional
- Make "bitcoin" v "Bitcoin" consistent
- Made "bitcoin" v "Bitcoin" consistent by using Bitcoin for the protocol and idea, and bitcoin for the units, which I believe is conventional style.
2025-05-08 09:49:28 -07:00
Jon Atack
74fc5b92b0
Merge pull request #1800 from darosior/consensus_cleanup
BIP 54: Consensus Cleanup
2025-04-29 16:23:51 -06:00
Antoine Poinsot
1ee43519dd Consensus Cleanup BIP draft 2025-04-28 14:30:31 -04:00
Mark "Murch" Erhardt
fd3878a279
Merge pull request #1555 from TheBlueMatt/2024-03-uris-without-bodies
BIP 321: URI Scheme (Replace BIP 21 with a new BIP containing information about more modern usage of it)
2025-04-24 21:52:29 -07:00
Janus
757e15e568 Reject 199 (expired) 2025-04-21 15:18:24 -07:00
Matt Corallo
7e6a583c8d Copy BIP 21 into a new BIP 321 with only the header changed 2025-04-04 16:37:24 +00:00
Jon Atack
02ad0e01c2
Merge pull request #1794 from murchandamus/2025-03-propose-BIP3
BIP3: Move to Proposed
2025-03-24 12:55:27 -06:00
Murch
b650373ded
Merge branch 'BIP-0060' 2025-03-21 07:22:27 -07:00
Murch
76132ec284
bip3: Move to Proposed 2025-03-18 19:31:49 -07:00
Fabian Jahr
d2cfbae4c1
BIP 94: Move to Final 2025-02-25 16:47:01 -05:00
Jon Atack
7916231ff6
Merge pull request #1712 from murchandamus/2024-12-update-bip-process
BIP3: Updated BIP Process
2025-02-20 15:21:22 -08:00
Murch
d5c189f328
BIP3: Update BIP Process 2025-02-20 17:18:08 -05:00
Mark "Murch" Erhardt
2e71a7e758
Merge pull request #1762 from achow101/328-tests
328: test vectors, reference implementation, update to Proposed
2025-02-14 09:28:51 -05:00
Ava Chow
151ec96c83
328: Draft -> Proposed 2025-02-14 09:26:11 -05:00
Ava Chow
3adf43df82 373: Draft -> Proposed 2025-02-13 12:52:19 -08:00
Andrew Toth
144c4a3a15
Update to BIP375 2025-01-13 10:33:52 -05:00
Mark "Murch" Erhardt
75b12ac591
Merge pull request #1689 from andrewtoth/dleq
BIP374: Discrete Log Equality Proofs (DLEQ)
2024-12-27 10:29:46 -05:00
Andrew Toth
9d6dc6b681
Update README table, post-history, and comments-uri 2024-12-26 12:10:52 -05:00
Mark "Murch" Erhardt
eb3bf03542
Merge pull request #1709 from jonatack/2024-12-bip125-status
BIP125: update status to Final
2024-12-06 13:36:10 -05:00
Jon Atack
749c606281 BIP125: update status to Final 2024-12-05 14:23:32 -06:00
Brandon Black
d2932bd00d
Add BIP 0348 - CHECKSGIFROMSTACK 2024-11-26 11:23:59 -08:00
Mark "Murch" Erhardt
66fceff5bb
Merge pull request #1534 from reardencode/internalkey
Add BIP 349: OP_INTERNALKEY
2024-11-25 10:48:08 -05:00
Murch
669d3b3570
BIP349: Fix preamble for CI issues 2024-11-14 16:36:45 -05:00
moonsettler
329b0d3db5
BIP-349 2024-11-14 16:30:28 -05:00
Brandon Black
75351f2587
Add bip-internalkey 2024-11-14 16:30:24 -05:00
Anthony Towns
65b312fe4a Remove ajtowns from bip-345 coauthor. 2024-11-14 10:21:30 +10:00
scgbckbone
829afccd1a change BIP39 status to Final 2024-11-08 11:32:40 +01:00
Jon Atack
3d86d94fa4 BIP125: update status from Proposed to Obsolete 2024-10-29 11:41:33 -06:00
Jon Atack
17c04f9fa1
Merge pull request #1676 from scgbckbone/bip85_final
BIP85: update status to Final
2024-10-25 08:13:16 -07:00
Aneesh Karve
8eac367dae
BIP-85: Add co-author, language code & dice app, TPRV guidance, warn on BIP-32 divergence, grammar & clarity (#1679)
* BIP-85: Add language code, add dice app, warn on BIP-32 divergence, grammar clarity

* BIP-85: Add definite article

Co-authored-by: Jon Atack <jon@atack.com>

* BIP-85: PR suggestions on grammar, clarity

* BIP-85: Add change log

* BIP-85: Proper <references />, semver reference implementations, date on changelog, clarify warning language

* BIP-85: PR suggestion on range formatting

Co-authored-by: Jon Atack <jon@atack.com>

* BIP-85: wordsmith BIP-32 warning

Co-authored-by: Jon Atack <jon@atack.com>

* BIP-85: PR feedback on format, language, order of text

* BIP-85: PR grammar improvements

* BIP-85: Add dice app code to changelog

* BIP-85: Grammar and clarity from PR review

Co-authored-by: Jon Atack <jon@atack.com>

* BIP-85: Improve changelog and bump semvers accordingly; add alphanum password example to dice

* BIP-85: Rectify changelog dates and contents

* BIP-85: Correct 1.3.0 semver in changelog

* BIP-85: Remove fancy warning syntax b/c GH doesn't render it, wordsmith BIP32 warning

* BIP-85: Add and correct semvers in Reference Implementation section

---------

Co-authored-by: Jon Atack <jon@atack.com>
2024-10-25 08:11:00 -07:00
Jon Atack
2eb22b8ec6 BIP327: update status 2024-10-11 11:19:56 -06:00
Jeremy Rubin
80f8011e9c
Remove j amesob from README.mediawiki from bip-0119 2024-10-06 14:55:31 -04:00
scgbckbone
b0125501f8 change BIP85 status to Final 2024-10-05 16:07:40 +02:00
Jon Atack
3f4a0a17bc
Revert "BIP85: Update/clarify spec, add change log, Portuguese language code,…"
This reverts commit a1be309f91f70b855626c823af317d9b1163309e.
2024-10-04 16:18:52 -07:00
Aneesh Karve
a1be309f91
BIP85: Update/clarify spec, add change log, Portuguese language code, dice application (#1600)
* BIP-85:

    * Add new maintainer (author unreachable)
    * Swap chain code and private key bytes in application 32' for consistentcy with BIP-32 (major change)
    * Correct derived entropy for application 128169' test vector (major change)
    * Clarify big endian serialization
    * Add the Portuguese language (9') to application 39'
    * Add dice application 89101'
    * Clarify Testnet support for XPRV application 32'
    * Minor grammar, format, clarity improvements
2024-09-25 08:00:54 -07:00
Mark "Murch" Erhardt
5e87c919a7
Merge pull request #1601 from fjahr/testnet4
Add BIP94: Testnet 4
2024-08-02 14:01:32 -04:00
Fabian Jahr
a35650e14e
Add BIP 94 - Testnet 4 2024-07-31 16:43:31 -04:00
Mark "Murch" Erhardt
812907c2b0
Merge pull request #1649 from jonasschnelli/bip_159_update
159: Mark as final
2024-07-17 16:41:44 -04:00
Jonas Schnelli
dfacb8de6a
159: Mark as final 2024-07-17 22:09:22 +02:00