Safer sighashes and more granular SIGHASH_NOINPUT



Summary:

Pieter Wuille, a Bitcoin developer, suggests signing the amounts of all inputs in light of Johnson Lau's suggestion and questions whether explicit signing of the transaction fee is necessary. Wuille proposes appending a new `hashValues` field to the hashed representation, with `hashValues` being the double SHA256 of all values. Wuille then discusses what it means to commit to the fee versus committing to the values and evaluates the use cases for different input types. He concludes by proposing a combined proposal that includes all existing sighash flags, plus NOINPUT and MASK, encoded in two bits. Signatures would be 64 plus an optional sighash byte with a missing sighash byte implying ALL and ALL not being able to be specified explicitly. The new sighash would include data about the spending transaction, the output being spent, and the input being signed.


Updated on: 2023-06-13T15:25:25.005217+00:00