Create EncryptedMultisigDescriptor.java#1788
Open
PeterMcBTC wants to merge 3 commits intosparrowwallet:masterfrom
Open
Create EncryptedMultisigDescriptor.java#1788PeterMcBTC wants to merge 3 commits intosparrowwallet:masterfrom
PeterMcBTC wants to merge 3 commits intosparrowwallet:masterfrom
Conversation
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.
Collaborator
Author
|
Apparently, Liana has just proposed a BIP draft with that vision in mind: bitcoin/bips#1951." |
Collaborator
|
Yes - if this gets finalized I'll strongly consider implementing it. |
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 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.