1

Was there any purpose in changing the signature of a transaction?

Or it was a bug before segregated witness?

Does segregated witness disable some wanted feature?

3

By using sighash flags you can flag a transaction to intentionally make specific parts of it modifiable after signing it. This kind of intentional malleability is a useful, if not often used, feature and isn't changed by segwit.

Malleability in the SIGHASH_ALL was simply a design flaw and based on all the issues that the original software had with it appears to have been unintentional and unrealized at the time of the protocol's release.

The main origins of malleability in typical transactions arise from effects that aren't especially visible while writing the software-- e.g. that pushes could be serialized in different ways, or that there were multiple distinct valid signatures of the same data.

  • thanks, any real life example or use case to understand changing some modifiable part of a tx after signing? – Emi Jan 30 at 5:37
  • 3
    Sure, the ANYONE CAN PAY sighash flag lets you sign a transaction that doesn't yet have all its input value, allowing someone else to pay the rest. So for example, you can use this to make a matching donation: I write a TX that pays Alice 2 BTC but I only provide a signed 1BTC input. Someone else can take that, add another 1 BTC input and make the tx valid without any further interaction from me. – G. Maxwell Jan 30 at 5:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.