Skip to content

Conversation

PeterMcBTC
Copy link

This enhances multisig privacy by encrypting the descriptor with public-key-derived symmetric keys, preventing balance exposure. Advantages: Simplifies setup for individuals without private keys or Shamir sharing; enables wallet access via any two zpubs; maintains security as decryption requires matching pairs; avoids revealing full setup to single parties.

This enhances multisig privacy by encrypting the descriptor with public-key-derived symmetric keys, preventing balance exposure. Advantages: Simplifies setup for individuals without private keys or Shamir sharing; enables wallet access via any two zpubs; maintains security as decryption requires matching pairs; avoids revealing full setup to single parties.
Replaced broken code relying on non-existent Java methods (getAuthenticationTag() and setAuthenticationTag()), causing compilation errors.
Correctly implemented AES-GCM encryption and decryption:
Removed manual extraction/injection of authentication tags.
Encrypted blobs now properly combine IV and ciphertext (with embedded tag).
Decryption validates integrity via Cipher.doFinal().
Ensured secure key derivation using SHA-256 on sorted zpubs.
Added support for 2-of-3 multisig by generating all key pairs (zpub1/zpub2, zpub1/zpub3, zpub2/zpub3).
Encryption now creates one encrypted blob per pair (3 blobs total).
Decryption tries all pairs and returns the first valid result.
Added input validation and made the system easily extensible for N-of-M setups.
@craigraw
Copy link
Collaborator

In my opinion, for any kind of output descriptor encoding scheme to be adopted for long term storage, it must be backed by a proper specification. There have been many schemes proposed recently, but none have yet been formalized into BIPs or similar.

@PeterMcBTC
Copy link
Author

Apparently, Liana has just proposed a BIP draft with that vision in mind: bitcoin/bips#1951."

@craigraw
Copy link
Collaborator

Yes - if this gets finalized I'll strongly consider implementing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants