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

Non-default sighash type #8687

Closed
ik105 opened this issue Nov 13, 2023 · 4 comments
Closed

Non-default sighash type #8687

ik105 opened this issue Nov 13, 2023 · 4 comments
Labels
topic-transactions 📑 related to logic in transaction.py user-interface 🔲
Milestone

Comments

@ik105
Copy link

ik105 commented Nov 13, 2023

I created an unsigned transaction in Sparrow wallet with SIGHASH_NONE, then imported the psbt into Electrum and was surprised that Electrum didn't show any warning about the unusual sighash type. It becomes possible to steal coins with malware even from cold or multisig storage.

Please add a warning when signing a transaction with a non-default sighash type.

@SomberNight SomberNight added user-interface 🔲 topic-transactions 📑 related to logic in transaction.py labels Nov 13, 2023
@SomberNight
Copy link
Member

Good point. Do you know how it works/looks in other programs when trying to sign a tx with a non-sighash_all input?

@ik105
Copy link
Author

ik105 commented Nov 13, 2023

Sparrow wallet doesn't warn, but there is an option to select the type of sighash (I don't think it's enough, you can ignore it). Trezor seems to just not accept such transactions. Ledger shows "Non-default sighash - > Reject if you're not sure -> Continue/Reject". Coldcard shows this:

photo_2023-11-13_20-26-23

@ecdsa
Copy link
Member

ecdsa commented Nov 22, 2023

I guess there is no use case for sighash_none at the moment, so we can forbid it.
There are use cases for sighash_all|anyonecanpay

@SomberNight
Copy link
Member

note: related commits in #8699 and #8743

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-transactions 📑 related to logic in transaction.py user-interface 🔲
Projects
None yet
Development

No branches or pull requests

4 participants