Conversation
Record the initial published draft using the BIP3 document-version and changelog convention.
Rename keys_types.json to recipient_keys.json and generalize the format to support multiple descriptors and multiple recipient keys: - "key": a single key-expression string becomes "descriptors": an array of complete descriptor strings. - "expected": an x-only key string becomes "expected_keys": an array containing that key; null remains null. Convert the nine existing cases by wrapping each key expression in tr(), except the uncompressed literal uses pk(), since tr() does not accept it. Each case has one descriptor.
MuSig aggregation hides participant keys, so account xpubs do not need individual trailing derivation. Specify that encryption uses participant roots rather than the aggregate key. Add MuSig2 test vectors: one for a bare aggregate and one for aggregate derivation.
A root selected through a derived xpub can also appear bare or as a literal key. Once a spend reveals it, anyone could decrypt the backup. Exclude such cases.
Member
Author
|
cc @pythcoiner, see also #2298 and #2299 |
murchandamus
left a comment
Member
There was a problem hiding this comment.
Seems reasonable, waiting for @pythcoiner to chime in.
Sjors
added a commit
to Sjors/bitcoin
that referenced
this pull request
Sep 23, 2026
Convert the nine existing key-expression vectors to the descriptor-list format proposed in bitcoin/bips#2300. Preserve direct key-extraction checks and exercise backup creation and decryption with the same cases.
Sjors
added a commit
to Sjors/bitcoin
that referenced
this pull request
Sep 23, 2026
Import the six recipient vectors proposed in bitcoin/bips#2300 (recipient selection). Check MuSig roots, aggregation derivation, and payload-wide deduplication through backup creation and decryption with each expected recipient. For exposed roots, assert Core refusal, including the MuSig script-leaf case where the proposal permits proceeding with a different recipient. Replace the standalone MuSig eligibility and exposed-participant checks with the proposed vectors.
Sjors
added a commit
to Sjors/bitcoin
that referenced
this pull request
Sep 23, 2026
Convert the nine existing key-expression vectors to the descriptor-list format proposed in bitcoin/bips#2300. Preserve direct key-extraction checks and exercise backup creation and decryption with the same cases.
Sjors
added a commit
to Sjors/bitcoin
that referenced
this pull request
Sep 23, 2026
Import the six recipient vectors proposed in bitcoin/bips#2300 (recipient selection). Check MuSig roots, aggregation derivation, and payload-wide deduplication through backup creation and decryption with each expected recipient. For exposed roots, assert Core refusal, including the MuSig script-leaf case where the proposal permits proceeding with a different recipient. Replace the standalone MuSig eligibility and exposed-participant checks with the proposed vectors.
Contributor
|
@Sjors, about let's take the example of |
Member
Author
|
@pythcoiner can you explain your example a bit more? IIUC Y is already excluded because it's a bare xpub or pubkey. |
Contributor
|
@Sjors my bad, you are right |
Contributor
|
ACK bf63b1d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR clarifies which keys can decrypt a BIP138 backup.
It expands the existing exclusion rule to consider all descriptors and key expressions in the backup. This makes encryption safer, but does not impact decryption, so it's not a breaking change.
Four middle commits:
keys_types.jsontorecipient_keys.jsonand support lists of descriptors and expected keys, preserving the nine existing cases.The first commit introduces a changelog. I'm reusing that commit across a few parallel pull requests.
The last commit updates the changelog; I'll update that depending on merge order.