-
Notifications
You must be signed in to change notification settings - Fork 965
non-standard ECDSA sighash types are not preserved, but allowed in PSBT #777
Copy link
Copy link
Open
Labels
1.0Issues and PRs required or helping to stabilize the APIIssues and PRs required or helping to stabilize the APIbrainstorm
Description
In #669 (comment) we decided to allow non-standard sighash types in PSBT partial signatures, on the grounds that the PSBT spec doesn't forbid them and they're allowed by consensus.
However, as Sanket reminds me at rust-bitcoin/rust-miniscript#290 (comment), our EcdsaSighHashType does not actually distinguish between different nonstandard sighash types, and effectively silently converts them all to 1. This will cause bugs in PSBT if somebody actually tries to use the sighash type.
Solutions are:
- Petition the Bitcoin BIPs repo to restrict PSBT to disallow nonstandard sighash types
- Restrict sighash types in our code, regardless of what the BIP says
- Fix the
EcdsaSigHashTypeto keep track of which nonstandard type it uses (and then do the right thing during sighash computations, serialization, etc)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
1.0Issues and PRs required or helping to stabilize the APIIssues and PRs required or helping to stabilize the APIbrainstorm