compare multisig cosigner xpubs by public key and chain code when checking for duplicate keystores
What changed, and why it matters
This commit changes how Sparrow Wallet detects duplicate cosigner keys in multisig wallets. Previously it compared extended public keys (xpubs) using a full equality check, which may have treated xpubs with different metadata (such as different derivation paths or master fingerprints) as different even when they represented the same underlying public key. Now it compares only the raw public key and chain code. This could prevent a user from accidentally adding the same cosigner twice, or conversely could help catch cases where the same key is disguised with different xpub metadata. The commit itself does not explain whether this fixes a security bug or is just a robustness improvement.
Review the drongo submodule commit 499a656b0fb0aaed701aa4d32702a3c32818c813 to confirm hasSameKey() compares exactly the public key and chain code and does not introduce any new collisions or bypasses. If this change is intended to fix a security issue, request a CVE and advisory from the vendor. Users relying on multisig should ensure they are on the patched version and verify cosigner xpubs manually until then.
Security signals we found
Change in identity/equality semantics for cryptographic public material
Multisig cosigner duplicate detection logic
Submodule update likely contains the substantive implementation change
No explicit security framing in commit title or message
Evidence from the diff
In KeystoreController.setupValidation(), the duplicate-keystore check replaces ExtendedKey.equals() with ExtendedKey.hasSameKey(). The supplied diff only shows the call-site change; the actual implementation of hasSameKey() lives in the updated drongo submodule (commit 499a656b0fb0aaed701aa4d32702a3c32818c813). Without the submodule diff we cannot verify exactly which fields are compared, but the method name and commit title imply a comparison restricted to the public key bytes and chain code, ignoring xpub version bytes, depth, parent fingerprint, child number, or derivation path metadata. This narrows the equivalence class of xpubs considered ‘the same keystore’.
Changed components
Sparrow Wallet desktop applicationKeystoreController validation for multisig walletsdrongo library (submodule) ExtendedKey classInspect captured patch +2 / −2
### drongo
@@ -1 +1 @@
-Subproject commit 1804f3487e57d1daab00474869fa173db7265f1e
+Subproject commit 499a656b0fb0aaed701aa4d32702a3c32818c813
### src/main/java/com/sparrowwallet/sparrow/wallet/KeystoreController.java
@@ -336,7 +336,7 @@ private void setupValidation() {
}
ExtendedKey extendedPublicKey = ExtendedKey.fromDescriptor(newValue);
- return walletForm.getWallet().getKeystores().stream().filter(k -> k != keystore && extendedPublicKey.equals(k.getExtendedPublicKey())).findFirst()
+ return walletForm.getWallet().getKeystores().stream().filter(k -> k != keystore && extendedPublicKey.hasSameKey(k.getExtendedPublicKey())).findFirst()
.map(k -> ValidationResult.fromError(c, "Extended key matches " + k.getLabel())).orElseGet(ValidationResult::new);
}
));Why this scored 42/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.