Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deal with descriptor checksum collisions #42

Open
shesek opened this issue Jun 21, 2020 · 2 comments
Open

Deal with descriptor checksum collisions #42

shesek opened this issue Jun 21, 2020 · 2 comments

Comments

@shesek
Copy link
Collaborator

shesek commented Jun 21, 2020

Collisions are highly unlikely for typical bwt usage, but might become an issue in setups where there are many dynamically-managed xpubs, for example if each customer is given its own xpub for deposits.

This could be resolved by using the full 160 bit identifier, or possibly by using the descriptor checksums as the primary identifier instead of the bip32 fingerprint (once descriptor-based tracking is implemented, #1 / #37).

@shesek
Copy link
Collaborator Author

shesek commented Jun 21, 2020

@shesek
Copy link
Collaborator Author

shesek commented Nov 1, 2020

Following the descriptor support added in #1, bwt now uses descriptor checksums as the wallet identifier. This gives us 40 bits compared to 32 bits with bip32 fingerprints, which is somewhat better but still potentially prune to collisions.

For now, I added a check for collisions in the provided descriptors and made bwt refuse to start up if it detects any. A more ideal solution would be to let users specify their own wallet identifiers, or replacing descriptor checksums with some custom hash-based identifier that uses more bits. (Although, checksums do have the advantage of being a standard understood by other software.)

@shesek shesek changed the title Deal with BIP 32 fingerprint collisions Deal with descriptor checksum collisions Nov 1, 2020
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

No branches or pull requests

1 participant